From 77391f20c9d237b2d9dadb5321364d3832149ca2 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 28 Apr 2026 22:12:52 +0000 Subject: [PATCH 1/2] fix!: remove SheetExportAudienceList method, associated resources, and OAuth scopes from v1 alpha feat: add RunReport and GetMetadata methods to v1 alpha feat: add Metadata, Comparison, ComparisonMetadata, and ConversionMetadata types to v1 alpha feat: add the ConversionSpec field to the RunReportRequest resource in v1 alpha feat: add the Section field to the ResponseMetaData resource in v1 alpha feat: add the conversions field to the Metadata response in v1 alpha feat: add the sections field to the DimensionMetadata in v1 alpha docs: update documentation for sampling_metadatas docs: update copyright year to 2026 in proto files PiperOrigin-RevId: 907145766 Source-Link: https://github.com/googleapis/googleapis/commit/97bcfbd777f7cdac49a5ee0c00ef6553000826ef Source-Link: https://github.com/googleapis/googleapis-gen/commit/f7d8b884c2d49dce1a24b07c87c9890976d015d1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1kYXRhLy5Pd2xCb3QueWFtbCIsImgiOiJmN2Q4Yjg4NGMyZDQ5ZGNlMWEyNGIwN2M4N2M5ODkwOTc2ZDAxNWQxIn0= --- .../google-analytics-data/.eslintignore | 7 + .../google-analytics-data/.eslintrc.json | 4 + .../google-analytics-data/.gitattributes | 4 + .../google-analytics-data/.gitignore | 14 + .../google-analytics-data/.jsdoc.js | 55 + .../google-analytics-data/.mocharc.js | 33 + owl-bot-staging/google-analytics-data/.nycrc | 24 + .../google-analytics-data/.prettierignore | 6 + .../google-analytics-data/.prettierrc.js | 22 + .../google-analytics-data/CODE_OF_CONDUCT.md | 94 + .../google-analytics-data/CONTRIBUTING.md | 76 + owl-bot-staging/google-analytics-data/LICENSE | 202 + .../google-analytics-data/README.md | 140 + .../data/v1alpha/analytics_data_api.proto | 1444 + .../google/analytics/data/v1alpha/data.proto | 1814 + .../data/v1beta/analytics_data_api.proto | 1001 + .../google/analytics/data/v1beta/data.proto | 1082 + .../google-analytics-data/protos/protos.d.ts | 28701 ++++++ .../google-analytics-data/protos/protos.js | 75986 ++++++++++++++++ .../google-analytics-data/protos/protos.json | 7286 ++ ...pha_analytics_data.create_audience_list.js | 68 + ...ics_data.create_recurring_audience_list.js | 67 + ...alpha_analytics_data.create_report_task.js | 68 + .../alpha_analytics_data.get_audience_list.js | 62 + .../alpha_analytics_data.get_metadata.js | 69 + ...ytics_data.get_property_quotas_snapshot.js | 62 + ...lytics_data.get_recurring_audience_list.js | 63 + .../alpha_analytics_data.get_report_task.js | 62 + ...lpha_analytics_data.list_audience_lists.js | 78 + ...tics_data.list_recurring_audience_lists.js | 80 + .../alpha_analytics_data.list_report_tasks.js | 73 + ...lpha_analytics_data.query_audience_list.js | 83 + .../alpha_analytics_data.query_report_task.js | 88 + .../alpha_analytics_data.run_funnel_report.js | 132 + .../alpha_analytics_data.run_report.js | 172 + ...etadata_google.analytics.data.v1alpha.json | 763 + ..._analytics_data.batch_run_pivot_reports.js | 72 + .../beta_analytics_data.batch_run_reports.js | 72 + ...beta_analytics_data.check_compatibility.js | 90 + ...a_analytics_data.create_audience_export.js | 68 + ...beta_analytics_data.get_audience_export.js | 62 + .../beta_analytics_data.get_metadata.js | 69 + ...ta_analytics_data.list_audience_exports.js | 78 + ...ta_analytics_data.query_audience_export.js | 83 + .../beta_analytics_data.run_pivot_report.js | 135 + ...beta_analytics_data.run_realtime_report.js | 115 + .../v1beta/beta_analytics_data.run_report.js | 162 + ...metadata_google.analytics.data.v1beta.json | 639 + .../google-analytics-data/src/index.ts | 28 + .../v1alpha/alpha_analytics_data_client.ts | 2972 + .../alpha_analytics_data_client_config.json | 113 + .../alpha_analytics_data_proto_list.json | 4 + .../src/v1alpha/gapic_metadata.json | 185 + .../src/v1alpha/index.ts | 19 + .../src/v1beta/beta_analytics_data_client.ts | 2233 + .../beta_analytics_data_client_config.json | 93 + .../beta_analytics_data_proto_list.json | 4 + .../src/v1beta/gapic_metadata.json | 137 + .../google-analytics-data/src/v1beta/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 49 + .../gapic_alpha_analytics_data_v1alpha.ts | 2862 + .../test/gapic_beta_analytics_data_v1beta.ts | 2004 + .../google-analytics-data/tsconfig.json | 22 + .../google-analytics-data/webpack.config.js | 64 + 66 files changed, 132497 insertions(+) create mode 100644 owl-bot-staging/google-analytics-data/.eslintignore create mode 100644 owl-bot-staging/google-analytics-data/.eslintrc.json create mode 100644 owl-bot-staging/google-analytics-data/.gitattributes create mode 100644 owl-bot-staging/google-analytics-data/.gitignore create mode 100644 owl-bot-staging/google-analytics-data/.jsdoc.js create mode 100644 owl-bot-staging/google-analytics-data/.mocharc.js create mode 100644 owl-bot-staging/google-analytics-data/.nycrc create mode 100644 owl-bot-staging/google-analytics-data/.prettierignore create mode 100644 owl-bot-staging/google-analytics-data/.prettierrc.js create mode 100644 owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-analytics-data/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-analytics-data/LICENSE create mode 100644 owl-bot-staging/google-analytics-data/README.md create mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto create mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto create mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto create mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto create mode 100644 owl-bot-staging/google-analytics-data/protos/protos.d.ts create mode 100644 owl-bot-staging/google-analytics-data/protos/protos.js create mode 100644 owl-bot-staging/google-analytics-data/protos/protos.json create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js create mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json create mode 100644 owl-bot-staging/google-analytics-data/src/index.ts create mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts create mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/index.ts create mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts create mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/index.ts create mode 100644 owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-analytics-data/system-test/install.ts create mode 100644 owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts create mode 100644 owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts create mode 100644 owl-bot-staging/google-analytics-data/tsconfig.json create mode 100644 owl-bot-staging/google-analytics-data/webpack.config.js diff --git a/owl-bot-staging/google-analytics-data/.eslintignore b/owl-bot-staging/google-analytics-data/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-analytics-data/.eslintrc.json b/owl-bot-staging/google-analytics-data/.eslintrc.json new file mode 100644 index 000000000000..3e8d97ccb390 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "./node_modules/gts", + "root": true +} diff --git a/owl-bot-staging/google-analytics-data/.gitattributes b/owl-bot-staging/google-analytics-data/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-analytics-data/.gitignore b/owl-bot-staging/google-analytics-data/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-analytics-data/.jsdoc.js b/owl-bot-staging/google-analytics-data/.jsdoc.js new file mode 100644 index 000000000000..224079c6f26b --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-analytics/data', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-analytics-data/.mocharc.js b/owl-bot-staging/google-analytics-data/.mocharc.js new file mode 100644 index 000000000000..5eb34e86c874 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-analytics-data/.nycrc b/owl-bot-staging/google-analytics-data/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/.prettierignore b/owl-bot-staging/google-analytics-data/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-analytics-data/.prettierrc.js b/owl-bot-staging/google-analytics-data/.prettierrc.js new file mode 100644 index 000000000000..7649ee3c254e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md b/owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/CONTRIBUTING.md b/owl-bot-staging/google-analytics-data/CONTRIBUTING.md new file mode 100644 index 000000000000..11f6908f30cf --- /dev/null +++ b/owl-bot-staging/google-analytics-data/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/LICENSE b/owl-bot-staging/google-analytics-data/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-analytics-data/README.md b/owl-bot-staging/google-analytics-data/README.md new file mode 100644 index 000000000000..281ad5361204 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/README.md @@ -0,0 +1,140 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Google Analytics Data API: Nodejs Client][homepage] + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + +[![npm version](https://img.shields.io/npm/v/@google-analytics/data.svg)](https://www.npmjs.org/package/@google-analytics/data) + +Google Analytics Data API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Google Analytics Data API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/data/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Analytics Data API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-analytics/data +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js) | +| create recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) | +| create report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) | +| get audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) | +| get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js) | +| get property quotas snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js) | +| get recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) | +| get report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) | +| list audience lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js) | +| list recurring audience lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js) | +| list report tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js) | +| query audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js) | +| query report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js) | +| run funnel report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js) | +| run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js) | +| analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json) | +| batch run pivot reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js) | +| batch run reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js) | +| check compatibility | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js) | +| create audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js) | +| get audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js) | +| get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js) | +| list audience exports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js) | +| query audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js) | +| run pivot report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js) | +| run realtime report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js) | +| run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js) | +| analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-analytics/data@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto new file mode 100644 index 000000000000..c936b2d0ee6a --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto @@ -0,0 +1,1444 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.data.v1alpha; + +import "google/analytics/data/v1alpha/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service AlphaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Returns a customized funnel report of your Google Analytics event data. The + // data returned from the API is as a table with columns for the requested + // dimensions and metrics. + // + // Funnel exploration lets you visualize the steps your users take to complete + // a task and quickly see how well they are succeeding or failing at each + // step. For example, how do prospects become shoppers and then become buyers? + // How do one time buyers become repeat buyers? With this information, you can + // improve inefficient or abandoned customer journeys. To learn more, see [GA4 + // Funnel Explorations](https://support.google.com/analytics/answer/9327974). + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the [Google Analytics Data API Funnel + // Reporting + // Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + rpc RunFunnelReport(RunFunnelReportRequest) + returns (RunFunnelReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:runFunnelReport" + body: "*" + }; + } + + // Creates an audience list for later retrieval. This method quickly returns + // the audience list's resource name and initiates a long running asynchronous + // request to form an audience list. To list the users in an audience list, + // first create the audience list through this method and then send the + // audience resource name to the `QueryAudienceList` method. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // An audience list is a snapshot of the users currently in the audience at + // the time of audience list creation. Creating audience lists for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience lists contain + // the users in each audience. + // + // This method is available at beta stability at + // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceList(CreateAudienceListRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/audienceLists" + body: "audience_list" + }; + option (google.api.method_signature) = "parent,audience_list"; + option (google.longrunning.operation_info) = { + response_type: "AudienceList" + metadata_type: "AudienceListMetadata" + }; + } + + // Retrieves an audience list of users. After creating an audience, the users + // are not immediately available for listing. First, a request to + // `CreateAudienceList` is necessary to create an audience list of users, and + // then second, this method is used to retrieve the users in the audience + // list. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // This method is available at beta stability at + // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + // To give your feedback on this API, complete the [Google Analytics Audience + // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceList(QueryAudienceListRequest) + returns (QueryAudienceListResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audienceLists/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience list. This method + // can be used to understand an audience list after it has been created. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/audienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience lists for a property. This method can be used for you to + // find and reuse existing audience lists rather than creating unnecessary new + // audience lists. The same audience can have multiple audience lists that + // represent the list of users that were in an audience on different days. + // + // See [Creating an Audience + // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Lists with examples. + // + // This method is available at beta stability at + // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + // To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceLists(ListAudienceListsRequest) + returns (ListAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/audienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a recurring audience list. Recurring audience lists produces new + // audience lists each day. Audience lists are users in an audience at the + // time of the list's creation. + // + // A recurring audience list ensures that you have audience list based on the + // most recent data available for use each day. If you manually create + // audience list, you don't know when an audience list based on an additional + // day's data is available. This recurring audience list automates the + // creation of an audience list when an additional day's data is available. + // You will consume fewer quota tokens by using recurring audience list versus + // manually creating audience list at various times of day trying to guess + // when an additional day's data is ready. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + body: "recurring_audience_list" + }; + option (google.api.method_signature) = "parent,recurring_audience_list"; + } + + // Gets configuration metadata about a specific recurring audience list. This + // method can be used to understand a recurring audience list's state after it + // has been created. For example, a recurring audience list resource will + // generate audience list instances for each day, and this method can be used + // to get the resource name of the most recent audience list instance. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) + returns (RecurringAudienceList) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all recurring audience lists for a property. This method can be used + // for you to find and reuse existing recurring audience lists rather than + // creating unnecessary new recurring audience lists. The same audience can + // have multiple recurring audience lists that represent different dimension + // combinations; for example, just the dimension `deviceId` or both the + // dimensions `deviceId` and `userId`. + // + // This method is introduced at alpha stability with the intention of + // gathering feedback on syntax and capabilities before entering beta. To give + // your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) + returns (ListRecurringAudienceListsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Get all property quotas organized by quota category for a given property. + // This will charge 1 property quota from the category with the most quota. + rpc GetPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest) + returns (PropertyQuotasSnapshot) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + }; + option (google.api.method_signature) = "name"; + } + + // Initiates the creation of a report task. This method quickly + // returns a report task and initiates a long running + // asynchronous request to form a customized report of your Google Analytics + // event data. + // + // A report task will be retained and available for querying for 72 hours + // after it has been created. + // + // A report task created by one user can be listed and queried by all users + // who have access to the property. + rpc CreateReportTask(CreateReportTaskRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/reportTasks" + body: "report_task" + }; + option (google.api.method_signature) = "parent,report_task"; + option (google.longrunning.operation_info) = { + response_type: "ReportTask" + metadata_type: "ReportTaskMetadata" + }; + } + + // Retrieves a report task's content. After requesting the `CreateReportTask`, + // you are able to retrieve the report content once the report is + // ACTIVE. This method will return an error if the report task's state is not + // `ACTIVE`. A query response will return the tabular row & column values of + // the report. + rpc QueryReportTask(QueryReportTaskRequest) + returns (QueryReportTaskResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/reportTasks/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets report metadata about a specific report task. After creating a report + // task, use this method to check its processing state or inspect its + // report definition. + rpc GetReportTask(GetReportTaskRequest) returns (ReportTask) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/reportTasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all report tasks for a property. + rpc ListReportTasks(ListReportTasksRequest) + returns (ListReportTasksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/reportTasks" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics property identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A request to create a new recurring audience list. +message CreateRecurringAudienceListRequest { + // Required. The parent resource where this recurring audience list will be + // created. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Required. The recurring audience list to create. + RecurringAudienceList recurring_audience_list = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A recurring audience list produces new audience lists each day. Audience +// lists are users in an audience at the time of the list's creation. A +// recurring audience list ensures that you have audience list based on the most +// recent data available for use each day. +message RecurringAudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" + plural: "recurringAudienceLists" + singular: "recurringAudienceList" + }; + + // Output only. Identifier. The recurring audience list resource name assigned + // during creation. This resource name identifies this + // `RecurringAudienceList`. + // + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the audience list + // response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of remaining days that a recurring audience export + // will produce an audience list instance. This counter decreases by one each + // day, and when it reaches zero, no new audience lists will be created. + // + // Recurring audience list request for Analytics 360 properties default to 180 + // days and have a maximum of 365 days. Requests for standard Analytics + // properties default to 14 days and have a maximum of 30 days. + // + // The minimum value allowed during creation is 1. Requests above their + // respective maximum will be coerced to their maximum. + optional int32 active_days_remaining = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Audience list resource names for audience list instances + // created for this recurring audience list. One audience list is created for + // each day, and the audience list will be listed here. + // + // This list is ordered with the most recently created audience list first. + repeated string audience_lists = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when a recurring audience + // list creates new audience lists. Webhooks allow a notification to be sent + // to your servers & avoid the need for polling. + // + // Two POST requests will be sent each time a recurring audience list creates + // an audience list. This happens once per day until a recurring audience list + // reaches 0 active days remaining. The first request will be sent showing a + // newly created audience list in its CREATING state. The second request will + // be sent after the audience list completes creation (either the ACTIVE or + // FAILED state). + optional WebhookNotification webhook_notification = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configures a long-running operation resource to send a webhook notification +// from the Google Analytics Data API to your webhook server when the resource +// updates. +// +// Notification configurations contain private values & are only visible to your +// GCP project. Different GCP projects may attach different webhook +// notifications to the same long-running operation resource. +message WebhookNotification { + // Optional. The web address that will receive the webhook notification. This + // address will receive POST requests as the state of the long running + // operation resource changes. The POST request will contain both a JSON + // version of the long running operation resource in the body and a + // `sentTimestamp` field. The sent timestamp will specify the unix + // microseconds since the epoch that the request was sent; this lets you + // identify replayed notifications. + // + // An example URI is + // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`. + // + // The URI must use HTTPS and point to a site with a valid SSL certificate on + // the web server. The URI must have a maximum string length of 128 characters + // & use only the allowlisted characters from [RFC + // 1738](https://www.rfc-editor.org/rfc/rfc1738). + // + // When your webhook server receives a notification, it is expected to reply + // with an HTTP response status code of 200 within 5 seconds. + // + // A URI is required to use webhook notifications. + // + // Requests to this webhook server will contain an ID token authenticating the + // service account + // `google-analytics-audience-export@system.gserviceaccount.com`. To learn + // more about ID tokens, see + // https://cloud.google.com/docs/authentication/token-types#id. For Google + // Cloud Functions, this lets you configure your function to require + // authentication. In Cloud IAM, you will need to grant the service account + // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud + // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook + // post request to pass Google Cloud Functions authentication. This API can + // send webhook notifications to arbitrary URIs; for webhook servers other + // than Google Cloud Functions, this ID token in the authorization bearer + // header should be ignored if it is not needed. + optional string uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The channel token is an arbitrary string value and must have a + // maximum string length of 64 characters. Channel tokens allow you to verify + // the source of a webhook notification. This guards against the message being + // spoofed. The channel token will be specified in the `X-Goog-Channel-Token` + // HTTP header of the webhook POST request. + // + // A channel token is not required to use webhook notifications. + optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to retrieve configuration metadata about a specific recurring +// audience list. +message GetRecurringAudienceListRequest { + // Required. The recurring audience list resource name. + // Format: + // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; +} + +// A request to list all recurring audience lists for a property. +message ListRecurringAudienceListsRequest { + // Required. All recurring audience lists for this property will be listed in + // the response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/RecurringAudienceList" + } + ]; + + // Optional. The maximum number of recurring audience lists to return. The + // service may return fewer than this value. If unspecified, at most 200 + // recurring audience lists will be returned. The maximum value is 1000 + // (higher values will be coerced to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListRecurringAudienceLists` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all recurring audience lists for a property. +message ListRecurringAudienceListsResponse { + // Each recurring audience list for a property. + repeated RecurringAudienceList recurring_audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to return the PropertyQuotasSnapshot for a given category. +message GetPropertyQuotasSnapshotRequest { + // Required. Quotas from this property will be listed in the response. + // Format: `properties/{property}/propertyQuotasSnapshot` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + ]; +} + +// Current state of all Property Quotas organized by quota category. +message PropertyQuotasSnapshot { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + pattern: "properties/{property}/propertyQuotasSnapshot" + plural: "propertyQuotasSnapshots" + singular: "propertyQuotasSnapshot" + }; + + // Identifier. The property quota snapshot resource name. + string name = 4 [(google.api.field_behavior) = IDENTIFIER]; + + // Property Quota for core property tokens + PropertyQuota core_property_quota = 1; + + // Property Quota for realtime property tokens + PropertyQuota realtime_property_quota = 2; + + // Property Quota for funnel property tokens + PropertyQuota funnel_property_quota = 3; +} + +// A request to retrieve configuration metadata about a specific audience list. +message GetAudienceListRequest { + // Required. The audience list resource name. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceList" + } + ]; +} + +// A request to list all audience lists for a property. +message ListAudienceListsRequest { + // Required. All audience lists for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Optional. The maximum number of audience lists to return. The service may + // return fewer than this value. If unspecified, at most 200 audience lists + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceLists` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceLists` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience lists for a property. +message ListAudienceListsResponse { + // Each audience list for a property. + repeated AudienceList audience_lists = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience list. +message CreateAudienceListRequest { + // Required. The parent resource where this audience list will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceList" + } + ]; + + // Required. The audience list to create. + AudienceList audience_list = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience list is a list of users in an audience at the time of the list's +// creation. One audience may have multiple audience lists created for different +// days. +message AudienceList { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceList" + pattern: "properties/{property}/audienceLists/{audience_list}" + plural: "audienceLists" + singular: "audienceList" + }; + + // The AudienceList currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceList is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceList call. + CREATING = 1; + + // The AudienceList is fully created and ready for querying. An AudienceList + // is updated to active asynchronously from a request; this occurs some + // time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceList failed to be created. It is possible that re-requesting + // this audience list will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience list resource name assigned during + // creation. This resource name identifies this `AudienceList`. + // + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceList. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceList was called and the + // AudienceList began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceList. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceList + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceList result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience list fails during + // creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The recurring audience list that created this audience list. + // Recurring audience lists create audience lists daily. + // + // If audience lists are created directly, they will have no associated + // recurring audience list, and this field will be blank. + optional string recurring_audience_list = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configures webhook notifications to be sent from the Google + // Analytics Data API to your webhook server. Use of webhooks is optional. If + // unused, you'll need to poll this API to determine when an audience list is + // ready to be used. Webhooks allow a notification to be sent to your servers + // & avoid the need for polling. + // + // Either one or two POST requests will be sent to the webhook. The first POST + // request will be sent immediately showing the newly created audience list in + // its CREATING state. The second POST request will be sent after the audience + // list completes creation (either the ACTIVE or FAILED state). + // + // If identical audience lists are requested in quick succession, the second & + // subsequent audience lists can be served from cache. In that case, the + // audience list create method can return an audience list is already ACTIVE. + // In this scenario, only one POST request will be sent to the webhook. + optional WebhookNotification webhook_notification = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// This metadata is currently blank. +message AudienceListMetadata {} + +// A request to list users in an audience list. +message QueryAudienceListRequest { + // Required. The name of the audience list to retrieve users from. + // Format: `properties/{property}/audienceLists/{audience_list}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience list. +message QueryAudienceListResponse { + // Configuration data about AudienceList being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceList correspond to the columns in the AudienceRows. + optional AudienceList audience_list = 1; + + // Rows for each user in an audience list. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceList result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceListResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The request for a funnel report. +message RunFunnelReportRequest { + // Controls the dimensions present in the funnel visualization sub report + // response. + enum FunnelVisualizationType { + // Unspecified type. + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0; + + // A standard (stepped) funnel. The funnel visualization sub report in the + // response will not contain date. + STANDARD_FUNNEL = 1; + + // A trended (line chart) funnel. The funnel visualization sub report in the + // response will contain the date dimension. + TRENDED_FUNNEL = 2; + } + + // Optional. A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. + repeated DateRange date_ranges = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration of this request's funnel. This funnel + // configuration is required. + Funnel funnel = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, this breakdown adds a dimension to the funnel table + // sub report response. This breakdown dimension expands each funnel step to + // the unique values of the breakdown dimension. For example, a breakdown by + // the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + // `desktop`, and the total. + FunnelBreakdown funnel_breakdown = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, next action adds a dimension to the funnel + // visualization sub report response. This next action dimension expands each + // funnel step to the unique values of the next action. For example a next + // action of the `eventName` dimension will create rows for several events + // (for example `session_start` & `click`) and the total. + // + // Next action only supports `eventName` and most Page / Screen dimensions + // like `pageTitle` and `pagePath`. + FunnelNextAction funnel_next_action = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The funnel visualization type controls the dimensions present in + // the funnel visualization sub report response. If not specified, + // `STANDARD_FUNNEL` is used. + FunnelVisualizationType funnel_visualization_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configurations of segments. Segments are subsets of a + // property's data. In a funnel report with segments, the funnel is evaluated + // in each segment. + // + // Each segment specified in this request + // produces a separate row in the response; in the response, each segment + // identified by its name. + // + // The segments parameter is optional. Requests are limited to 4 segments. + repeated Segment segments = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + int64 limit = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters allow you to ask for only specific dimension + // values in the report. To learn more, see [Creating a Report: Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Toggles whether to return the current state of this Analytics + // Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The funnel report response contains two sub reports. The two sub reports are +// different combinations of dimensions and metrics. +message RunFunnelReportResponse { + // The funnel table is a report with the funnel step, segment, breakdown + // dimension, active users, completion rate, abandonments, and abandonments + // rate. + // + // The segment dimension is only present in this response if a segment was + // requested. The breakdown dimension is only present in this response if it + // was requested. + FunnelSubReport funnel_table = 1; + + // The funnel visualization is a report with the funnel step, segment, date, + // next action dimension, and active users. + // + // The segment dimension is only present in this response if a segment was + // requested. The date dimension is only present in this response if it was + // requested through the `TRENDED_FUNNEL` funnel type. The next action + // dimension is only present in the response if it was requested. + FunnelSubReport funnel_visualization = 2; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 3; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runFunnelReport". Useful to distinguish between + // response types in JSON. + string kind = 4; +} + +// A specific report task configuration. +message ReportTask { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/ReportTask" + pattern: "properties/{property}/reportTasks/{report_task}" + plural: "reportTasks" + singular: "reportTask" + }; + + // The definition of how a report should be run. + message ReportDefinition { + // Optional. The dimensions requested and displayed. + repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metrics requested and displayed. + repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. + // If two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. In a cohort request, + // this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters let you ask for only specific dimension + // values in the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter clause of metrics. Applied after aggregating the + // report's rows, similar to SQL having-clause. Dimensions cannot be used in + // this filter. + FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The row count of the start row from Google Analytics Storage. + // The first row is counted as row 0. + // + // When creating a report task, the `offset` and `limit` parameters define + // the subset of data rows from Google Analytics storage to be included in + // the generated report. For example, if there are a total of 300,000 rows + // in Google Analytics storage, the initial report task may have the + // first 10,000 rows with a limit of 10,000 and an offset of 0. + // Subsequently, another report task could cover the next 10,000 rows with a + // limit of 10,000 and an offset of 10,000. + int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return in the Report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if + // you set `limit` to a higher value. + int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregation of metrics. Aggregated metric values will be shown + // in rows where the dimension_values are set to + // "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cohort group associated with this request. If there is a cohort + // group in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If false or unspecified, each row with all metrics equal to 0 + // will not be returned. If true, these rows will be returned if they are + // not separately removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // containing eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The report's sampling level. + optional SamplingLevel sampling_level = 14 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The report metadata for a specific report task. + message ReportMetadata { + // The processing state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The report is currently creating and will be available in the + // future. Creating occurs immediately after the CreateReport call. + CREATING = 1; + + // The report is fully created and ready for querying. + ACTIVE = 2; + + // The report failed to be created. + FAILED = 3; + } + + // Output only. The current state for this report task. + optional State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when `CreateReportTask` was called and the report + // began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // report. Because this token count is based on activity from the `CREATING` + // state, this tokens charge will be fixed once a report task enters the + // `ACTIVE` or `FAILED` state. + int32 creation_quota_tokens_charged = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the report result. This field + // will be populated when the state is active. You can utilize + // `task_row_count` for pagination within the confines of their existing + // report. + optional int32 task_row_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated if a report task fails during + // creation. + optional string error_message = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in Google Analytics storage. If you + // want to query additional data rows beyond the current report, they can + // initiate a new report task based on the `total_row_count`. + // + // The `task_row_count` represents the number of rows specifically + // pertaining to the current report, whereas `total_row_count` encompasses + // the total count of rows across all data retrieved from Google + // Analytics storage. + // + // For example, suppose the current report's `task_row_count` is 20, + // displaying the data from the first 20 rows. Simultaneously, the + // `total_row_count` is 30, indicating the presence of data for all 30 rows. + // The `task_row_count` can be utilizated to paginate through the initial 20 + // rows. To expand the report and include data from all 30 rows, a new + // report task can be created using the total_row_count to access the full + // set of 30 rows' worth of data. + optional int32 total_row_count = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The report task resource name assigned during + // creation. Format: "properties/{property}/reportTasks/{report_task}" + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. A report definition to fetch report data, which describes the + // structure of a report. It typically includes the fields that will be + // included in the report and the criteria that will be used to filter the + // data. + ReportDefinition report_definition = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The report metadata for a specific report task, which provides + // information about a report. It typically includes the following + // information: the resource name of the report, the state of the report, the + // timestamp the report was created, etc, + ReportMetadata report_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to create a report task. +message CreateReportTaskRequest { + // Required. The parent resource where this report task will be created. + // Format: `properties/{propertyId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Required. The report task configuration to create. + ReportTask report_task = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the metadata of a long-running operation. Currently, this metadata +// is blank. +message ReportTaskMetadata {} + +// A request to fetch the report content for a report task. +message QueryReportTaskRequest { + // Required. The report source name. + // Format: `properties/{property}/reportTasks/{report}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row in the report. The first row is + // counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return from the report. If unspecified, + // 10,000 rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. The number of rows + // available to a QueryReportTaskRequest is further limited by the limit of + // the associated ReportTask. A query can retrieve at most ReportTask.limit + // rows. For example, if the ReportTask has a limit of 1,000, then a + // QueryReportTask request with offset=900 and limit=500 will return at most + // 100 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The report content corresponding to a report task. +message QueryReportTaskResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; +} + +// A request to retrieve configuration metadata about a specific report task. +message GetReportTaskRequest { + // Required. The report task resource name. + // Format: `properties/{property}/reportTasks/{report_task}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/ReportTask" + } + ]; +} + +// A request to list all report tasks for a property. +message ListReportTasksRequest { + // Required. All report tasks for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/ReportTask" + } + ]; + + // Optional. The maximum number of report tasks to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReportTasks` call. + // Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all report tasks for a property. +message ListReportTasksResponse { + // Each report task for a property. + repeated ReportTask report_tasks = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// The request to generate a report. +message RunReportRequest { + // Required. A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The dimensions requested and displayed. + repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metrics requested and displayed. + repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. In a cohort request, + // this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters let you ask for only specific dimension values + // in the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter clause of metrics. Applied after aggregating the + // report's rows, similar to SQL having-clause. Dimensions cannot be used in + // this filter. + FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of rows to return. If unspecified, 10,000 rows + // are returned. The API returns a maximum of 250,000 rows per request, no + // matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregation of metrics. Aggregated metric values will be shown in + // rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + // Aggregates including both comparisons and multiple date ranges will + // be aggregated based on the date ranges. + repeated MetricAggregation metric_aggregations = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how rows are ordered in the response. + // Requests including both comparisons and multiple date ranges will + // have order bys applied on the comparisons. + repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cohort group associated with this request. If there is a cohort + // group in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If false or unspecified, each row with all metrics equal to 0 + // will not be returned. If true, these rows will be returned if they are not + // separately removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Toggles whether to return the current state of this Google + // Analytics property's quota. Quota is returned in + // [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration of comparisons requested and displayed. The + // request only requires a comparisons field in order to receive a comparison + // column in the response. + repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls conversion reporting. This field is optional. If this + // field is set or any conversion metrics are requested, the report will be a + // conversion report. + ConversionSpec conversion_spec = 16 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result, regardless of the number of + // rows returned in the response. For example if a query returns 175 rows and + // includes limit = 50 in the API request, the response will contain row_count + // = 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 9; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runReport". Useful to distinguish between + // response types in JSON. + string kind = 10; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 11; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The dimensions, metrics and comparisons currently accepted in reporting +// methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; + + // The comparison descriptions. + repeated ComparisonMetadata comparisons = 4; + + // The conversion descriptions. + repeated ConversionMetadata conversions = 5; +} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto new file mode 100644 index 000000000000..629c34ca7f1a --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto @@ -0,0 +1,1814 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.data.v1alpha; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1alpha"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// Defines an individual comparison. Most requests will include multiple +// comparisons so that the report compares between the comparisons. +message Comparison { + // Each comparison produces separate rows in the response. In the response, + // this comparison is identified by this name. If name is unspecified, we will + // use the saved comparisons display name. + optional string name = 1; + + oneof one_comparison { + // A basic comparison. + FilterExpression dimension_filter = 2; + + // A saved comparison identified by the comparison's resource name. + // For example, 'comparisons/1234'. + string comparison = 3; + } +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The dimension name or metric name. Must be a name defined in dimensions + // or metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 2; + + // A filter for in list values. + InListFilter in_list_filter = 3; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 4; + + // A filter for between two values. + BetweenFilter between_filter = 5; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 6; + } +} + +// The filter for string +message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; +} + +// The result needs to be in a list of string values. +message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; +} + +// Filters for numeric or date values. +message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// To express that the result needs to be between two numbers (inclusive). +message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; +} + +// Filter for empty values. +message EmptyFilter {} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Identifies if the report data is from the standard report data or +// conversion data +enum Section { + // Should never be specified. + SECTION_UNSPECIFIED = 0; + + // The report data is from the standard report data. Google Analytics reports + // include acquisition, engagement, and user behavior reports. Reports use + // dimensions like session source & landing page; reports use metrics like + // sessions, views, and engagement time. + SECTION_REPORT = 1; + + // The report data is from the conversion data. The Google Analytics + // Advertising section reports on conversion performance. Advertising reports + // use dimensions like source & medium; advertising reports use metrics like + // all conversions and ads cost. + SECTION_ADVERTISING = 2; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630) and [About + // Demographics and + // Interests](https://support.google.com/analytics/answer/2799357). + optional bool subject_to_thresholding = 8; + + // If this report results is + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; + + // Identifies the type of data in the report. + Section section = 10; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} + +// Breakdowns add a dimension to the funnel table sub report response. +message FunnelBreakdown { + // The dimension column added to the funnel table sub report response. The + // breakdown dimension breaks down each funnel step. A valid + // `breakdownDimension` is required if `funnelBreakdown` is specified. + Dimension breakdown_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 15. + optional int64 limit = 2; +} + +// Next actions state the value for a dimension after the user has achieved +// a step but before the same user has achieved the next step. For example if +// the `nextActionDimension` is `eventName`, then `nextActionDimension` in the +// `i`th funnel step row will return first event after the event that qualified +// the user into the `i`th funnel step but before the user achieved the `i+1`th +// funnel step. +message FunnelNextAction { + // The dimension column added to the funnel visualization sub report response. + // The next action dimension returns the next dimension value of this + // dimension after the user has attained the `i`th funnel step. + // + // `nextActionDimension` currently only supports `eventName` and most Page / + // Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + // cannot be a dimension expression. + Dimension next_action_dimension = 1; + + // The maximum number of distinct values of the breakdown dimension to return + // in the response. A `limit` of `5` is used if limit is not specified. Limit + // must exceed zero and cannot exceed 5. + optional int64 limit = 2; +} + +// Configures the funnel in a funnel report request. A funnel reports on users +// as they pass through a sequence of steps. +// +// Funnel exploration lets you visualize the steps your users take to complete a +// task and quickly see how well they are succeeding or failing at each step. +// For example, how do prospects become shoppers and then become buyers? How do +// one time buyers become repeat buyers? With this information, you can improve +// inefficient or abandoned customer journeys. +message Funnel { + // In an open funnel, users can enter the funnel in any step, and in a closed + // funnel, users must enter the funnel in the first step. Optional. If + // unspecified, a closed funnel is used. + bool is_open_funnel = 1; + + // The sequential steps of this funnel. + repeated FunnelStep steps = 2; +} + +// Steps define the user journey you want to measure. Steps contain one or +// more conditions that your users must meet to be included in that step of +// the funnel journey. +message FunnelStep { + // The distinctive name for this step. If unspecified, steps will be named + // by a 1 based indexed name (for example "0. ", "1. ", etc.). This name + // defines string value returned by the `funnelStepName` dimension. For + // example, specifying `name = Purchase` in the request's third funnel step + // will produce `3. Purchase` in the funnel report response. + string name = 1; + + // If true, this step must directly follow the previous step. If false, + // there can be events between the previous step and this step. If + // unspecified, `isDirectlyFollowedBy` is treated as false. + bool is_directly_followed_by = 2; + + // If specified, this step must complete within this duration of the + // completion of the prior step. `withinDurationFromPriorStep` is inclusive + // of the endpoint at the microsecond granularity. For example a duration of + // 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 + // microsecond. + // + // `withinDurationFromPriorStep` is optional, and if unspecified, steps may + // be separated by any time duration. + optional google.protobuf.Duration within_duration_from_prior_step = 3; + + // The condition that your users must meet to be included in this step of + // the funnel journey. + FunnelFilterExpression filter_expression = 4; +} + +// Funnel sub reports contain the dimension and metric data values. For example, +// 12 users reached the second step of the funnel. +message FunnelSubReport { + // Describes dimension columns. Funnel reports always include the funnel step + // dimension in sub report responses. Additional dimensions like breakdowns, + // dates, and next actions may be present in the response if requested. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. Funnel reports always include active users in sub + // report responses. The funnel table includes additional metrics like + // completion rate, abandonments, and abandonments rate. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // Metadata for the funnel report. + FunnelResponseMetadata metadata = 4; +} + +// User segments are subsets of users who engaged with your site or app. For +// example, users who have previously purchased; users who added items to their +// shopping carts, but didn’t complete a purchase. +message UserSegment { + // Defines which users are included in this segment. Optional. + UserSegmentCriteria user_inclusion_criteria = 1; + + // Defines which users are excluded in this segment. Optional. + UserSegmentExclusion exclusion = 2; +} + +// A user matches a criteria if the user's events meet the conditions in the +// criteria. +message UserSegmentCriteria { + // A user matches this criteria if the user matches each of these + // `andConditionGroups` and each of the `andSequenceGroups`. + // `andConditionGroups` may be empty if `andSequenceGroups` are specified. + repeated UserSegmentConditionGroup and_condition_groups = 1; + + // A user matches this criteria if the user matches each of these + // `andSequenceGroups` and each of the `andConditionGroups`. + // `andSequenceGroups` may be empty if `andConditionGroups` are specified. + repeated UserSegmentSequenceGroup and_sequence_groups = 2; +} + +// Scoping specifies which events are considered when evaluating if a user +// meets a criteria. +enum UserCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + USER_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the user matches the + // criteria. + USER_CRITERIA_WITHIN_SAME_SESSION = 2; + + // If the criteria is satisfied by any events for the user, the user + // matches the criteria. + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message UserSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this user. For example if `conditionScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a single + // event, and then, the condition group is determined to be matched or not for + // this user. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Define conditions that must occur in a specific order for the user to be +// a member of the segment. +message UserSegmentSequenceGroup { + // All sequence steps must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_SESSION`, all sequence steps must complete within + // one session for the user to match the sequence. `sequenceScoping = + // USER_CRITERIA_WITHIN_SAME_EVENT` is not supported. + // + // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is + // used. + UserCriteriaScoping sequence_scoping = 1; + + // Defines the time period in which the whole sequence must occur; for + // example, 30 Minutes. `sequenceMaximumDuration` is inclusive + // of the endpoint at the microsecond granularity. For example a sequence + // with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 + // seconds, but not 5 seconds and 1 microsecond. + // + // `sequenceMaximumDuration` is optional, and if unspecified, sequences can + // be completed in any time duration. + google.protobuf.Duration sequence_maximum_duration = 2; + + // An ordered sequence of condition steps. A user's events must complete + // each step in order for the user to match the + // `UserSegmentSequenceGroup`. + repeated UserSequenceStep user_sequence_steps = 3; +} + +// A condition that must occur in the specified step order for this user +// to match the sequence. +message UserSequenceStep { + // If true, the event satisfying this step must be the very next event + // after the event satifying the last step. If false, this step indirectly + // follows the prior step; for example, there may be events between the + // prior step and this step. `isDirectlyFollowedBy` must be false for + // the first step. + bool is_directly_followed_by = 1; + + // This sequence step must be satisfied in the scoping for the user to + // match the sequence. For example if `sequenceScoping = + // WITHIN_SAME_SESSION`, this sequence steps must complete within one + // session for the user to match the sequence. `stepScoping = + // ACROSS_ALL_SESSIONS` is only allowed if the `sequenceScoping = + // ACROSS_ALL_SESSIONS`. + // + // Optional. If unspecified, `stepScoping` uses the same + // `UserCriteriaScoping` as the `sequenceScoping`. + UserCriteriaScoping step_scoping = 2; + + // A user matches this sequence step if their events match this + // expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 3; +} + +// Specifies which users are excluded in this segment. +message UserSegmentExclusion { + // Specifies how long an exclusion will last if a user matches the + // `userExclusionCriteria`. + // + // Optional. If unspecified, `userExclusionDuration` of + // `USER_EXCLUSION_TEMPORARY` is used. + UserExclusionDuration user_exclusion_duration = 1; + + // If a user meets this condition, the user is excluded from membership in + // the segment for the `userExclusionDuration`. + UserSegmentCriteria user_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a user matches +// the `userExclusionCriteria`. +enum UserExclusionDuration { + // Unspecified exclusion duration. Do not specify. + USER_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude users from the segment during periods when the + // user meets the `userExclusionCriteria` condition. + USER_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude users from the segment if the user ever meets the + // `userExclusionCriteria` condition. + USER_EXCLUSION_PERMANENT = 2; +} + +// Session segments are subsets of the sessions that occurred on your site or +// app: for example, all the sessions that originated from a particular +// advertising campaign. +message SessionSegment { + // Defines which sessions are included in this segment. Optional. + SessionSegmentCriteria session_inclusion_criteria = 1; + + // Defines which sessions are excluded in this segment. Optional. + SessionSegmentExclusion exclusion = 2; +} + +// A session matches a criteria if the session's events meet the conditions in +// the criteria. +message SessionSegmentCriteria { + // A session matches this criteria if the session matches each of these + // `andConditionGroups`. + repeated SessionSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if a +// session meets a criteria. +enum SessionCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the session matches the + // criteria. + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1; + + // If the criteria is satisfied within one session, the session matches + // the criteria. + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message SessionSegmentConditionGroup { + // Data is included or excluded from the segment based on if it matches + // the condition group. This scoping defines how many events the + // `segmentFilterExpression` is evaluated on before the condition group + // is determined to be matched or not. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all + // events in a session, and then, the condition group is determined to be + // matched or not for this session. For example if `conditionScoping = + // SESSION_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a + // single event, and then, the condition group is determined to be matched or + // not for this session. + // + // Optional. If unspecified, a `conditionScoping` of `WITHIN_SAME_SESSION` + // is used. + SessionCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which sessions are excluded in this segment. +message SessionSegmentExclusion { + // Specifies how long an exclusion will last if a session matches the + // `sessionExclusionCriteria`. + // + // Optional. If unspecified, a `sessionExclusionDuration` of + // `SESSION_EXCLUSION_TEMPORARY` is used. + SessionExclusionDuration session_exclusion_duration = 1; + + // If a session meets this condition, the session is excluded from + // membership in the segment for the `sessionExclusionDuration`. + SessionSegmentCriteria session_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if a session +// matches the `sessionExclusionCriteria`. +enum SessionExclusionDuration { + // Unspecified exclusion duration. Do not specify. + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Temporarily exclude sessions from the segment during periods when the + // session meets the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_TEMPORARY = 1; + + // Permanently exclude sessions from the segment if the session ever meets + // the `sessionExclusionCriteria` condition. + SESSION_EXCLUSION_PERMANENT = 2; +} + +// Event segments are subsets of events that were triggered on your site or app. +// for example, all purchase events made in a particular location; app_exception +// events that occurred on a specific operating system. +message EventSegment { + // Defines which events are included in this segment. Optional. + EventSegmentCriteria event_inclusion_criteria = 1; + + // Defines which events are excluded in this segment. Optional. + EventSegmentExclusion exclusion = 2; +} + +// An event matches a criteria if the event meet the conditions in the +// criteria. +message EventSegmentCriteria { + // An event matches this criteria if the event matches each of these + // `andConditionGroups`. + repeated EventSegmentConditionGroup and_condition_groups = 1; +} + +// Scoping specifies which events are considered when evaluating if an event +// meets a criteria. +enum EventCriteriaScoping { + // Unspecified criteria scoping. Do not specify. + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0; + + // If the criteria is satisfied within one event, the event matches the + // criteria. + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1; +} + +// Conditions tell Analytics what data to include in or exclude from the +// segment. +message EventSegmentConditionGroup { + // `conditionScoping` should always be `EVENT_CRITERIA_WITHIN_SAME_EVENT`. + // + // Optional. If unspecified, a `conditionScoping` of + // `EVENT_CRITERIA_WITHIN_SAME_EVENT` is used. + EventCriteriaScoping condition_scoping = 1; + + // Data is included or excluded from the segment based on if it matches + // this expression. Expressions express criteria on dimension, metrics, + // and/or parameters. + SegmentFilterExpression segment_filter_expression = 2; +} + +// Specifies which events are excluded in this segment. +message EventSegmentExclusion { + // `eventExclusionDuration` should always be `PERMANENTLY_EXCLUDE`. + // + // Optional. If unspecified, an `eventExclusionDuration` of + // `EVENT_EXCLUSION_PERMANENT` is used. + EventExclusionDuration event_exclusion_duration = 1; + + // If an event meets this condition, the event is excluded from membership + // in the segment for the `eventExclusionDuration`. + EventSegmentCriteria event_exclusion_criteria = 2; +} + +// Enumerates options for how long an exclusion will last if an event +// matches the `eventExclusionCriteria`. +enum EventExclusionDuration { + // Unspecified exclusion duration. Do not specify. + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0; + + // Permanently exclude events from the segment if the event ever meets + // the `eventExclusionCriteria` condition. + EVENT_EXCLUSION_PERMANENT = 1; +} + +// A segment is a subset of your Analytics data. For example, of your entire set +// of users, one segment might be users from a particular country or city. +// Another segment might be users who purchase a particular line of products or +// who visit a specific part of your site or trigger certain events in your app. +// +// To learn more, see [Segment +// Builder](https://support.google.com/analytics/answer/9304353). +message Segment { + // The name for this segment. If unspecified, segments are named "Segment". + // This name defines string value returned by the `segment` dimension. The + // `segment` dimension prefixes segment names by the 1-based index number of + // the segment in the request (for example "1. Segment", "2. Segment", etc.). + string name = 1; + + // A segment is specified in one scope. + oneof one_segment_scope { + // User segments are subsets of users who engaged with your site or app. + UserSegment user_segment = 2; + + // Session segments are subsets of the sessions that occurred on your site + // or app. + SessionSegment session_segment = 3; + + // Event segments are subsets of events that were triggered on your site or + // app. + EventSegment event_segment = 4; + } +} + +// Expresses combinations of segment filters. +message SegmentFilterExpression { + // Specify one type of filter for `SegmentFilterExpression`. + oneof expr { + // The SegmentFilterExpression in `andGroup` have an AND relationship. + SegmentFilterExpressionList and_group = 1; + + // The SegmentFilterExpression in `orGroup` have an OR relationship. + SegmentFilterExpressionList or_group = 2; + + // The SegmentFilterExpression is NOT of `notExpression`. + SegmentFilterExpression not_expression = 3; + + // A primitive segment filter. + SegmentFilter segment_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + SegmentEventFilter segment_event_filter = 5; + } +} + +// A list of segment filter expressions. +message SegmentFilterExpressionList { + // The list of segment filter expressions + repeated SegmentFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message SegmentFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentFilterScoping filter_scoping = 8; +} + +// Scopings specify how the dimensions & metrics of multiple events +// should be considered when evaluating a segment filter. +message SegmentFilterScoping { + // If `atAnyPointInTime` is true, this filter evaluates to true for all + // events if it evaluates to true for any event in the date range of the + // request. + // + // This `atAnyPointInTime` parameter does not extend the date range of + // events in the report. If `atAnyPointInTime` is true, only events within + // the report's date range are considered when evaluating this filter. + // + // This `atAnyPointInTime` is only able to be specified if the criteria + // scoping is `ACROSS_ALL_SESSIONS` and is not able to be specified in + // sequences. + // + // If the criteria scoping is `ACROSS_ALL_SESSIONS`, `atAnyPointInTime` = + // false is used if unspecified. + optional bool at_any_point_in_time = 1; +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message SegmentEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional SegmentParameterFilterExpression + segment_parameter_filter_expression = 2; +} + +// Expresses combinations of segment filter on parameters. +message SegmentParameterFilterExpression { + // Specify one type of filter for `SegmentParameterFilterExpression`. + oneof expr { + // The SegmentParameterFilterExpression in `andGroup` have an AND + // relationship. + SegmentParameterFilterExpressionList and_group = 1; + + // The SegmentParameterFilterExpression in `orGroup` have an OR + // relationship. + SegmentParameterFilterExpressionList or_group = 2; + + // The SegmentParameterFilterExpression is NOT of `notExpression`. + SegmentParameterFilterExpression not_expression = 3; + + // A primitive segment parameter filter. + SegmentParameterFilter segment_parameter_filter = 4; + } +} + +// A list of segment parameter filter expressions. +message SegmentParameterFilterExpressionList { + // The list of segment parameter filter expressions. + repeated SegmentParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a segment. +message SegmentParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } + + // Specifies the scope for the filter. + SegmentParameterFilterScoping filter_scoping = 8; +} + +// Scopings specify how multiple events should be considered when evaluating a +// segment parameter filter. +message SegmentParameterFilterScoping { + // Accumulates the parameter over the specified period of days before + // applying the filter. Only supported if criteria scoping is + // `ACROSS_ALL_SESSIONS` or `WITHIN_SAME_SESSION`. Only supported if the + // parameter is `event_count`. + // + // For example if `inAnyNDayPeriod` is 3, the event_name is "purchase", + // the event parameter is "event_count", and the Filter's criteria is + // greater than 5, this filter will accumulate the event count of purchase + // events over every 3 consecutive day period in the report's date range; a + // user will pass this Filter's criteria to be included in this segment if + // their count of purchase events exceeds 5 in any 3 consecutive day period. + // For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to + // 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered. + // + // The date range is not extended for the purpose of having a full N day + // window near the start of the date range. For example if a report is for + // 2021-11-01 to 2021-11-10 and `inAnyNDayPeriod` = 3, the first two day + // period will be effectively shortened because no event data outside the + // report's date range will be read. For example, the first four periods + // will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, + // 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04. + // + // `inAnyNDayPeriod` is optional. If not specified, the + // `segmentParameterFilter` is applied to each event individually. + optional int64 in_any_n_day_period = 1; +} + +// Expresses combinations of funnel filters. +message FunnelFilterExpression { + // Specify one type of filter for `FunnelFilterExpression`. + oneof expr { + // The FunnelFilterExpression in `andGroup` have an AND relationship. + FunnelFilterExpressionList and_group = 1; + + // The FunnelFilterExpression in `orGroup` have an OR relationship. + FunnelFilterExpressionList or_group = 2; + + // The FunnelFilterExpression is NOT of `notExpression`. + FunnelFilterExpression not_expression = 3; + + // A funnel filter for a dimension or metric. + FunnelFieldFilter funnel_field_filter = 4; + + // Creates a filter that matches events of a single event name. If a + // parameter filter expression is specified, only the subset of events that + // match both the single event name and the parameter filter expressions + // match this event filter. + FunnelEventFilter funnel_event_filter = 5; + } +} + +// A list of funnel filter expressions. +message FunnelFilterExpressionList { + // The list of funnel filter expressions. + repeated FunnelFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message FunnelFieldFilter { + // The dimension name or metric name. + string field_name = 1; + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// Creates a filter that matches events of a single event name. If a parameter +// filter expression is specified, only the subset of events that match both the +// single event name and the parameter filter expressions match this event +// filter. +message FunnelEventFilter { + // This filter matches events of this single event name. Event name is + // required. + optional string event_name = 1; + + // If specified, this filter matches events that match both the single event + // name and the parameter filter expressions. + // + // Inside the parameter filter expression, only parameter filters are + // available. + optional FunnelParameterFilterExpression funnel_parameter_filter_expression = + 2; +} + +// Expresses combinations of funnel filters on parameters. +message FunnelParameterFilterExpression { + // Specify one type of filter for `FunnelParameterFilterExpression`. + oneof expr { + // The FunnelParameterFilterExpression in `andGroup` have an AND + // relationship. + FunnelParameterFilterExpressionList and_group = 1; + + // The FunnelParameterFilterExpression in `orGroup` have an OR + // relationship. + FunnelParameterFilterExpressionList or_group = 2; + + // The FunnelParameterFilterExpression is NOT of `notExpression`. + FunnelParameterFilterExpression not_expression = 3; + + // A primitive funnel parameter filter. + FunnelParameterFilter funnel_parameter_filter = 4; + } +} + +// A list of funnel parameter filter expressions. +message FunnelParameterFilterExpressionList { + // The list of funnel parameter filter expressions. + repeated FunnelParameterFilterExpression expressions = 1; +} + +// An expression to filter parameter values in a funnel. +message FunnelParameterFilter { + // The field that is being filtered. + oneof one_parameter { + // This filter will be evaluated on the specified event parameter. Event + // parameters are logged as parameters of the event. Event parameters + // include fields like "firebase_screen" & "currency". + // + // Event parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + string event_parameter_name = 1; + + // This filter will be evaluated on the specified item parameter. Item + // parameters are logged as parameters in the item array. Item parameters + // include fields like "item_name" & "item_category". + // + // Item parameters can only be used in segments & funnels and can only be + // used in a descendent filter from an EventFilter. In a descendent filter + // from an EventFilter either event or item parameters should be used. + // + // Item parameters are only available in ecommerce events. To learn more + // about ecommerce events, see the [Measure ecommerce] + // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) + // guide. + string item_parameter_name = 2; + } + + // Specify one type of filter. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 4; + + // A filter for in list values. + InListFilter in_list_filter = 5; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 6; + + // A filter for between two values. + BetweenFilter between_filter = 7; + } +} + +// The funnel report's response metadata carries additional information about +// the funnel report. +message FunnelResponseMetadata { + // If funnel report results are + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes what percentage of events were used in this funnel report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 1; +} + +// If funnel report results are +// [sampled](https://support.google.com/analytics/answer/13331292), this +// metadata describes what percentage of events were used in this funnel +// report for a date range. Sampling is the practice of analyzing a subset of +// all data in order to uncover the meaningful information in the larger data +// set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this funnel report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this funnel report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // funnel report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// Categories of sampling levels for the requests. +enum SamplingLevel { + // Unspecified type. + SAMPLING_LEVEL_UNSPECIFIED = 0; + + // Applies a sampling level of 10 million to standard properties and + // 100 million to Google Analytics 360 properties. + LOW = 1; + + // Exclusive to Google Analytics 360 properties with a sampling level of 1 + // billion. + MEDIUM = 2; + + // Exclusive to Google Analytics 360 properties. Unsampled explorations are + // more accurate and can reveal insights that aren't visible in standard + // explorations. To learn more, see + // https://support.google.com/analytics/answer/10896953. + UNSAMPLED = 3; +} + +// Controls conversion reporting. +// +// +message ConversionSpec { + // Attribution model to use in the Conversion Report + enum AttributionModel { + // Unspecified attribution model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0; + + // Attribution was based on the paid and organic data driven model + DATA_DRIVEN = 1; + + // Attribution was based on the paid and organic last click model + LAST_CLICK = 2; + } + + // The conversion action IDs to include in the report. If empty, all + // conversions are included. Valid conversion action IDs can be retrieved from + // the `conversion_action` field within the `conversions` list in the + // response of the `GetMetadata` method. For example, + // 'conversionActions/1234'. + repeated string conversion_actions = 1; + + // The attribution model to use in the Conversion Report. If unspecified, + // `DATA_DRIVEN` is used. + AttributionModel attribution_model = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Usable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is custom to this property. This includes user, + // event, & item scoped custom dimensions; to learn more about custom + // dimensions, see https://support.google.com/analytics/answer/14240153. This + // also include custom channel groups; to learn more about custom channel + // groups, see https://support.google.com/analytics/answer/13051316. + bool custom_definition = 5; + + // The display name of the category that this dimension belongs to. Similar + // dimensions and metrics are categorized together. + string category = 6; + + // Specifies the Google Analytics sections this dimension applies to. + repeated Section sections = 7; +} + +// Explains a metric. +message MetricMetadata { + // Justifications for why this metric is blocked. + enum BlockedReason { + // Will never be specified in API response. + BLOCKED_REASON_UNSPECIFIED = 0; + + // If present, your access is blocked to revenue related metrics for this + // property, and this metric is revenue related. + NO_REVENUE_METRICS = 1; + + // If present, your access is blocked to cost related metrics for this + // property, and this metric is cost related. + NO_COST_METRICS = 2; + } + + // A metric name. Usable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; + + // If reasons are specified, your access is blocked to this metric for this + // property. API requests from you to this property for this metric will + // succeed; however, the report will contain only zeros for this metric. API + // requests with metric filters on blocked metrics will fail. If reasons are + // empty, you have access to this metric. + // + // To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + repeated BlockedReason blocked_reasons = 8; + + // The display name of the category that this metrics belongs to. Similar + // dimensions and metrics are categorized together. + string category = 9; + + // Specifies the Google Analytics sections this metric applies to. + repeated Section sections = 10; +} + +// The metadata for a single comparison. +message ComparisonMetadata { + // This comparison's resource name. Usable in [Comparison](#Comparison)'s + // `comparison` field. For example, 'comparisons/1234'. + string api_name = 1; + + // This comparison's name within the Google Analytics user interface. + string ui_name = 2; + + // This comparison's description. + string description = 3; +} + +// The metadata for a single conversion. +// +// +message ConversionMetadata { + // The unique identifier of the conversion action. This ID is used to specify + // which conversions to include in a report by populating the + // `conversion_actions` field in the `ConversionsSpec` of a report request. + // For example, 'conversionActions/1234'. + string conversion_action = 1; + + // This conversion's name within the Google Analytics user interface. + string display_name = 2; +} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto new file mode 100644 index 000000000000..7bb264ea5ac7 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto @@ -0,0 +1,1001 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.data.v1beta; + +import "google/analytics/data/v1beta/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1beta"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Google Analytics reporting data service. +service BetaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + // + // For a guide to constructing requests & understanding responses, see + // [Creating a + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns a customized pivot report of your Google Analytics event data. + // Pivot reports are more advanced and expressive formats than regular + // reports. In a pivot report, dimensions are only visible if they are + // included in a pivot. Multiple pivots can be specified to further dissect + // your data. + rpc RunPivotReport(RunPivotReportRequest) returns (RunPivotReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runPivotReport" + body: "*" + }; + } + + // Returns multiple reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunReports(BatchRunReportsRequest) + returns (BatchRunReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunReports" + body: "*" + }; + } + + // Returns multiple pivot reports in a batch. All reports must be for the same + // Google Analytics property. + rpc BatchRunPivotReports(BatchRunPivotReportsRequest) + returns (BatchRunPivotReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunPivotReports" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics property identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a customized report of realtime event data for your property. + // Events appear in realtime reports seconds after they have been sent to + // the Google Analytics. Realtime reports show events and usage data for the + // periods of time ranging from the present moment to 30 minutes ago (up to + // 60 minutes for Google Analytics 360 properties). + // + // For a guide to constructing realtime requests & understanding responses, + // see [Creating a Realtime + // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + rpc RunRealtimeReport(RunRealtimeReportRequest) + returns (RunRealtimeReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runRealtimeReport" + body: "*" + }; + } + + // This compatibility method lists dimensions and metrics that can be added to + // a report request and maintain compatibility. This method fails if the + // request's dimensions and metrics are incompatible. + // + // In Google Analytics, reports fail if they request incompatible dimensions + // and/or metrics; in that case, you will need to remove dimensions and/or + // metrics from the incompatible report until the report is compatible. + // + // The Realtime and Core reports have different compatibility rules. This + // method checks compatibility for Core reports. + rpc CheckCompatibility(CheckCompatibilityRequest) + returns (CheckCompatibilityResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:checkCompatibility" + body: "*" + }; + } + + // Creates an audience export for later retrieval. This method quickly returns + // the audience export's resource name and initiates a long running + // asynchronous request to form an audience export. To export the users in an + // audience export, first create the audience export through this method and + // then send the audience resource name to the `QueryAudienceExport` method. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // An audience export is a snapshot of the users currently in the audience at + // the time of audience export creation. Creating audience exports for one + // audience on different days will return different results as users enter and + // exit the audience. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. Audience exports + // contain the users in each audience. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc CreateAudienceExport(CreateAudienceExportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/audienceExports" + body: "audience_export" + }; + option (google.api.method_signature) = "parent,audience_export"; + option (google.longrunning.operation_info) = { + response_type: "AudienceExport" + metadata_type: "AudienceExportMetadata" + }; + } + + // Retrieves an audience export of users. After creating an audience, the + // users are not immediately available for exporting. First, a request to + // `CreateAudienceExport` is necessary to create an audience export of users, + // and then second, this method is used to retrieve the users in the audience + // export. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audiences in Google Analytics 4 allow you to segment your users in the ways + // that are important to your business. To learn more, see + // https://support.google.com/analytics/answer/9267572. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc QueryAudienceExport(QueryAudienceExportRequest) + returns (QueryAudienceExportResponse) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/audienceExports/*}:query" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets configuration metadata about a specific audience export. This method + // can be used to understand an audience export after it has been created. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc GetAudienceExport(GetAudienceExportRequest) returns (AudienceExport) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/audienceExports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all audience exports for a property. This method can be used for you + // to find and reuse existing audience exports rather than creating + // unnecessary new audience exports. The same audience can have multiple + // audience exports that represent the export of users that were in an + // audience on different days. + // + // See [Creating an Audience + // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + // for an introduction to Audience Exports with examples. + // + // Audience Export APIs have some methods at alpha and other methods at beta + // stability. The intention is to advance methods to beta stability after some + // feedback and adoption. To give your feedback on this API, complete the + // [Google Analytics Audience Export API + // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + rpc ListAudienceExports(ListAudienceExportsRequest) + returns (ListAudienceExportsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/audienceExports" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The request for compatibility information for a report's dimensions and +// metrics. Check compatibility provides a preview of the compatibility of a +// report; fields shared with the `runReport` request should be the same values +// as in your `runReport` request. +message CheckCompatibilityRequest { + // A Google Analytics property identifier whose events are tracked. To + // learn more, see [where to find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // `property` should be the same value as in your `runReport` request. + // + // Example: properties/1234 + string property = 1; + + // The dimensions in this report. `dimensions` should be the same value as in + // your `runReport` request. + repeated Dimension dimensions = 2; + + // The metrics in this report. `metrics` should be the same value as in your + // `runReport` request. + repeated Metric metrics = 3; + + // The filter clause of dimensions. `dimensionFilter` should be the same value + // as in your `runReport` request. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. `metricFilter` should be the same value as in + // your `runReport` request + FilterExpression metric_filter = 5; + + // Filters the dimensions and metrics in the response to just this + // compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + // to only return compatible dimensions & metrics. + Compatibility compatibility_filter = 6; +} + +// The compatibility response with the compatibility of each dimension & metric. +message CheckCompatibilityResponse { + // The compatibility of each dimension. + repeated DimensionCompatibility dimension_compatibilities = 1; + + // The compatibility of each metric. + repeated MetricCompatibility metric_compatibilities = 2; +} + +// The dimensions, metrics and comparisons currently accepted in reporting +// methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; + + // The comparison descriptions. + repeated ComparisonMetadata comparisons = 4; +} + +// The request to generate a report. +message RunReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // Date ranges of data to read. If multiple date ranges are requested, each + // response row will contain a zero based date range index. If two date + // ranges overlap, the event data for the overlapping days is included in the + // response rows for both date ranges. In a cohort request, this `dateRanges` + // must be unspecified. + repeated DateRange date_ranges = 4; + + // Dimension filters let you ask for only specific dimension values in + // the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5; + + // The filter clause of metrics. Applied after aggregating the report's rows, + // similar to SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 6; + + // The row count of the start row. The first row is counted as row 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + // Aggregates including both comparisons and multiple date ranges will + // be aggregated based on the date ranges. + repeated MetricAggregation metric_aggregations = 9; + + // Specifies how rows are ordered in the response. + // Requests including both comparisons and multiple date ranges will + // have order bys applied on the comparisons. + repeated OrderBy order_bys = 10; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14; + + // Optional. The configuration of comparisons requested and displayed. The + // request only requires a comparisons field in order to receive a comparison + // column in the response. + repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 9; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runReport". Useful to distinguish between + // response types in JSON. + string kind = 10; +} + +// The request to generate a pivot report. +message RunPivotReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested. All defined dimensions must be used by one of the + // following: dimension_expression, dimension_filter, pivots, order_bys. + repeated Dimension dimensions = 2; + + // The metrics requested, at least one metric needs to be specified. All + // defined metrics must be used by one of the following: metric_expression, + // metric_filter, order_bys. + repeated Metric metrics = 3; + + // The date range to retrieve event data for the report. If multiple date + // ranges are specified, event data from each date range is used in the + // report. A special dimension with field name "dateRange" can be included in + // a Pivot's field names; if included, the report compares between date + // ranges. In a cohort request, this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4; + + // Describes the visual format of the report's dimensions in columns or rows. + // The union of the fieldNames (dimension names) in all pivots must be a + // subset of dimension names defined in Dimensions. No two pivots can share a + // dimension. A dimension is only visible if it appears in a pivot. + repeated Pivot pivots = 5; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 6; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 7; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 8; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 9; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 10; + + // Toggles whether to return the current state of this Google Analytics + // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 11; + + // Optional. The configuration of comparisons requested and displayed. The + // request requires both a comparisons field and a comparisons dimension to + // receive a comparison column in the response. + repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response pivot report table corresponding to a pivot request. +message RunPivotReportResponse { + // Summarizes the columns and rows created by a pivot. Each pivot in the + // request produces one header in the response. If we have a request like + // this: + // + // "pivots": [{ + // "fieldNames": ["country", + // "city"] + // }, + // { + // "fieldNames": "eventName" + // }] + // + // We will have the following `pivotHeaders` in the response: + // + // "pivotHeaders" : [{ + // "dimensionHeaders": [{ + // "dimensionValues": [ + // { "value": "United Kingdom" }, + // { "value": "London" } + // ] + // }, + // { + // "dimensionValues": [ + // { "value": "Japan" }, + // { "value": "Osaka" } + // ] + // }] + // }, + // { + // "dimensionHeaders": [{ + // "dimensionValues": [{ "value": "session_start" }] + // }, + // { + // "dimensionValues": [{ "value": "scroll" }] + // }] + // }] + repeated PivotHeader pivot_headers = 1; + + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 2; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 3; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 4; + + // Aggregation of metric values. Can be totals, minimums, or maximums. The + // returned aggregations are controlled by the metric_aggregations in the + // pivot. The type of aggregation returned in each row is shown by the + // dimension_values which are set to "RESERVED_". + repeated Row aggregates = 5; + + // Metadata for the report. + ResponseMetaData metadata = 6; + + // This Google Analytics property's quota state including this request. + PropertyQuota property_quota = 7; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runPivotReport". Useful to distinguish between + // response types in JSON. + string kind = 8; +} + +// The batch request containing multiple report requests. +message BatchRunReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate report response. Each + // batch request is allowed up to 5 requests. + repeated RunReportRequest requests = 2; +} + +// The batch response containing multiple reports. +message BatchRunReportsResponse { + // Individual responses. Each response has a separate report request. + repeated RunReportResponse reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunReports". Useful to distinguish between + // response types in JSON. + string kind = 2; +} + +// The batch request containing multiple pivot report requests. +message BatchRunPivotReportsRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunPivotReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate pivot report response. + // Each batch request is allowed up to 5 requests. + repeated RunPivotReportRequest requests = 2; +} + +// The batch response containing multiple pivot reports. +message BatchRunPivotReportsResponse { + // Individual responses. Each response has a separate pivot report request. + repeated RunPivotReportResponse pivot_reports = 1; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#batchRunPivotReports". Useful to distinguish + // between response types in JSON. + string kind = 2; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The request to generate a realtime report. +message RunRealtimeReportRequest { + // A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // The filter clause of dimensions. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Dimensions cannot be used in this filter. + FilterExpression metric_filter = 5; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 250,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + int64 limit = 6; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 7; + + // Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 8; + + // Toggles whether to return the current state of this Google Analytics + // property's Realtime quota. Quota is returned in + // [PropertyQuota](#PropertyQuota). + bool return_property_quota = 9; + + // The minute ranges of event data to read. If unspecified, one minute range + // for the last 30 minutes will be used. If multiple minute ranges are + // requested, each response row will contain a zero based minute range index. + // If two minute ranges overlap, the event data for the overlapping minutes is + // included in the response rows for both minute ranges. + repeated MinuteRange minute_ranges = 10; +} + +// The response realtime report table corresponding to a request. +message RunRealtimeReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response and the `limit` request + // parameter. For example if a query returns 175 rows and includes `limit` + // of 50 in the API request, the response will contain `rowCount` of 175 but + // only 50 rows. + int32 row_count = 7; + + // This Google Analytics property's Realtime quota state including this + // request. + PropertyQuota property_quota = 8; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runRealtimeReport". Useful to distinguish + // between response types in JSON. + string kind = 9; +} + +// A request to retrieve configuration metadata about a specific audience +// export. +message GetAudienceExportRequest { + // Required. The audience export resource name. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; +} + +// A request to list all audience exports for a property. +message ListAudienceExportsRequest { + // Required. All audience exports for this property will be listed in the + // response. Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Optional. The maximum number of audience exports to return. The service may + // return fewer than this value. If unspecified, at most 200 audience exports + // will be returned. The maximum value is 1000 (higher values will be coerced + // to the maximum). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAudienceExports` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudienceExports` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of all audience exports for a property. +message ListAudienceExportsResponse { + // Each audience export for a property. + repeated AudienceExport audience_exports = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 2; +} + +// A request to create a new audience export. +message CreateAudienceExportRequest { + // Required. The parent resource where this audience export will be created. + // Format: `properties/{property}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsdata.googleapis.com/AudienceExport" + } + ]; + + // Required. The audience export to create. + AudienceExport audience_export = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An audience export is a list of users in an audience at the time of the +// list's creation. One audience may have multiple audience exports created for +// different days. +message AudienceExport { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/AudienceExport" + pattern: "properties/{property}/audienceExports/{audience_export}" + plural: "audienceExports" + singular: "audienceExport" + }; + + // The AudienceExport currently exists in this state. + enum State { + // Unspecified state will never be used. + STATE_UNSPECIFIED = 0; + + // The AudienceExport is currently creating and will be available in the + // future. Creating occurs immediately after the CreateAudienceExport call. + CREATING = 1; + + // The AudienceExport is fully created and ready for querying. An + // AudienceExport is updated to active asynchronously from a request; this + // occurs some time (for example 15 minutes) after the initial create call. + ACTIVE = 2; + + // The AudienceExport failed to be created. It is possible that + // re-requesting this audience export will succeed. + FAILED = 3; + } + + // Output only. Identifier. The audience export resource name assigned during + // creation. This resource name identifies this `AudienceExport`. + // + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. The audience resource name. This resource name identifies the + // audience being listed and is shared between the Analytics Data & Admin + // APIs. + // + // Format: `properties/{property}/audiences/{audience}` + string audience = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The descriptive display name for this audience. For example, + // "Purchasers". + string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The dimensions requested and displayed in the query response. + repeated AudienceDimension dimensions = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state for this AudienceExport. + optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when CreateAudienceExport was called and the + // AudienceExport began the `CREATING` state. + optional google.protobuf.Timestamp begin_creating_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total quota tokens charged during creation of the + // AudienceExport. Because this token count is based on activity from the + // `CREATING` state, this tokens charged will be fixed once an AudienceExport + // enters the `ACTIVE` or `FAILED` states. + int32 creation_quota_tokens_charged = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of rows in the AudienceExport result. + optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message is populated when an audience export fails + // during creation. A common reason for such a failure is quota exhaustion. + optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage completed for this audience export ranging + // between 0 to 100. + optional double percentage_completed = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This metadata is currently blank. +message AudienceExportMetadata {} + +// A request to list users in an audience export. +message QueryAudienceExportRequest { + // Required. The name of the audience export to retrieve users from. + // Format: `properties/{property}/audienceExports/{audience_export}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 250,000 rows per request, no matter + // how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A list of users in an audience export. +message QueryAudienceExportResponse { + // Configuration data about AudienceExport being queried. Returned to help + // interpret the audience rows in this response. For example, the dimensions + // in this AudienceExport correspond to the columns in the AudienceRows. + optional AudienceExport audience_export = 1; + + // Rows for each user in an audience export. The number of rows in this + // response will be less than or equal to request's page size. + repeated AudienceRow audience_rows = 2; + + // The total number of rows in the AudienceExport result. `rowCount` is + // independent of the number of rows returned in the response, the `limit` + // request parameter, and the `offset` request parameter. For example if a + // query returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + optional int32 row_count = 3; +} + +// Dimension value attributes for the audience user row. +message AudienceRow { + // Each dimension value attribute for an audience user. One dimension value + // will be added for each dimension column requested. + repeated AudienceDimensionValue dimension_values = 1; +} + +// An audience dimension is a user attribute. Specific user attributed are +// requested and then later returned in the `QueryAudienceExportResponse`. +message AudienceDimension { + // Optional. The API name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The value of a dimension. +message AudienceDimensionValue { + // One kind of dimension value. + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto new file mode 100644 index 000000000000..8cfa6e491f7d --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto @@ -0,0 +1,1082 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.data.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1beta"; + +// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. +// Requests are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., +// `endMinutesAgo`. Requests are allowed up to 2 minute ranges. +message MinuteRange { + // The inclusive start minute for the query as a number of minutes before now. + // For example, `"startMinutesAgo": 29` specifies the report should include + // event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. + // + // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics + // properties can request up to the last 30 minutes of event data + // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to + // the last 60 minutes of event data (`startMinutesAgo <= 59`). + optional int32 start_minutes_ago = 1; + + // The inclusive end minute for the query as a number of minutes before now. + // Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15` + // specifies the report should include event data from prior to 15 minutes + // ago. + // + // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics + // properties can request any minute in the last 30 minutes of event data + // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any + // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`). + optional int32 end_minutes_ago = 2; + + // Assigns a name to this minute range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, minute ranges are named by their zero based index + // in the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, the city could be "Paris" or "New York". +// Requests are allowed up to 9 dimensions. +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression `^[a-zA-Z0-9_]$`. + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See + // [Realtime + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See + // [Funnel + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression `^[a-zA-Z0-9_]$`. + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// Defines an individual comparison. Most requests will include multiple +// comparisons so that the report compares between the comparisons. +message Comparison { + // Each comparison produces separate rows in the response. In the response, + // this comparison is identified by this name. If name is unspecified, we will + // use the saved comparisons display name. + optional string name = 1; + + // One kind of comparison value + oneof one_comparison { + // A basic comparison. + FilterExpression dimension_filter = 2; + + // A saved comparison identified by the comparison's resource name. + // For example, 'comparisons/1234'. + string comparison = 3; + } +} + +// To express dimension or metric filters. The fields in the same +// FilterExpression need to be either all dimensions or all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The filter for string + message StringFilter { + // The match type of a string filter + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; + } + + // The result needs to be in a list of string values. + message InListFilter { + // The list of string values. + // Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; + } + + // Filters for numeric or date values. + message NumericFilter { + // The operation applied to a numeric filter + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; + } + + // To express that the result needs to be between two numbers (inclusive). + message BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; + } + + // Filter for empty values. + message EmptyFilter {} + + // The dimension name or metric name. + // + // In most methods, dimensions & metrics can be used for the first time in + // this field. However in a RunPivotReportRequest, this field must be + // additionally specified by name in the RunPivotReportRequest's dimensions or + // metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 3; + + // A filter for in list values. + InListFilter in_list_filter = 4; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 5; + + // A filter for two values. + BetweenFilter between_filter = 6; + + // A filter for empty values such as "(not set)" and "" values. + EmptyFilter empty_filter = 8; + } +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending event count is one ordering, and ordering rows by +// the event name string is a different ordering. +message OrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Sorts by a pivot column group. + message PivotOrderBy { + // A pair of dimension names and values. Rows with this dimension pivot pair + // are ordered by the metric's value. + // + // For example if pivots = {{"browser", "Chrome"}} and + // metric_name = "Sessions", + // then the rows will be sorted based on Sessions in Chrome. + // + // ---------|----------|----------------|----------|---------------- + // | Chrome | Chrome | Safari | Safari + // ---------|----------|----------------|----------|---------------- + // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions + // ---------|----------|----------------|----------|---------------- + // US | 2 | 2 | 3 | 1 + // ---------|----------|----------------|----------|---------------- + // Canada | 3 | 1 | 4 | 1 + // ---------|----------|----------------|----------|---------------- + message PivotSelection { + // Must be a dimension name from the request. + string dimension_name = 1; + + // Order by only when the named dimension is this value. + string dimension_value = 2; + } + + // In the response to order by, order rows by this column. Must be a metric + // name from the request. + string metric_name = 1; + + // Used to select a dimension name and value pivot. If multiple pivot + // selections are given, the sort occurs on rows where all pivot selection + // dimension name and value pairs match the row's dimension name and value + // pair. + repeated PivotSelection pivot_selections = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + + // Sorts results by a metric's values within a pivot column group. + PivotOrderBy pivot = 3; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// Describes the visible dimension columns and rows in the report response. +message Pivot { + // Dimension names for visible columns in the report response. Including + // "dateRange" produces a date range column; for each row in the response, + // dimension values in the date range column will indicate the corresponding + // date range from the request. + repeated string field_names = 1; + + // Specifies how dimensions are ordered in the pivot. In the first Pivot, the + // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent + // Pivots, the OrderBys determine only PivotDimensionHeader ordering. + // Dimensions specified in these OrderBys must be a subset of + // Pivot.field_names. + repeated OrderBy order_bys = 2; + + // The row count of the start row. The first row is counted as row 0. + int64 offset = 3; + + // The number of unique combinations of dimension values to return in this + // pivot. The `limit` parameter is required. A `limit` of 10,000 is common for + // single pivot requests. + // + // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` + // must not exceed 250,000. For example, a two pivot request with `limit: + // 1000` in each pivot will fail because the product is `1,000,000`. + int64 limit = 4; + + // Aggregate the metrics by dimensions in this pivot using the specified + // metric_aggregations. + repeated MetricAggregation metric_aggregations = 5; +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // The schema restrictions actively enforced in creating this report. To learn + // more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + message SchemaRestrictionResponse { + // A metric actively restricted in creating the report. + message ActiveMetricRestriction { + // The name of the restricted metric. + optional string metric_name = 1; + + // The reason for this metric's restriction. + repeated RestrictedMetricType restricted_metric_types = 2; + } + + // All restrictions actively enforced in creating the report. For example, + // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. + // However, this active response restriction is only populated if the user's + // custom role disallows access to `REVENUE_DATA`. + repeated ActiveMetricRestriction active_metric_restrictions = 1; + } + + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + // + // The metadata parameter dataLossFromOtherRow is populated based on the + // aggregated data table used in the report. The parameter will be accurately + // populated regardless of the filters and limits in the report. + // + // For example, the (other) row could be dropped from the report because the + // request contains a filter on sessionSource = google. This parameter will + // still be populated if data loss from other row was present in the input + // aggregate data used to generate this report. + // + // To learn more, see [About the (other) row and data + // sampling](https://support.google.com/analytics/answer/13208658#reports). + bool data_loss_from_other_row = 3; + + // Describes the schema restrictions actively enforced in creating this + // report. To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + optional SchemaRestrictionResponse schema_restriction_response = 4; + + // The currency code used in this report. Intended to be used in formatting + // currency metrics like `purchaseRevenue` for visualization. If currency_code + // was specified in the request, this response parameter will echo the request + // parameter; otherwise, this response parameter is the property's current + // currency_code. + // + // Currency codes are string encodings of currency types from the ISO 4217 + // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", + // "EUR", "JPY". To learn more, see + // https://support.google.com/analytics/answer/9796179. + optional string currency_code = 5; + + // The property's current timezone. Intended to be used to interpret + // time-based dimensions like `hour` and `minute`. Formatted as strings from + // the IANA Time Zone database (https://www.iana.org/time-zones); for example + // "America/New_York" or "Asia/Tokyo". + optional string time_zone = 6; + + // If empty reason is specified, the report is empty for this reason. + optional string empty_reason = 7; + + // If `subjectToThresholding` is true, this report is subject to thresholding + // and only returns data that meets the minimum aggregation thresholds. It is + // possible for a request to be subject to thresholding thresholding and no + // data is absent from the report, and this happens when all data is above the + // thresholds. To learn more, see [Data + // thresholds](https://support.google.com/analytics/answer/9383630). + optional bool subject_to_thresholding = 8; + + // If this report results is + // [sampled](https://support.google.com/analytics/answer/13331292), this + // describes the percentage of events used in this report. One + // `samplingMetadatas` is populated for each date range. Each + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. + // + // However if the results are not sampled, this field will not be defined. + repeated SamplingMetadata sampling_metadatas = 9; +} + +// If this report results is +// [sampled](https://support.google.com/analytics/answer/13331292), this +// describes the percentage of events used in this report. Sampling is the +// practice of analyzing a subset of all data in order to uncover the meaningful +// information in the larger data set. +message SamplingMetadata { + // The total number of events read in this sampled report for a date range. + // This is the size of the subset this property's data that was analyzed in + // this report. + int64 samples_read_count = 1; + + // The total number of events present in this property's data that could + // have been analyzed in this report for a date range. Sampling + // uncovers the meaningful information about the larger data set, and this + // is the size of the larger data set. + // + // To calculate the percentage of available data that was used in this + // report, compute `samplesReadCount/samplingSpaceSize`. + int64 sampling_space_size = 2; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message DimensionHeader { + // The dimension's name. + string name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Dimensions' values in a single pivot. +message PivotHeader { + // The size is the same as the cardinality of the corresponding dimension + // combinations. + repeated PivotDimensionHeader pivot_dimension_headers = 1; + + // The cardinality of the pivot. The total number of rows for this pivot's + // fields regardless of how the parameters `offset` and `limit` are specified + // in the request. + int32 row_count = 2; +} + +// Summarizes dimension values from a row for this pivot. +message PivotDimensionHeader { + // Values of multiple dimensions in a pivot. + repeated DimensionValue dimension_values = 1; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// Current state of all quotas for this Analytics Property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message PropertyQuota { + // Standard Analytics Properties can use up to 200,000 tokens per day; + // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 40,000 tokens per hour; + // Analytics 360 Properties can use 400,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from all of + // the hourly, daily, and per project hourly quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; + + // Analytics Properties can send up to 120 requests with potentially + // thresholded dimensions per hour. In a batch request, each report request + // is individually counted for this quota if the request contains potentially + // thresholded dimensions. + QuotaStatus potentially_thresholded_requests_per_hour = 5; + + // Analytics Properties can use up to 35% of their tokens per project per + // hour. This amounts to standard Analytics Properties can use up to 14,000 + // tokens per project per hour, and Analytics 360 Properties can use 140,000 + // tokens per project per hour. An API request consumes a single number of + // tokens, and that number is deducted from all of the hourly, daily, and per + // project hourly quotas. + QuotaStatus tokens_per_project_per_hour = 6; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + optional int32 consumed = 1; + + // Quota remaining after this request. + optional int32 remaining = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is custom to this property. This includes user, + // event, & item scoped custom dimensions; to learn more about custom + // dimensions, see https://support.google.com/analytics/answer/14240153. This + // also include custom channel groups; to learn more about custom channel + // groups, see https://support.google.com/analytics/answer/13051316. + bool custom_definition = 5; + + // The display name of the category that this dimension belongs to. Similar + // dimensions and metrics are categorized together. + string category = 7; +} + +// Explains a metric. +message MetricMetadata { + // Justifications for why this metric is blocked. + enum BlockedReason { + // Will never be specified in API response. + BLOCKED_REASON_UNSPECIFIED = 0; + + // If present, your access is blocked to revenue related metrics for this + // property, and this metric is revenue related. + NO_REVENUE_METRICS = 1; + + // If present, your access is blocked to cost related metrics for this + // property, and this metric is cost related. + NO_COST_METRICS = 2; + } + + // A metric name. Useable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; + + // If reasons are specified, your access is blocked to this metric for this + // property. API requests from you to this property for this metric will + // succeed; however, the report will contain only zeros for this metric. API + // requests with metric filters on blocked metrics will fail. If reasons are + // empty, you have access to this metric. + // + // To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + repeated BlockedReason blocked_reasons = 8; + + // The display name of the category that this metrics belongs to. Similar + // dimensions and metrics are categorized together. + string category = 10; +} + +// The metadata for a single comparison. +message ComparisonMetadata { + // This comparison's resource name. Useable in [Comparison](#Comparison)'s + // `comparison` field. For example, 'comparisons/1234'. + string api_name = 1; + + // This comparison's name within the Google Analytics user interface. + string ui_name = 2; + + // This comparison's description. + string description = 3; +} + +// The compatibility for a single dimension. +message DimensionCompatibility { + // The dimension metadata contains the API name for this compatibility + // information. The dimension metadata also contains other helpful information + // like the UI name and description. + optional DimensionMetadata dimension_metadata = 1; + + // The compatibility of this dimension. If the compatibility is COMPATIBLE, + // this dimension can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// The compatibility for a single metric. +message MetricCompatibility { + // The metric metadata contains the API name for this compatibility + // information. The metric metadata also contains other helpful information + // like the UI name and description. + optional MetricMetadata metric_metadata = 1; + + // The compatibility of this metric. If the compatibility is COMPATIBLE, + // this metric can be successfully added to the report. + optional Compatibility compatibility = 2; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} + +// Categories of data that you may be restricted from viewing on certain +// Google Analytics properties. +enum RestrictedMetricType { + // Unspecified type. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Cost metrics such as `adCost`. + COST_DATA = 1; + + // Revenue metrics such as `purchaseRevenue`. + REVENUE_DATA = 2; +} + +// The compatibility types for a single dimension or metric. +enum Compatibility { + // Unspecified compatibility. + COMPATIBILITY_UNSPECIFIED = 0; + + // The dimension or metric is compatible. This dimension or metric can be + // successfully added to a report. + COMPATIBLE = 1; + + // The dimension or metric is incompatible. This dimension or metric cannot be + // successfully added to a report. + INCOMPATIBLE = 2; +} diff --git a/owl-bot-staging/google-analytics-data/protos/protos.d.ts b/owl-bot-staging/google-analytics-data/protos/protos.d.ts new file mode 100644 index 000000000000..5f7a160e8a0d --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/protos.d.ts @@ -0,0 +1,28701 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace analytics. */ + namespace analytics { + + /** Namespace data. */ + namespace data { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Represents an AlphaAnalyticsData */ + class AlphaAnalyticsData extends $protobuf.rpc.Service { + + /** + * Constructs a new AlphaAnalyticsData service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AlphaAnalyticsData service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AlphaAnalyticsData; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunFunnelReportResponse + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback): void; + + /** + * Calls RunFunnelReport. + * @param request RunFunnelReportRequest message or plain object + * @returns Promise + */ + public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest): Promise; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback): void; + + /** + * Calls CreateAudienceList. + * @param request CreateAudienceListRequest message or plain object + * @returns Promise + */ + public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest): Promise; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAudienceListResponse + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback): void; + + /** + * Calls QueryAudienceList. + * @param request QueryAudienceListRequest message or plain object + * @returns Promise + */ + public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest): Promise; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceList + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback): void; + + /** + * Calls GetAudienceList. + * @param request GetAudienceListRequest message or plain object + * @returns Promise + */ + public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest): Promise; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceListsResponse + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback): void; + + /** + * Calls ListAudienceLists. + * @param request ListAudienceListsRequest message or plain object + * @returns Promise + */ + public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest): Promise; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback): void; + + /** + * Calls CreateRecurringAudienceList. + * @param request CreateRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): Promise; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecurringAudienceList + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback): void; + + /** + * Calls GetRecurringAudienceList. + * @param request GetRecurringAudienceListRequest message or plain object + * @returns Promise + */ + public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): Promise; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback): void; + + /** + * Calls ListRecurringAudienceLists. + * @param request ListRecurringAudienceListsRequest message or plain object + * @returns Promise + */ + public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): Promise; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback): void; + + /** + * Calls GetPropertyQuotasSnapshot. + * @param request GetPropertyQuotasSnapshotRequest message or plain object + * @returns Promise + */ + public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): Promise; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback): void; + + /** + * Calls CreateReportTask. + * @param request CreateReportTaskRequest message or plain object + * @returns Promise + */ + public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest): Promise; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryReportTaskResponse + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback): void; + + /** + * Calls QueryReportTask. + * @param request QueryReportTaskRequest message or plain object + * @returns Promise + */ + public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest): Promise; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportTask + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback): void; + + /** + * Calls GetReportTask. + * @param request GetReportTaskRequest message or plain object + * @returns Promise + */ + public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest): Promise; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportTasksResponse + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback): void; + + /** + * Calls ListReportTasks. + * @param request ListReportTasksRequest message or plain object + * @returns Promise + */ + public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest): Promise; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunReportResponse + */ + public runReport(request: google.analytics.data.v1alpha.IRunReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback): void; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @returns Promise + */ + public runReport(request: google.analytics.data.v1alpha.IRunReportRequest): Promise; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Metadata + */ + public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback): void; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @returns Promise + */ + public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest): Promise; + } + + namespace AlphaAnalyticsData { + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @param error Error, if any + * @param [response] RunFunnelReportResponse + */ + type RunFunnelReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunFunnelReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAudienceListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @param error Error, if any + * @param [response] QueryAudienceListResponse + */ + type QueryAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryAudienceListResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @param error Error, if any + * @param [response] AudienceList + */ + type GetAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.AudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @param error Error, if any + * @param [response] ListAudienceListsResponse + */ + type ListAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type CreateRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @param error Error, if any + * @param [response] RecurringAudienceList + */ + type GetRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @param error Error, if any + * @param [response] ListRecurringAudienceListsResponse + */ + type ListRecurringAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @param error Error, if any + * @param [response] PropertyQuotasSnapshot + */ + type GetPropertyQuotasSnapshotCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.PropertyQuotasSnapshot) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReportTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @param error Error, if any + * @param [response] QueryReportTaskResponse + */ + type QueryReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryReportTaskResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @param error Error, if any + * @param [response] ReportTask + */ + type GetReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ReportTask) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @param error Error, if any + * @param [response] ListReportTasksResponse + */ + type ListReportTasksCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListReportTasksResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. + * @param error Error, if any + * @param [response] RunReportResponse + */ + type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. + * @param error Error, if any + * @param [response] Metadata + */ + type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.Metadata) => void; + } + + /** Properties of a CreateRecurringAudienceListRequest. */ + interface ICreateRecurringAudienceListRequest { + + /** CreateRecurringAudienceListRequest parent */ + parent?: (string|null); + + /** CreateRecurringAudienceListRequest recurringAudienceList */ + recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + } + + /** Represents a CreateRecurringAudienceListRequest. */ + class CreateRecurringAudienceListRequest implements ICreateRecurringAudienceListRequest { + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest); + + /** CreateRecurringAudienceListRequest parent. */ + public parent: string; + + /** CreateRecurringAudienceListRequest recurringAudienceList. */ + public recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @param message CreateRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Verifies a CreateRecurringAudienceListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecurringAudienceList. */ + interface IRecurringAudienceList { + + /** RecurringAudienceList name */ + name?: (string|null); + + /** RecurringAudienceList audience */ + audience?: (string|null); + + /** RecurringAudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** RecurringAudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** RecurringAudienceList activeDaysRemaining */ + activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists */ + audienceLists?: (string[]|null); + + /** RecurringAudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents a RecurringAudienceList. */ + class RecurringAudienceList implements IRecurringAudienceList { + + /** + * Constructs a new RecurringAudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRecurringAudienceList); + + /** RecurringAudienceList name. */ + public name: string; + + /** RecurringAudienceList audience. */ + public audience: string; + + /** RecurringAudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** RecurringAudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** RecurringAudienceList activeDaysRemaining. */ + public activeDaysRemaining?: (number|null); + + /** RecurringAudienceList audienceLists. */ + public audienceLists: string[]; + + /** RecurringAudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringAudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRecurringAudienceList): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @param message RecurringAudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Verifies a RecurringAudienceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringAudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RecurringAudienceList; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @param message RecurringAudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RecurringAudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringAudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringAudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebhookNotification. */ + interface IWebhookNotification { + + /** WebhookNotification uri */ + uri?: (string|null); + + /** WebhookNotification channelToken */ + channelToken?: (string|null); + } + + /** Represents a WebhookNotification. */ + class WebhookNotification implements IWebhookNotification { + + /** + * Constructs a new WebhookNotification. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IWebhookNotification); + + /** WebhookNotification uri. */ + public uri?: (string|null); + + /** WebhookNotification channelToken. */ + public channelToken?: (string|null); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookNotification instance + */ + public static create(properties?: google.analytics.data.v1alpha.IWebhookNotification): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Verifies a WebhookNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebhookNotification + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.WebhookNotification; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @param message WebhookNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.WebhookNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebhookNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebhookNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRecurringAudienceListRequest. */ + interface IGetRecurringAudienceListRequest { + + /** GetRecurringAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetRecurringAudienceListRequest. */ + class GetRecurringAudienceListRequest implements IGetRecurringAudienceListRequest { + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest); + + /** GetRecurringAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRecurringAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @param message GetRecurringAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Verifies a GetRecurringAudienceListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRecurringAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @param message GetRecurringAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRecurringAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsRequest. */ + interface IListRecurringAudienceListsRequest { + + /** ListRecurringAudienceListsRequest parent */ + parent?: (string|null); + + /** ListRecurringAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListRecurringAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsRequest. */ + class ListRecurringAudienceListsRequest implements IListRecurringAudienceListsRequest { + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest); + + /** ListRecurringAudienceListsRequest parent. */ + public parent: string; + + /** ListRecurringAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListRecurringAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @param message ListRecurringAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Verifies a ListRecurringAudienceListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; + + /** + * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRecurringAudienceListsResponse. */ + interface IListRecurringAudienceListsResponse { + + /** ListRecurringAudienceListsResponse recurringAudienceLists */ + recurringAudienceLists?: (google.analytics.data.v1alpha.IRecurringAudienceList[]|null); + + /** ListRecurringAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRecurringAudienceListsResponse. */ + class ListRecurringAudienceListsResponse implements IListRecurringAudienceListsResponse { + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse); + + /** ListRecurringAudienceListsResponse recurringAudienceLists. */ + public recurringAudienceLists: google.analytics.data.v1alpha.IRecurringAudienceList[]; + + /** ListRecurringAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRecurringAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @param message ListRecurringAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Verifies a ListRecurringAudienceListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRecurringAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListRecurringAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPropertyQuotasSnapshotRequest. */ + interface IGetPropertyQuotasSnapshotRequest { + + /** GetPropertyQuotasSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetPropertyQuotasSnapshotRequest. */ + class GetPropertyQuotasSnapshotRequest implements IGetPropertyQuotasSnapshotRequest { + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest); + + /** GetPropertyQuotasSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPropertyQuotasSnapshotRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPropertyQuotasSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @param message GetPropertyQuotasSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPropertyQuotasSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuotasSnapshot. */ + interface IPropertyQuotasSnapshot { + + /** PropertyQuotasSnapshot name */ + name?: (string|null); + + /** PropertyQuotasSnapshot corePropertyQuota */ + corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota */ + realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota */ + funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + } + + /** Represents a PropertyQuotasSnapshot. */ + class PropertyQuotasSnapshot implements IPropertyQuotasSnapshot { + + /** + * Constructs a new PropertyQuotasSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot); + + /** PropertyQuotasSnapshot name. */ + public name: string; + + /** PropertyQuotasSnapshot corePropertyQuota. */ + public corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot realtimePropertyQuota. */ + public realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** PropertyQuotasSnapshot funnelPropertyQuota. */ + public funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuotasSnapshot instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @param message PropertyQuotasSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Verifies a PropertyQuotasSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuotasSnapshot + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuotasSnapshot; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @param message PropertyQuotasSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuotasSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceListRequest. */ + interface IGetAudienceListRequest { + + /** GetAudienceListRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceListRequest. */ + class GetAudienceListRequest implements IGetAudienceListRequest { + + /** + * Constructs a new GetAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest); + + /** GetAudienceListRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @param message GetAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Verifies a GetAudienceListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetAudienceListRequest; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @param message GetAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsRequest. */ + interface IListAudienceListsRequest { + + /** ListAudienceListsRequest parent */ + parent?: (string|null); + + /** ListAudienceListsRequest pageSize */ + pageSize?: (number|null); + + /** ListAudienceListsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudienceListsRequest. */ + class ListAudienceListsRequest implements IListAudienceListsRequest { + + /** + * Constructs a new ListAudienceListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest); + + /** ListAudienceListsRequest parent. */ + public parent: string; + + /** ListAudienceListsRequest pageSize. */ + public pageSize: number; + + /** ListAudienceListsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @param message ListAudienceListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Verifies a ListAudienceListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsRequest; + + /** + * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. + * @param message ListAudienceListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceListsResponse. */ + interface IListAudienceListsResponse { + + /** ListAudienceListsResponse audienceLists */ + audienceLists?: (google.analytics.data.v1alpha.IAudienceList[]|null); + + /** ListAudienceListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudienceListsResponse. */ + class ListAudienceListsResponse implements IListAudienceListsResponse { + + /** + * Constructs a new ListAudienceListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse); + + /** ListAudienceListsResponse audienceLists. */ + public audienceLists: google.analytics.data.v1alpha.IAudienceList[]; + + /** ListAudienceListsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceListsResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @param message ListAudienceListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Verifies a ListAudienceListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsResponse; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @param message ListAudienceListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceListRequest. */ + interface ICreateAudienceListRequest { + + /** CreateAudienceListRequest parent */ + parent?: (string|null); + + /** CreateAudienceListRequest audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + } + + /** Represents a CreateAudienceListRequest. */ + class CreateAudienceListRequest implements ICreateAudienceListRequest { + + /** + * Constructs a new CreateAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest); + + /** CreateAudienceListRequest parent. */ + public parent: string; + + /** CreateAudienceListRequest audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @param message CreateAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Verifies a CreateAudienceListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateAudienceListRequest; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @param message CreateAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceList. */ + interface IAudienceList { + + /** AudienceList name */ + name?: (string|null); + + /** AudienceList audience */ + audience?: (string|null); + + /** AudienceList audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** AudienceList dimensions */ + dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); + + /** AudienceList state */ + state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** AudienceList rowCount */ + rowCount?: (number|null); + + /** AudienceList errorMessage */ + errorMessage?: (string|null); + + /** AudienceList percentageCompleted */ + percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList */ + recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification */ + webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + } + + /** Represents an AudienceList. */ + class AudienceList implements IAudienceList { + + /** + * Constructs a new AudienceList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceList); + + /** AudienceList name. */ + public name: string; + + /** AudienceList audience. */ + public audience: string; + + /** AudienceList audienceDisplayName. */ + public audienceDisplayName: string; + + /** AudienceList dimensions. */ + public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; + + /** AudienceList state. */ + public state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); + + /** AudienceList beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceList creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** AudienceList rowCount. */ + public rowCount?: (number|null); + + /** AudienceList errorMessage. */ + public errorMessage?: (string|null); + + /** AudienceList percentageCompleted. */ + public percentageCompleted?: (number|null); + + /** AudienceList recurringAudienceList. */ + public recurringAudienceList?: (string|null); + + /** AudienceList webhookNotification. */ + public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); + + /** + * Creates a new AudienceList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceList): google.analytics.data.v1alpha.AudienceList; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @param message AudienceList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceList; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceList; + + /** + * Verifies an AudienceList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceList; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @param message AudienceList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceList { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + + /** Properties of an AudienceListMetadata. */ + interface IAudienceListMetadata { + } + + /** Represents an AudienceListMetadata. */ + class AudienceListMetadata implements IAudienceListMetadata { + + /** + * Constructs a new AudienceListMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceListMetadata); + + /** + * Creates a new AudienceListMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceListMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceListMetadata): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @param message AudienceListMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Verifies an AudienceListMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceListMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceListMetadata; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @param message AudienceListMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceListMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceListMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceListMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListRequest. */ + interface IQueryAudienceListRequest { + + /** QueryAudienceListRequest name */ + name?: (string|null); + + /** QueryAudienceListRequest offset */ + offset?: (number|Long|string|null); + + /** QueryAudienceListRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryAudienceListRequest. */ + class QueryAudienceListRequest implements IQueryAudienceListRequest { + + /** + * Constructs a new QueryAudienceListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest); + + /** QueryAudienceListRequest name. */ + public name: string; + + /** QueryAudienceListRequest offset. */ + public offset: (number|Long|string); + + /** QueryAudienceListRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @param message QueryAudienceListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Verifies a QueryAudienceListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListRequest; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @param message QueryAudienceListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceListResponse. */ + interface IQueryAudienceListResponse { + + /** QueryAudienceListResponse audienceList */ + audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows */ + audienceRows?: (google.analytics.data.v1alpha.IAudienceRow[]|null); + + /** QueryAudienceListResponse rowCount */ + rowCount?: (number|null); + } + + /** Represents a QueryAudienceListResponse. */ + class QueryAudienceListResponse implements IQueryAudienceListResponse { + + /** + * Constructs a new QueryAudienceListResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse); + + /** QueryAudienceListResponse audienceList. */ + public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); + + /** QueryAudienceListResponse audienceRows. */ + public audienceRows: google.analytics.data.v1alpha.IAudienceRow[]; + + /** QueryAudienceListResponse rowCount. */ + public rowCount?: (number|null); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceListResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @param message QueryAudienceListResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Verifies a QueryAudienceListResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceListResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListResponse; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @param message QueryAudienceListResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceRow. */ + interface IAudienceRow { + + /** AudienceRow dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IAudienceDimensionValue[]|null); + } + + /** Represents an AudienceRow. */ + class AudienceRow implements IAudienceRow { + + /** + * Constructs a new AudienceRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceRow); + + /** AudienceRow dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IAudienceDimensionValue[]; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceRow instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceRow): google.analytics.data.v1alpha.AudienceRow; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceRow; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceRow; + + /** + * Verifies an AudienceRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceRow; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @param message AudienceRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimension. */ + interface IAudienceDimension { + + /** AudienceDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AudienceDimension. */ + class AudienceDimension implements IAudienceDimension { + + /** + * Constructs a new AudienceDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimension); + + /** AudienceDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimension): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Verifies an AudienceDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimension; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @param message AudienceDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimensionValue. */ + interface IAudienceDimensionValue { + + /** AudienceDimensionValue value */ + value?: (string|null); + } + + /** Represents an AudienceDimensionValue. */ + class AudienceDimensionValue implements IAudienceDimensionValue { + + /** + * Constructs a new AudienceDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue); + + /** AudienceDimensionValue value. */ + public value?: (string|null); + + /** AudienceDimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Verifies an AudienceDimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimensionValue; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @param message AudienceDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunFunnelReportRequest. */ + interface IRunFunnelReportRequest { + + /** RunFunnelReportRequest property */ + property?: (string|null); + + /** RunFunnelReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** RunFunnelReportRequest funnel */ + funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown */ + funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction */ + funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType */ + funnelVisualizationType?: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null); + + /** RunFunnelReportRequest segments */ + segments?: (google.analytics.data.v1alpha.ISegment[]|null); + + /** RunFunnelReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunFunnelReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + } + + /** Represents a RunFunnelReportRequest. */ + class RunFunnelReportRequest implements IRunFunnelReportRequest { + + /** + * Constructs a new RunFunnelReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest); + + /** RunFunnelReportRequest property. */ + public property: string; + + /** RunFunnelReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** RunFunnelReportRequest funnel. */ + public funnel?: (google.analytics.data.v1alpha.IFunnel|null); + + /** RunFunnelReportRequest funnelBreakdown. */ + public funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); + + /** RunFunnelReportRequest funnelNextAction. */ + public funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); + + /** RunFunnelReportRequest funnelVisualizationType. */ + public funnelVisualizationType: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType); + + /** RunFunnelReportRequest segments. */ + public segments: google.analytics.data.v1alpha.ISegment[]; + + /** RunFunnelReportRequest limit. */ + public limit: (number|Long|string); + + /** RunFunnelReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunFunnelReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @param message RunFunnelReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Verifies a RunFunnelReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportRequest; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @param message RunFunnelReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RunFunnelReportRequest { + + /** FunnelVisualizationType enum. */ + enum FunnelVisualizationType { + FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0, + STANDARD_FUNNEL = 1, + TRENDED_FUNNEL = 2 + } + } + + /** Properties of a RunFunnelReportResponse. */ + interface IRunFunnelReportResponse { + + /** RunFunnelReportResponse funnelTable */ + funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization */ + funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunFunnelReportResponse. */ + class RunFunnelReportResponse implements IRunFunnelReportResponse { + + /** + * Constructs a new RunFunnelReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse); + + /** RunFunnelReportResponse funnelTable. */ + public funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse funnelVisualization. */ + public funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); + + /** RunFunnelReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunFunnelReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunFunnelReportResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @param message RunFunnelReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Verifies a RunFunnelReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunFunnelReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportResponse; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @param message RunFunnelReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTask. */ + interface IReportTask { + + /** ReportTask name */ + name?: (string|null); + + /** ReportTask reportDefinition */ + reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata */ + reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + } + + /** Represents a ReportTask. */ + class ReportTask implements IReportTask { + + /** + * Constructs a new ReportTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTask); + + /** ReportTask name. */ + public name: string; + + /** ReportTask reportDefinition. */ + public reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); + + /** ReportTask reportMetadata. */ + public reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); + + /** + * Creates a new ReportTask instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTask instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTask): google.analytics.data.v1alpha.ReportTask; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @param message ReportTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask; + + /** + * Verifies a ReportTask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTask + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @param message ReportTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportTask { + + /** Properties of a ReportDefinition. */ + interface IReportDefinition { + + /** ReportDefinition dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); + + /** ReportDefinition metrics */ + metrics?: (google.analytics.data.v1alpha.IMetric[]|null); + + /** ReportDefinition dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** ReportDefinition dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter */ + metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset */ + offset?: (number|Long|string|null); + + /** ReportDefinition limit */ + limit?: (number|Long|string|null); + + /** ReportDefinition metricAggregations */ + metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); + + /** ReportDefinition orderBys */ + orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); + + /** ReportDefinition currencyCode */ + currencyCode?: (string|null); + + /** ReportDefinition cohortSpec */ + cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** ReportDefinition samplingLevel */ + samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + } + + /** Represents a ReportDefinition. */ + class ReportDefinition implements IReportDefinition { + + /** + * Constructs a new ReportDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition); + + /** ReportDefinition dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimension[]; + + /** ReportDefinition metrics. */ + public metrics: google.analytics.data.v1alpha.IMetric[]; + + /** ReportDefinition dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** ReportDefinition dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition metricFilter. */ + public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** ReportDefinition offset. */ + public offset: (number|Long|string); + + /** ReportDefinition limit. */ + public limit: (number|Long|string); + + /** ReportDefinition metricAggregations. */ + public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; + + /** ReportDefinition orderBys. */ + public orderBys: google.analytics.data.v1alpha.IOrderBy[]; + + /** ReportDefinition currencyCode. */ + public currencyCode: string; + + /** ReportDefinition cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** ReportDefinition keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** ReportDefinition samplingLevel. */ + public samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDefinition instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @param message ReportDefinition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Verifies a ReportDefinition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDefinition + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportDefinition; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @param message ReportDefinition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDefinition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDefinition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportMetadata. */ + interface IReportMetadata { + + /** ReportMetadata state */ + state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** ReportMetadata taskRowCount */ + taskRowCount?: (number|null); + + /** ReportMetadata errorMessage */ + errorMessage?: (string|null); + + /** ReportMetadata totalRowCount */ + totalRowCount?: (number|null); + } + + /** Represents a ReportMetadata. */ + class ReportMetadata implements IReportMetadata { + + /** + * Constructs a new ReportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata); + + /** ReportMetadata state. */ + public state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); + + /** ReportMetadata beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** ReportMetadata creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** ReportMetadata taskRowCount. */ + public taskRowCount?: (number|null); + + /** ReportMetadata errorMessage. */ + public errorMessage?: (string|null); + + /** ReportMetadata totalRowCount. */ + public totalRowCount?: (number|null); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @param message ReportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Verifies a ReportMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportMetadata; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @param message ReportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + } + + /** Properties of a CreateReportTaskRequest. */ + interface ICreateReportTaskRequest { + + /** CreateReportTaskRequest parent */ + parent?: (string|null); + + /** CreateReportTaskRequest reportTask */ + reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + } + + /** Represents a CreateReportTaskRequest. */ + class CreateReportTaskRequest implements ICreateReportTaskRequest { + + /** + * Constructs a new CreateReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest); + + /** CreateReportTaskRequest parent. */ + public parent: string; + + /** CreateReportTaskRequest reportTask. */ + public reportTask?: (google.analytics.data.v1alpha.IReportTask|null); + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @param message CreateReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Verifies a CreateReportTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateReportTaskRequest; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @param message CreateReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CreateReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportTaskMetadata. */ + interface IReportTaskMetadata { + } + + /** Represents a ReportTaskMetadata. */ + class ReportTaskMetadata implements IReportTaskMetadata { + + /** + * Constructs a new ReportTaskMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IReportTaskMetadata); + + /** + * Creates a new ReportTaskMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportTaskMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IReportTaskMetadata): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @param message ReportTaskMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Verifies a ReportTaskMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportTaskMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTaskMetadata; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @param message ReportTaskMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ReportTaskMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportTaskMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskRequest. */ + interface IQueryReportTaskRequest { + + /** QueryReportTaskRequest name */ + name?: (string|null); + + /** QueryReportTaskRequest offset */ + offset?: (number|Long|string|null); + + /** QueryReportTaskRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryReportTaskRequest. */ + class QueryReportTaskRequest implements IQueryReportTaskRequest { + + /** + * Constructs a new QueryReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest); + + /** QueryReportTaskRequest name. */ + public name: string; + + /** QueryReportTaskRequest offset. */ + public offset: (number|Long|string); + + /** QueryReportTaskRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @param message QueryReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Verifies a QueryReportTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskRequest; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @param message QueryReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReportTaskResponse. */ + interface IQueryReportTaskResponse { + + /** QueryReportTaskResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** QueryReportTaskResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** QueryReportTaskResponse rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse totals */ + totals?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse maximums */ + maximums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse minimums */ + minimums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** QueryReportTaskResponse rowCount */ + rowCount?: (number|null); + + /** QueryReportTaskResponse metadata */ + metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + } + + /** Represents a QueryReportTaskResponse. */ + class QueryReportTaskResponse implements IQueryReportTaskResponse { + + /** + * Constructs a new QueryReportTaskResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse); + + /** QueryReportTaskResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** QueryReportTaskResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** QueryReportTaskResponse rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse totals. */ + public totals: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse maximums. */ + public maximums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse minimums. */ + public minimums: google.analytics.data.v1alpha.IRow[]; + + /** QueryReportTaskResponse rowCount. */ + public rowCount: number; + + /** QueryReportTaskResponse metadata. */ + public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReportTaskResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @param message QueryReportTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Verifies a QueryReportTaskResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReportTaskResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskResponse; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @param message QueryReportTaskResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportTaskRequest. */ + interface IGetReportTaskRequest { + + /** GetReportTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetReportTaskRequest. */ + class GetReportTaskRequest implements IGetReportTaskRequest { + + /** + * Constructs a new GetReportTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest); + + /** GetReportTaskRequest name. */ + public name: string; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportTaskRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @param message GetReportTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Verifies a GetReportTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetReportTaskRequest; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @param message GetReportTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksRequest. */ + interface IListReportTasksRequest { + + /** ListReportTasksRequest parent */ + parent?: (string|null); + + /** ListReportTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListReportTasksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListReportTasksRequest. */ + class ListReportTasksRequest implements IListReportTasksRequest { + + /** + * Constructs a new ListReportTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksRequest); + + /** ListReportTasksRequest parent. */ + public parent: string; + + /** ListReportTasksRequest pageSize. */ + public pageSize: number; + + /** ListReportTasksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksRequest): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @param message ListReportTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Verifies a ListReportTasksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksRequest; + + /** + * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. + * @param message ListReportTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportTasksResponse. */ + interface IListReportTasksResponse { + + /** ListReportTasksResponse reportTasks */ + reportTasks?: (google.analytics.data.v1alpha.IReportTask[]|null); + + /** ListReportTasksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListReportTasksResponse. */ + class ListReportTasksResponse implements IListReportTasksResponse { + + /** + * Constructs a new ListReportTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IListReportTasksResponse); + + /** ListReportTasksResponse reportTasks. */ + public reportTasks: google.analytics.data.v1alpha.IReportTask[]; + + /** ListReportTasksResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportTasksResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IListReportTasksResponse): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @param message ListReportTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Verifies a ListReportTasksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksResponse; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @param message ListReportTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ListReportTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportRequest. */ + interface IRunReportRequest { + + /** RunReportRequest property */ + property?: (string|null); + + /** RunReportRequest dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); + + /** RunReportRequest metrics */ + metrics?: (google.analytics.data.v1alpha.IMetric[]|null); + + /** RunReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); + + /** RunReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest offset */ + offset?: (number|Long|string|null); + + /** RunReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); + + /** RunReportRequest orderBys */ + orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); + + /** RunReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunReportRequest comparisons */ + comparisons?: (google.analytics.data.v1alpha.IComparison[]|null); + + /** RunReportRequest conversionSpec */ + conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); + } + + /** Represents a RunReportRequest. */ + class RunReportRequest implements IRunReportRequest { + + /** + * Constructs a new RunReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunReportRequest); + + /** RunReportRequest property. */ + public property: string; + + /** RunReportRequest dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimension[]; + + /** RunReportRequest metrics. */ + public metrics: google.analytics.data.v1alpha.IMetric[]; + + /** RunReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** RunReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest offset. */ + public offset: (number|Long|string); + + /** RunReportRequest limit. */ + public limit: (number|Long|string); + + /** RunReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; + + /** RunReportRequest orderBys. */ + public orderBys: google.analytics.data.v1alpha.IOrderBy[]; + + /** RunReportRequest currencyCode. */ + public currencyCode: string; + + /** RunReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunReportRequest comparisons. */ + public comparisons: google.analytics.data.v1alpha.IComparison[]; + + /** RunReportRequest conversionSpec. */ + public conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunReportRequest): google.analytics.data.v1alpha.RunReportRequest; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportRequest; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportRequest; + + /** + * Verifies a RunReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportRequest; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @param message RunReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportResponse. */ + interface IRunReportResponse { + + /** RunReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** RunReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** RunReportResponse rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse totals */ + totals?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse maximums */ + maximums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse minimums */ + minimums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse rowCount */ + rowCount?: (number|null); + + /** RunReportResponse metadata */ + metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** RunReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunReportResponse kind */ + kind?: (string|null); + + /** RunReportResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a RunReportResponse. */ + class RunReportResponse implements IRunReportResponse { + + /** + * Constructs a new RunReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRunReportResponse); + + /** RunReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** RunReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** RunReportResponse rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse totals. */ + public totals: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse maximums. */ + public maximums: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse minimums. */ + public minimums: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse rowCount. */ + public rowCount: number; + + /** RunReportResponse metadata. */ + public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** RunReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunReportResponse kind. */ + public kind: string; + + /** RunReportResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunReportResponse): google.analytics.data.v1alpha.RunReportResponse; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportResponse; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportResponse; + + /** + * Verifies a RunReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportResponse; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @param message RunReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMetadataRequest. */ + interface IGetMetadataRequest { + + /** GetMetadataRequest name */ + name?: (string|null); + } + + /** Represents a GetMetadataRequest. */ + class GetMetadataRequest implements IGetMetadataRequest { + + /** + * Constructs a new GetMetadataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IGetMetadataRequest); + + /** GetMetadataRequest name. */ + public name: string; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetadataRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IGetMetadataRequest): google.analytics.data.v1alpha.GetMetadataRequest; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetMetadataRequest; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetMetadataRequest; + + /** + * Verifies a GetMetadataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetadataRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetMetadataRequest; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @param message GetMetadataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMetadataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMetadataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata name */ + name?: (string|null); + + /** Metadata dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimensionMetadata[]|null); + + /** Metadata metrics */ + metrics?: (google.analytics.data.v1alpha.IMetricMetadata[]|null); + + /** Metadata comparisons */ + comparisons?: (google.analytics.data.v1alpha.IComparisonMetadata[]|null); + + /** Metadata conversions */ + conversions?: (google.analytics.data.v1alpha.IConversionMetadata[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetadata); + + /** Metadata name. */ + public name: string; + + /** Metadata dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimensionMetadata[]; + + /** Metadata metrics. */ + public metrics: google.analytics.data.v1alpha.IMetricMetadata[]; + + /** Metadata comparisons. */ + public comparisons: google.analytics.data.v1alpha.IComparisonMetadata[]; + + /** Metadata conversions. */ + public conversions: google.analytics.data.v1alpha.IConversionMetadata[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetadata): google.analytics.data.v1alpha.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange startDate */ + startDate?: (string|null); + + /** DateRange endDate */ + endDate?: (string|null); + + /** DateRange name */ + name?: (string|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDateRange); + + /** DateRange startDate. */ + public startDate: string; + + /** DateRange endDate. */ + public endDate: string; + + /** DateRange name. */ + public name: string; + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DateRange; + + /** + * Verifies a DateRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension name */ + name?: (string|null); + + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimension); + + /** Dimension name. */ + public name: string; + + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Dimension; + + /** + * Verifies a Dimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { + + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + } + + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { + + /** + * Constructs a new DimensionExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); + + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Verifies a DimensionExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionExpression { + + /** Properties of a CaseExpression. */ + interface ICaseExpression { + + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } + + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { + + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); + + /** CaseExpression dimensionName. */ + public dimensionName: string; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Verifies a CaseExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { + + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); + + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } + + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { + + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); + + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; + + /** ConcatenateExpression delimiter. */ + public delimiter: string; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric expression. */ + public expression: string; + + /** Metric invisible. */ + public invisible: boolean; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Comparison. */ + interface IComparison { + + /** Comparison name */ + name?: (string|null); + + /** Comparison dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** Comparison comparison */ + comparison?: (string|null); + } + + /** Represents a Comparison. */ + class Comparison implements IComparison { + + /** + * Constructs a new Comparison. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IComparison); + + /** Comparison name. */ + public name?: (string|null); + + /** Comparison dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** Comparison comparison. */ + public comparison?: (string|null); + + /** Comparison oneComparison. */ + public oneComparison?: ("dimensionFilter"|"comparison"); + + /** + * Creates a new Comparison instance using the specified properties. + * @param [properties] Properties to set + * @returns Comparison instance + */ + public static create(properties?: google.analytics.data.v1alpha.IComparison): google.analytics.data.v1alpha.Comparison; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Comparison; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Comparison; + + /** + * Verifies a Comparison message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Comparison + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Comparison; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @param message Comparison + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Comparison to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Comparison + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpression. */ + interface IFilterExpression { + + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1alpha.IFilter|null); + } + + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { + + /** + * Constructs a new FilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); + + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1alpha.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpression; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpression; + + /** + * Verifies a FilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { + + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); + } + + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { + + /** + * Constructs a new FilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); + + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFilterExpression[]; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Verifies a FilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldName */ + fieldName?: (string|null); + + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilter); + + /** Filter fieldName. */ + public fieldName: string; + + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.StringFilter; + + /** + * Verifies a StringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.InListFilter; + + /** + * Verifies an InListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericFilter; + + /** + * Verifies a NumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy; + + /** + * Verifies an OrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Verifies a BetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Verifies an EmptyFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortSpec. */ + interface ICohortSpec { + + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); + + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + } + + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { + + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); + + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1alpha.ICohort[]; + + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortSpec; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortSpec; + + /** + * Verifies a CohortSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cohort. */ + interface ICohort { + + /** Cohort name */ + name?: (string|null); + + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + } + + /** Represents a Cohort. */ + class Cohort implements ICohort { + + /** + * Constructs a new Cohort. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohort); + + /** Cohort name. */ + public name: string; + + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); + + /** + * Creates a new Cohort instance using the specified properties. + * @param [properties] Properties to set + * @returns Cohort instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Cohort; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Cohort; + + /** + * Verifies a Cohort message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cohort + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cohort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cohort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { + + /** + * Constructs a new CohortsRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortsRange instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortsRange; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortsRange; + + /** + * Verifies a CohortsRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortsRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortsRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortsRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CohortsRange { + + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } + + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); + } + + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { + + /** + * Constructs a new CohortReportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); + + /** CohortReportSettings accumulate. */ + public accumulate: boolean; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortReportSettings instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Verifies a CohortReportSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortReportSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortReportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortReportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Section enum. */ + enum Section { + SECTION_UNSPECIFIED = 0, + SECTION_REPORT = 1, + SECTION_ADVERTISING = 2 + } + + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { + + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); + + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + + /** ResponseMetaData section */ + section?: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section|null); + } + + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { + + /** + * Constructs a new ResponseMetaData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); + + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** ResponseMetaData section. */ + public section: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetaData instance + */ + public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Verifies a ResponseMetaData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetaData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { + + /** DimensionHeader name */ + name?: (string|null); + } + + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { + + /** + * Constructs a new DimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); + + /** DimensionHeader name. */ + public name: string; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Verifies a DimensionHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricHeader. */ + interface IMetricHeader { + + /** MetricHeader name */ + name?: (string|null); + + /** MetricHeader type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); + } + + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { + + /** + * Constructs a new MetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); + + /** MetricHeader name. */ + public name: string; + + /** MetricHeader type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); + + /** + * Creates a new MetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricHeader instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricHeader; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricHeader; + + /** + * Verifies a MetricHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); + + /** Row metricValues */ + metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1alpha.IMetricValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Row; + + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionValue. */ + interface IDimensionValue { + + /** DimensionValue value */ + value?: (string|null); + } + + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { + + /** + * Constructs a new DimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); + + /** DimensionValue value. */ + public value?: (string|null); + + /** DimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new DimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionValue; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionValue; + + /** + * Verifies a DimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValue. */ + interface IMetricValue { + + /** MetricValue value */ + value?: (string|null); + } + + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { + + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricValue); + + /** MetricValue value. */ + public value?: (string|null); + + /** MetricValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricValue; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricValue; + + /** + * Verifies a MetricValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { + + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + } + + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { + + /** + * Constructs a new PropertyQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); + + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuota instance + */ + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Verifies a PropertyQuota message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { + + /** QuotaStatus consumed */ + consumed?: (number|null); + + /** QuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { + + /** + * Constructs a new QuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); + + /** QuotaStatus consumed. */ + public consumed: number; + + /** QuotaStatus remaining. */ + public remaining: number; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaStatus instance + */ + public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Verifies a QuotaStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelBreakdown. */ + interface IFunnelBreakdown { + + /** FunnelBreakdown breakdownDimension */ + breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelBreakdown. */ + class FunnelBreakdown implements IFunnelBreakdown { + + /** + * Constructs a new FunnelBreakdown. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); + + /** FunnelBreakdown breakdownDimension. */ + public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelBreakdown limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelBreakdown instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Verifies a FunnelBreakdown message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelBreakdown + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @param message FunnelBreakdown + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelBreakdown to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelBreakdown + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelNextAction. */ + interface IFunnelNextAction { + + /** FunnelNextAction nextActionDimension */ + nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit */ + limit?: (number|Long|string|null); + } + + /** Represents a FunnelNextAction. */ + class FunnelNextAction implements IFunnelNextAction { + + /** + * Constructs a new FunnelNextAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); + + /** FunnelNextAction nextActionDimension. */ + public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit. */ + public limit?: (number|Long|string|null); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelNextAction instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Verifies a FunnelNextAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelNextAction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @param message FunnelNextAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelNextAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelNextAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Funnel. */ + interface IFunnel { + + /** Funnel isOpenFunnel */ + isOpenFunnel?: (boolean|null); + + /** Funnel steps */ + steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); + } + + /** Represents a Funnel. */ + class Funnel implements IFunnel { + + /** + * Constructs a new Funnel. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnel); + + /** Funnel isOpenFunnel. */ + public isOpenFunnel: boolean; + + /** Funnel steps. */ + public steps: google.analytics.data.v1alpha.IFunnelStep[]; + + /** + * Creates a new Funnel instance using the specified properties. + * @param [properties] Properties to set + * @returns Funnel instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Funnel; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Funnel; + + /** + * Verifies a Funnel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Funnel + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @param message Funnel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Funnel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Funnel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelStep. */ + interface IFunnelStep { + + /** FunnelStep name */ + name?: (string|null); + + /** FunnelStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** FunnelStep withinDurationFromPriorStep */ + withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression */ + filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + } + + /** Represents a FunnelStep. */ + class FunnelStep implements IFunnelStep { + + /** + * Constructs a new FunnelStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); + + /** FunnelStep name. */ + public name: string; + + /** FunnelStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** FunnelStep withinDurationFromPriorStep. */ + public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + + /** FunnelStep filterExpression. */ + public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelStep; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelStep; + + /** + * Verifies a FunnelStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @param message FunnelStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelSubReport. */ + interface IFunnelSubReport { + + /** FunnelSubReport dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + + /** FunnelSubReport metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** FunnelSubReport rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** FunnelSubReport metadata */ + metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + } + + /** Represents a FunnelSubReport. */ + class FunnelSubReport implements IFunnelSubReport { + + /** + * Constructs a new FunnelSubReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); + + /** FunnelSubReport dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + + /** FunnelSubReport metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** FunnelSubReport rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** FunnelSubReport metadata. */ + public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelSubReport instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Verifies a FunnelSubReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelSubReport + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @param message FunnelSubReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelSubReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelSubReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegment. */ + interface IUserSegment { + + /** UserSegment userInclusionCriteria */ + userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + } + + /** Represents a UserSegment. */ + class UserSegment implements IUserSegment { + + /** + * Constructs a new UserSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegment); + + /** UserSegment userInclusionCriteria. */ + public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** UserSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + + /** + * Creates a new UserSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegment; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegment; + + /** + * Verifies a UserSegment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @param message UserSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentCriteria. */ + interface IUserSegmentCriteria { + + /** UserSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); + + /** UserSegmentCriteria andSequenceGroups */ + andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); + } + + /** Represents a UserSegmentCriteria. */ + class UserSegmentCriteria implements IUserSegmentCriteria { + + /** + * Constructs a new UserSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); + + /** UserSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; + + /** UserSegmentCriteria andSequenceGroups. */ + public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Verifies a UserSegmentCriteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @param message UserSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserCriteriaScoping enum. */ + enum UserCriteriaScoping { + USER_CRITERIA_SCOPING_UNSPECIFIED = 0, + USER_CRITERIA_WITHIN_SAME_EVENT = 1, + USER_CRITERIA_WITHIN_SAME_SESSION = 2, + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 + } + + /** Properties of a UserSegmentConditionGroup. */ + interface IUserSegmentConditionGroup { + + /** UserSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSegmentConditionGroup. */ + class UserSegmentConditionGroup implements IUserSegmentConditionGroup { + + /** + * Constructs a new UserSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); + + /** UserSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Verifies a UserSegmentConditionGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @param message UserSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentSequenceGroup. */ + interface IUserSegmentSequenceGroup { + + /** UserSegmentSequenceGroup sequenceScoping */ + sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentSequenceGroup sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps */ + userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); + } + + /** Represents a UserSegmentSequenceGroup. */ + class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { + + /** + * Constructs a new UserSegmentSequenceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); + + /** UserSegmentSequenceGroup sequenceScoping. */ + public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSegmentSequenceGroup sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** UserSegmentSequenceGroup userSequenceSteps. */ + public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentSequenceGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Verifies a UserSegmentSequenceGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentSequenceGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @param message UserSegmentSequenceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSequenceStep. */ + interface IUserSequenceStep { + + /** UserSequenceStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); + + /** UserSequenceStep stepScoping */ + stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSequenceStep segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a UserSequenceStep. */ + class UserSequenceStep implements IUserSequenceStep { + + /** + * Constructs a new UserSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); + + /** UserSequenceStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; + + /** UserSequenceStep stepScoping. */ + public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + + /** UserSequenceStep segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSequenceStep instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Verifies a UserSequenceStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @param message UserSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserSegmentExclusion. */ + interface IUserSegmentExclusion { + + /** UserSegmentExclusion userExclusionDuration */ + userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); + + /** UserSegmentExclusion userExclusionCriteria */ + userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + } + + /** Represents a UserSegmentExclusion. */ + class UserSegmentExclusion implements IUserSegmentExclusion { + + /** + * Constructs a new UserSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); + + /** UserSegmentExclusion userExclusionDuration. */ + public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); + + /** UserSegmentExclusion userExclusionCriteria. */ + public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns UserSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Verifies a UserSegmentExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @param message UserSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserExclusionDuration enum. */ + enum UserExclusionDuration { + USER_EXCLUSION_DURATION_UNSPECIFIED = 0, + USER_EXCLUSION_TEMPORARY = 1, + USER_EXCLUSION_PERMANENT = 2 + } + + /** Properties of a SessionSegment. */ + interface ISessionSegment { + + /** SessionSegment sessionInclusionCriteria */ + sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + } + + /** Represents a SessionSegment. */ + class SessionSegment implements ISessionSegment { + + /** + * Constructs a new SessionSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); + + /** SessionSegment sessionInclusionCriteria. */ + public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + + /** + * Creates a new SessionSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegment; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegment; + + /** + * Verifies a SessionSegment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @param message SessionSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentCriteria. */ + interface ISessionSegmentCriteria { + + /** SessionSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); + } + + /** Represents a SessionSegmentCriteria. */ + class SessionSegmentCriteria implements ISessionSegmentCriteria { + + /** + * Constructs a new SessionSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); + + /** SessionSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Verifies a SessionSegmentCriteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @param message SessionSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionCriteriaScoping enum. */ + enum SessionCriteriaScoping { + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 + } + + /** Properties of a SessionSegmentConditionGroup. */ + interface ISessionSegmentConditionGroup { + + /** SessionSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); + + /** SessionSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents a SessionSegmentConditionGroup. */ + class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { + + /** + * Constructs a new SessionSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); + + /** SessionSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); + + /** SessionSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Verifies a SessionSegmentConditionGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @param message SessionSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionSegmentExclusion. */ + interface ISessionSegmentExclusion { + + /** SessionSegmentExclusion sessionExclusionDuration */ + sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); + + /** SessionSegmentExclusion sessionExclusionCriteria */ + sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + } + + /** Represents a SessionSegmentExclusion. */ + class SessionSegmentExclusion implements ISessionSegmentExclusion { + + /** + * Constructs a new SessionSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); + + /** SessionSegmentExclusion sessionExclusionDuration. */ + public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); + + /** SessionSegmentExclusion sessionExclusionCriteria. */ + public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Verifies a SessionSegmentExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @param message SessionSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SessionExclusionDuration enum. */ + enum SessionExclusionDuration { + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, + SESSION_EXCLUSION_TEMPORARY = 1, + SESSION_EXCLUSION_PERMANENT = 2 + } + + /** Properties of an EventSegment. */ + interface IEventSegment { + + /** EventSegment eventInclusionCriteria */ + eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + } + + /** Represents an EventSegment. */ + class EventSegment implements IEventSegment { + + /** + * Constructs a new EventSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegment); + + /** EventSegment eventInclusionCriteria. */ + public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** EventSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + + /** + * Creates a new EventSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegment instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegment; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegment; + + /** + * Verifies an EventSegment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @param message EventSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentCriteria. */ + interface IEventSegmentCriteria { + + /** EventSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); + } + + /** Represents an EventSegmentCriteria. */ + class EventSegmentCriteria implements IEventSegmentCriteria { + + /** + * Constructs a new EventSegmentCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); + + /** EventSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentCriteria instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Verifies an EventSegmentCriteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentCriteria + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @param message EventSegmentCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventCriteriaScoping enum. */ + enum EventCriteriaScoping { + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 + } + + /** Properties of an EventSegmentConditionGroup. */ + interface IEventSegmentConditionGroup { + + /** EventSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); + + /** EventSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + } + + /** Represents an EventSegmentConditionGroup. */ + class EventSegmentConditionGroup implements IEventSegmentConditionGroup { + + /** + * Constructs a new EventSegmentConditionGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); + + /** EventSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); + + /** EventSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentConditionGroup instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Verifies an EventSegmentConditionGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentConditionGroup + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @param message EventSegmentConditionGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventSegmentExclusion. */ + interface IEventSegmentExclusion { + + /** EventSegmentExclusion eventExclusionDuration */ + eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); + + /** EventSegmentExclusion eventExclusionCriteria */ + eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + } + + /** Represents an EventSegmentExclusion. */ + class EventSegmentExclusion implements IEventSegmentExclusion { + + /** + * Constructs a new EventSegmentExclusion. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); + + /** EventSegmentExclusion eventExclusionDuration. */ + public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); + + /** EventSegmentExclusion eventExclusionCriteria. */ + public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @param [properties] Properties to set + * @returns EventSegmentExclusion instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Verifies an EventSegmentExclusion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventSegmentExclusion + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @param message EventSegmentExclusion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventSegmentExclusion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EventExclusionDuration enum. */ + enum EventExclusionDuration { + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, + EVENT_EXCLUSION_PERMANENT = 1 + } + + /** Properties of a Segment. */ + interface ISegment { + + /** Segment name */ + name?: (string|null); + + /** Segment userSegment */ + userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment */ + sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment */ + eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + } + + /** Represents a Segment. */ + class Segment implements ISegment { + + /** + * Constructs a new Segment. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegment); + + /** Segment name. */ + public name: string; + + /** Segment userSegment. */ + public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment. */ + public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment. */ + public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + + /** Segment oneSegmentScope. */ + public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); + + /** + * Creates a new Segment instance using the specified properties. + * @param [properties] Properties to set + * @returns Segment instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Segment; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Segment; + + /** + * Verifies a Segment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Segment + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @param message Segment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Segment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Segment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpression. */ + interface ISegmentFilterExpression { + + /** SegmentFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter */ + segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter */ + segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + } + + /** Represents a SegmentFilterExpression. */ + class SegmentFilterExpression implements ISegmentFilterExpression { + + /** + * Constructs a new SegmentFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); + + /** SegmentFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter. */ + public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter. */ + public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + + /** SegmentFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Verifies a SegmentFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @param message SegmentFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterExpressionList. */ + interface ISegmentFilterExpressionList { + + /** SegmentFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); + } + + /** Represents a SegmentFilterExpressionList. */ + class SegmentFilterExpressionList implements ISegmentFilterExpressionList { + + /** + * Constructs a new SegmentFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); + + /** SegmentFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Verifies a SegmentFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilter. */ + interface ISegmentFilter { + + /** SegmentFilter fieldName */ + fieldName?: (string|null); + + /** SegmentFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + } + + /** Represents a SegmentFilter. */ + class SegmentFilter implements ISegmentFilter { + + /** + * Constructs a new SegmentFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); + + /** SegmentFilter fieldName. */ + public fieldName: string; + + /** SegmentFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + + /** SegmentFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Verifies a SegmentFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @param message SegmentFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentFilterScoping. */ + interface ISegmentFilterScoping { + + /** SegmentFilterScoping atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); + } + + /** Represents a SegmentFilterScoping. */ + class SegmentFilterScoping implements ISegmentFilterScoping { + + /** + * Constructs a new SegmentFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); + + /** SegmentFilterScoping atAnyPointInTime. */ + public atAnyPointInTime?: (boolean|null); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Verifies a SegmentFilterScoping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @param message SegmentFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentEventFilter. */ + interface ISegmentEventFilter { + + /** SegmentEventFilter eventName */ + eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression */ + segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + } + + /** Represents a SegmentEventFilter. */ + class SegmentEventFilter implements ISegmentEventFilter { + + /** + * Constructs a new SegmentEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); + + /** SegmentEventFilter eventName. */ + public eventName?: (string|null); + + /** SegmentEventFilter segmentParameterFilterExpression. */ + public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Verifies a SegmentEventFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @param message SegmentEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpression. */ + interface ISegmentParameterFilterExpression { + + /** SegmentParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter */ + segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + } + + /** Represents a SegmentParameterFilterExpression. */ + class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { + + /** + * Constructs a new SegmentParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); + + /** SegmentParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); + + /** SegmentParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + + /** SegmentParameterFilterExpression segmentParameterFilter. */ + public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + + /** SegmentParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Verifies a SegmentParameterFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterExpressionList. */ + interface ISegmentParameterFilterExpressionList { + + /** SegmentParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); + } + + /** Represents a SegmentParameterFilterExpressionList. */ + class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); + + /** SegmentParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Verifies a SegmentParameterFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilter. */ + interface ISegmentParameterFilter { + + /** SegmentParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + } + + /** Represents a SegmentParameterFilter. */ + class SegmentParameterFilter implements ISegmentParameterFilter { + + /** + * Constructs a new SegmentParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); + + /** SegmentParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** SegmentParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentParameterFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + + /** SegmentParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** SegmentParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Verifies a SegmentParameterFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @param message SegmentParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SegmentParameterFilterScoping. */ + interface ISegmentParameterFilterScoping { + + /** SegmentParameterFilterScoping inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|Long|string|null); + } + + /** Represents a SegmentParameterFilterScoping. */ + class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { + + /** + * Constructs a new SegmentParameterFilterScoping. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); + + /** SegmentParameterFilterScoping inAnyNDayPeriod. */ + public inAnyNDayPeriod?: (number|Long|string|null); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentParameterFilterScoping instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Verifies a SegmentParameterFilterScoping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentParameterFilterScoping + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @param message SegmentParameterFilterScoping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpression. */ + interface IFunnelFilterExpression { + + /** FunnelFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter */ + funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter */ + funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + } + + /** Represents a FunnelFilterExpression. */ + class FunnelFilterExpression implements IFunnelFilterExpression { + + /** + * Constructs a new FunnelFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); + + /** FunnelFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter. */ + public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter. */ + public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + + /** FunnelFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Verifies a FunnelFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @param message FunnelFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFilterExpressionList. */ + interface IFunnelFilterExpressionList { + + /** FunnelFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); + } + + /** Represents a FunnelFilterExpressionList. */ + class FunnelFilterExpressionList implements IFunnelFilterExpressionList { + + /** + * Constructs a new FunnelFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); + + /** FunnelFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Verifies a FunnelFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelFieldFilter. */ + interface IFunnelFieldFilter { + + /** FunnelFieldFilter fieldName */ + fieldName?: (string|null); + + /** FunnelFieldFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelFieldFilter. */ + class FunnelFieldFilter implements IFunnelFieldFilter { + + /** + * Constructs a new FunnelFieldFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); + + /** FunnelFieldFilter fieldName. */ + public fieldName: string; + + /** FunnelFieldFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelFieldFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelFieldFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Verifies a FunnelFieldFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelFieldFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @param message FunnelFieldFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelFieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelEventFilter. */ + interface IFunnelEventFilter { + + /** FunnelEventFilter eventName */ + eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression */ + funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + } + + /** Represents a FunnelEventFilter. */ + class FunnelEventFilter implements IFunnelEventFilter { + + /** + * Constructs a new FunnelEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); + + /** FunnelEventFilter eventName. */ + public eventName?: (string|null); + + /** FunnelEventFilter funnelParameterFilterExpression. */ + public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelEventFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Verifies a FunnelEventFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @param message FunnelEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpression. */ + interface IFunnelParameterFilterExpression { + + /** FunnelParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter */ + funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + } + + /** Represents a FunnelParameterFilterExpression. */ + class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { + + /** + * Constructs a new FunnelParameterFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); + + /** FunnelParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter. */ + public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + + /** FunnelParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Verifies a FunnelParameterFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilterExpressionList. */ + interface IFunnelParameterFilterExpressionList { + + /** FunnelParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); + } + + /** Represents a FunnelParameterFilterExpressionList. */ + class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); + + /** FunnelParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Verifies a FunnelParameterFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelParameterFilter. */ + interface IFunnelParameterFilter { + + /** FunnelParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + } + + /** Represents a FunnelParameterFilter. */ + class FunnelParameterFilter implements IFunnelParameterFilter { + + /** + * Constructs a new FunnelParameterFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); + + /** FunnelParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** FunnelParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelParameterFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Verifies a FunnelParameterFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelParameterFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @param message FunnelParameterFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelParameterFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunnelResponseMetadata. */ + interface IFunnelResponseMetadata { + + /** FunnelResponseMetadata samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + } + + /** Represents a FunnelResponseMetadata. */ + class FunnelResponseMetadata implements IFunnelResponseMetadata { + + /** + * Constructs a new FunnelResponseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); + + /** FunnelResponseMetadata samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FunnelResponseMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Verifies a FunnelResponseMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunnelResponseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @param message FunnelResponseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { + + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); + + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); + } + + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { + + /** + * Constructs a new SamplingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); + + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SamplingMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Verifies a SamplingMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SamplingMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SamplingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SamplingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } + + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + + /** SamplingLevel enum. */ + enum SamplingLevel { + SAMPLING_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + UNSAMPLED = 3 + } + + /** Properties of a ConversionSpec. */ + interface IConversionSpec { + + /** ConversionSpec conversionActions */ + conversionActions?: (string[]|null); + + /** ConversionSpec attributionModel */ + attributionModel?: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null); + } + + /** Represents a ConversionSpec. */ + class ConversionSpec implements IConversionSpec { + + /** + * Constructs a new ConversionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IConversionSpec); + + /** ConversionSpec conversionActions. */ + public conversionActions: string[]; + + /** ConversionSpec attributionModel. */ + public attributionModel: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel); + + /** + * Creates a new ConversionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionSpec instance + */ + public static create(properties?: google.analytics.data.v1alpha.IConversionSpec): google.analytics.data.v1alpha.ConversionSpec; + + /** + * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @param message ConversionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @param message ConversionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionSpec; + + /** + * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionSpec; + + /** + * Verifies a ConversionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionSpec; + + /** + * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. + * @param message ConversionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ConversionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversionSpec { + + /** AttributionModel enum. */ + enum AttributionModel { + ATTRIBUTION_MODEL_UNSPECIFIED = 0, + DATA_DRIVEN = 1, + LAST_CLICK = 2 + } + } + + /** Properties of a DimensionMetadata. */ + interface IDimensionMetadata { + + /** DimensionMetadata apiName */ + apiName?: (string|null); + + /** DimensionMetadata uiName */ + uiName?: (string|null); + + /** DimensionMetadata description */ + description?: (string|null); + + /** DimensionMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** DimensionMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** DimensionMetadata category */ + category?: (string|null); + + /** DimensionMetadata sections */ + sections?: (google.analytics.data.v1alpha.Section[]|null); + } + + /** Represents a DimensionMetadata. */ + class DimensionMetadata implements IDimensionMetadata { + + /** + * Constructs a new DimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDimensionMetadata); + + /** DimensionMetadata apiName. */ + public apiName: string; + + /** DimensionMetadata uiName. */ + public uiName: string; + + /** DimensionMetadata description. */ + public description: string; + + /** DimensionMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** DimensionMetadata customDefinition. */ + public customDefinition: boolean; + + /** DimensionMetadata category. */ + public category: string; + + /** DimensionMetadata sections. */ + public sections: google.analytics.data.v1alpha.Section[]; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IDimensionMetadata): google.analytics.data.v1alpha.DimensionMetadata; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionMetadata; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionMetadata; + + /** + * Verifies a DimensionMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionMetadata; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @param message DimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricMetadata. */ + interface IMetricMetadata { + + /** MetricMetadata apiName */ + apiName?: (string|null); + + /** MetricMetadata uiName */ + uiName?: (string|null); + + /** MetricMetadata description */ + description?: (string|null); + + /** MetricMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** MetricMetadata type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); + + /** MetricMetadata expression */ + expression?: (string|null); + + /** MetricMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** MetricMetadata blockedReasons */ + blockedReasons?: (google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]|null); + + /** MetricMetadata category */ + category?: (string|null); + + /** MetricMetadata sections */ + sections?: (google.analytics.data.v1alpha.Section[]|null); + } + + /** Represents a MetricMetadata. */ + class MetricMetadata implements IMetricMetadata { + + /** + * Constructs a new MetricMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricMetadata); + + /** MetricMetadata apiName. */ + public apiName: string; + + /** MetricMetadata uiName. */ + public uiName: string; + + /** MetricMetadata description. */ + public description: string; + + /** MetricMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** MetricMetadata type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); + + /** MetricMetadata expression. */ + public expression: string; + + /** MetricMetadata customDefinition. */ + public customDefinition: boolean; + + /** MetricMetadata blockedReasons. */ + public blockedReasons: google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]; + + /** MetricMetadata category. */ + public category: string; + + /** MetricMetadata sections. */ + public sections: google.analytics.data.v1alpha.Section[]; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricMetadata): google.analytics.data.v1alpha.MetricMetadata; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricMetadata; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricMetadata; + + /** + * Verifies a MetricMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricMetadata; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @param message MetricMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetricMetadata { + + /** BlockedReason enum. */ + enum BlockedReason { + BLOCKED_REASON_UNSPECIFIED = 0, + NO_REVENUE_METRICS = 1, + NO_COST_METRICS = 2 + } + } + + /** Properties of a ComparisonMetadata. */ + interface IComparisonMetadata { + + /** ComparisonMetadata apiName */ + apiName?: (string|null); + + /** ComparisonMetadata uiName */ + uiName?: (string|null); + + /** ComparisonMetadata description */ + description?: (string|null); + } + + /** Represents a ComparisonMetadata. */ + class ComparisonMetadata implements IComparisonMetadata { + + /** + * Constructs a new ComparisonMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IComparisonMetadata); + + /** ComparisonMetadata apiName. */ + public apiName: string; + + /** ComparisonMetadata uiName. */ + public uiName: string; + + /** ComparisonMetadata description. */ + public description: string; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ComparisonMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IComparisonMetadata): google.analytics.data.v1alpha.ComparisonMetadata; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ComparisonMetadata; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ComparisonMetadata; + + /** + * Verifies a ComparisonMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComparisonMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ComparisonMetadata; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @param message ComparisonMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComparisonMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComparisonMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversionMetadata. */ + interface IConversionMetadata { + + /** ConversionMetadata conversionAction */ + conversionAction?: (string|null); + + /** ConversionMetadata displayName */ + displayName?: (string|null); + } + + /** Represents a ConversionMetadata. */ + class ConversionMetadata implements IConversionMetadata { + + /** + * Constructs a new ConversionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IConversionMetadata); + + /** ConversionMetadata conversionAction. */ + public conversionAction: string; + + /** ConversionMetadata displayName. */ + public displayName: string; + + /** + * Creates a new ConversionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionMetadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IConversionMetadata): google.analytics.data.v1alpha.ConversionMetadata; + + /** + * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @param message ConversionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @param message ConversionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionMetadata; + + /** + * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionMetadata; + + /** + * Verifies a ConversionMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionMetadata; + + /** + * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. + * @param message ConversionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ConversionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1beta. */ + namespace v1beta { + + /** Represents a BetaAnalyticsData */ + class BetaAnalyticsData extends $protobuf.rpc.Service { + + /** + * Constructs a new BetaAnalyticsData service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BetaAnalyticsData service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BetaAnalyticsData; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunReportResponse + */ + public runReport(request: google.analytics.data.v1beta.IRunReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback): void; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @returns Promise + */ + public runReport(request: google.analytics.data.v1beta.IRunReportRequest): Promise; + + /** + * Calls RunPivotReport. + * @param request RunPivotReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunPivotReportResponse + */ + public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback): void; + + /** + * Calls RunPivotReport. + * @param request RunPivotReportRequest message or plain object + * @returns Promise + */ + public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest): Promise; + + /** + * Calls BatchRunReports. + * @param request BatchRunReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchRunReportsResponse + */ + public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback): void; + + /** + * Calls BatchRunReports. + * @param request BatchRunReportsRequest message or plain object + * @returns Promise + */ + public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest): Promise; + + /** + * Calls BatchRunPivotReports. + * @param request BatchRunPivotReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse + */ + public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback): void; + + /** + * Calls BatchRunPivotReports. + * @param request BatchRunPivotReportsRequest message or plain object + * @returns Promise + */ + public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): Promise; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Metadata + */ + public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback): void; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @returns Promise + */ + public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest): Promise; + + /** + * Calls RunRealtimeReport. + * @param request RunRealtimeReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunRealtimeReportResponse + */ + public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback): void; + + /** + * Calls RunRealtimeReport. + * @param request RunRealtimeReportRequest message or plain object + * @returns Promise + */ + public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest): Promise; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + */ + public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback): void; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @returns Promise + */ + public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest): Promise; + + /** + * Calls CreateAudienceExport. + * @param request CreateAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback): void; + + /** + * Calls CreateAudienceExport. + * @param request CreateAudienceExportRequest message or plain object + * @returns Promise + */ + public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest): Promise; + + /** + * Calls QueryAudienceExport. + * @param request QueryAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAudienceExportResponse + */ + public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback): void; + + /** + * Calls QueryAudienceExport. + * @param request QueryAudienceExportRequest message or plain object + * @returns Promise + */ + public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest): Promise; + + /** + * Calls GetAudienceExport. + * @param request GetAudienceExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AudienceExport + */ + public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback): void; + + /** + * Calls GetAudienceExport. + * @param request GetAudienceExportRequest message or plain object + * @returns Promise + */ + public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest): Promise; + + /** + * Calls ListAudienceExports. + * @param request ListAudienceExportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudienceExportsResponse + */ + public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback): void; + + /** + * Calls ListAudienceExports. + * @param request ListAudienceExportsRequest message or plain object + * @returns Promise + */ + public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest): Promise; + } + + namespace BetaAnalyticsData { + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. + * @param error Error, if any + * @param [response] RunReportResponse + */ + type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. + * @param error Error, if any + * @param [response] RunPivotReportResponse + */ + type RunPivotReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunPivotReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. + * @param error Error, if any + * @param [response] BatchRunReportsResponse + */ + type BatchRunReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunReportsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. + * @param error Error, if any + * @param [response] BatchRunPivotReportsResponse + */ + type BatchRunPivotReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunPivotReportsResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. + * @param error Error, if any + * @param [response] Metadata + */ + type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1beta.Metadata) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. + * @param error Error, if any + * @param [response] RunRealtimeReportResponse + */ + type RunRealtimeReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunRealtimeReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. + * @param error Error, if any + * @param [response] CheckCompatibilityResponse + */ + type CheckCompatibilityCallback = (error: (Error|null), response?: google.analytics.data.v1beta.CheckCompatibilityResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAudienceExportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. + * @param error Error, if any + * @param [response] QueryAudienceExportResponse + */ + type QueryAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.QueryAudienceExportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. + * @param error Error, if any + * @param [response] AudienceExport + */ + type GetAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.AudienceExport) => void; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. + * @param error Error, if any + * @param [response] ListAudienceExportsResponse + */ + type ListAudienceExportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.ListAudienceExportsResponse) => void; + } + + /** Properties of a CheckCompatibilityRequest. */ + interface ICheckCompatibilityRequest { + + /** CheckCompatibilityRequest property */ + property?: (string|null); + + /** CheckCompatibilityRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** CheckCompatibilityRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** CheckCompatibilityRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest compatibilityFilter */ + compatibilityFilter?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a CheckCompatibilityRequest. */ + class CheckCompatibilityRequest implements ICheckCompatibilityRequest { + + /** + * Constructs a new CheckCompatibilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest); + + /** CheckCompatibilityRequest property. */ + public property: string; + + /** CheckCompatibilityRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** CheckCompatibilityRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** CheckCompatibilityRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** CheckCompatibilityRequest compatibilityFilter. */ + public compatibilityFilter: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility); + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Verifies a CheckCompatibilityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityRequest; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @param message CheckCompatibilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckCompatibilityResponse. */ + interface ICheckCompatibilityResponse { + + /** CheckCompatibilityResponse dimensionCompatibilities */ + dimensionCompatibilities?: (google.analytics.data.v1beta.IDimensionCompatibility[]|null); + + /** CheckCompatibilityResponse metricCompatibilities */ + metricCompatibilities?: (google.analytics.data.v1beta.IMetricCompatibility[]|null); + } + + /** Represents a CheckCompatibilityResponse. */ + class CheckCompatibilityResponse implements ICheckCompatibilityResponse { + + /** + * Constructs a new CheckCompatibilityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse); + + /** CheckCompatibilityResponse dimensionCompatibilities. */ + public dimensionCompatibilities: google.analytics.data.v1beta.IDimensionCompatibility[]; + + /** CheckCompatibilityResponse metricCompatibilities. */ + public metricCompatibilities: google.analytics.data.v1beta.IMetricCompatibility[]; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Verifies a CheckCompatibilityResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityResponse; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @param message CheckCompatibilityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata name */ + name?: (string|null); + + /** Metadata dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimensionMetadata[]|null); + + /** Metadata metrics */ + metrics?: (google.analytics.data.v1beta.IMetricMetadata[]|null); + + /** Metadata comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparisonMetadata[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetadata); + + /** Metadata name. */ + public name: string; + + /** Metadata dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimensionMetadata[]; + + /** Metadata metrics. */ + public metrics: google.analytics.data.v1beta.IMetricMetadata[]; + + /** Metadata comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparisonMetadata[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetadata): google.analytics.data.v1beta.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportRequest. */ + interface IRunReportRequest { + + /** RunReportRequest property */ + property?: (string|null); + + /** RunReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); + + /** RunReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest offset */ + offset?: (number|Long|string|null); + + /** RunReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + + /** RunReportRequest orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** RunReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunReportRequest comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparison[]|null); + } + + /** Represents a RunReportRequest. */ + class RunReportRequest implements IRunReportRequest { + + /** + * Constructs a new RunReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunReportRequest); + + /** RunReportRequest property. */ + public property: string; + + /** RunReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1beta.IDateRange[]; + + /** RunReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunReportRequest offset. */ + public offset: (number|Long|string); + + /** RunReportRequest limit. */ + public limit: (number|Long|string); + + /** RunReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** RunReportRequest orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** RunReportRequest currencyCode. */ + public currencyCode: string; + + /** RunReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunReportRequest comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparison[]; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunReportRequest): google.analytics.data.v1beta.RunReportRequest; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunReportRequest; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunReportRequest; + + /** + * Verifies a RunReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportRequest; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @param message RunReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunReportResponse. */ + interface IRunReportResponse { + + /** RunReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse totals */ + totals?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse maximums */ + maximums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse minimums */ + minimums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunReportResponse rowCount */ + rowCount?: (number|null); + + /** RunReportResponse metadata */ + metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunReportResponse. */ + class RunReportResponse implements IRunReportResponse { + + /** + * Constructs a new RunReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunReportResponse); + + /** RunReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse totals. */ + public totals: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse maximums. */ + public maximums: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse minimums. */ + public minimums: google.analytics.data.v1beta.IRow[]; + + /** RunReportResponse rowCount. */ + public rowCount: number; + + /** RunReportResponse metadata. */ + public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunReportResponse): google.analytics.data.v1beta.RunReportResponse; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunReportResponse; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunReportResponse; + + /** + * Verifies a RunReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportResponse; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @param message RunReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunPivotReportRequest. */ + interface IRunPivotReportRequest { + + /** RunPivotReportRequest property */ + property?: (string|null); + + /** RunPivotReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunPivotReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunPivotReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); + + /** RunPivotReportRequest pivots */ + pivots?: (google.analytics.data.v1beta.IPivot[]|null); + + /** RunPivotReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunPivotReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunPivotReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunPivotReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunPivotReportRequest comparisons */ + comparisons?: (google.analytics.data.v1beta.IComparison[]|null); + } + + /** Represents a RunPivotReportRequest. */ + class RunPivotReportRequest implements IRunPivotReportRequest { + + /** + * Constructs a new RunPivotReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunPivotReportRequest); + + /** RunPivotReportRequest property. */ + public property: string; + + /** RunPivotReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunPivotReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunPivotReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1beta.IDateRange[]; + + /** RunPivotReportRequest pivots. */ + public pivots: google.analytics.data.v1beta.IPivot[]; + + /** RunPivotReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunPivotReportRequest currencyCode. */ + public currencyCode: string; + + /** RunPivotReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); + + /** RunPivotReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunPivotReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunPivotReportRequest comparisons. */ + public comparisons: google.analytics.data.v1beta.IComparison[]; + + /** + * Creates a new RunPivotReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunPivotReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunPivotReportRequest): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @param message RunPivotReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @param message RunPivotReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Verifies a RunPivotReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunPivotReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportRequest; + + /** + * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. + * @param message RunPivotReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunPivotReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunPivotReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunPivotReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunPivotReportResponse. */ + interface IRunPivotReportResponse { + + /** RunPivotReportResponse pivotHeaders */ + pivotHeaders?: (google.analytics.data.v1beta.IPivotHeader[]|null); + + /** RunPivotReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunPivotReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunPivotReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunPivotReportResponse aggregates */ + aggregates?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunPivotReportResponse metadata */ + metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunPivotReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunPivotReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunPivotReportResponse. */ + class RunPivotReportResponse implements IRunPivotReportResponse { + + /** + * Constructs a new RunPivotReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunPivotReportResponse); + + /** RunPivotReportResponse pivotHeaders. */ + public pivotHeaders: google.analytics.data.v1beta.IPivotHeader[]; + + /** RunPivotReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunPivotReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunPivotReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunPivotReportResponse aggregates. */ + public aggregates: google.analytics.data.v1beta.IRow[]; + + /** RunPivotReportResponse metadata. */ + public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); + + /** RunPivotReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunPivotReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunPivotReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunPivotReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunPivotReportResponse): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @param message RunPivotReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @param message RunPivotReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Verifies a RunPivotReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunPivotReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportResponse; + + /** + * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. + * @param message RunPivotReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunPivotReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunPivotReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunPivotReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunReportsRequest. */ + interface IBatchRunReportsRequest { + + /** BatchRunReportsRequest property */ + property?: (string|null); + + /** BatchRunReportsRequest requests */ + requests?: (google.analytics.data.v1beta.IRunReportRequest[]|null); + } + + /** Represents a BatchRunReportsRequest. */ + class BatchRunReportsRequest implements IBatchRunReportsRequest { + + /** + * Constructs a new BatchRunReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest); + + /** BatchRunReportsRequest property. */ + public property: string; + + /** BatchRunReportsRequest requests. */ + public requests: google.analytics.data.v1beta.IRunReportRequest[]; + + /** + * Creates a new BatchRunReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunReportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @param message BatchRunReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @param message BatchRunReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Verifies a BatchRunReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsRequest; + + /** + * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. + * @param message BatchRunReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunReportsResponse. */ + interface IBatchRunReportsResponse { + + /** BatchRunReportsResponse reports */ + reports?: (google.analytics.data.v1beta.IRunReportResponse[]|null); + + /** BatchRunReportsResponse kind */ + kind?: (string|null); + } + + /** Represents a BatchRunReportsResponse. */ + class BatchRunReportsResponse implements IBatchRunReportsResponse { + + /** + * Constructs a new BatchRunReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse); + + /** BatchRunReportsResponse reports. */ + public reports: google.analytics.data.v1beta.IRunReportResponse[]; + + /** BatchRunReportsResponse kind. */ + public kind: string; + + /** + * Creates a new BatchRunReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunReportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @param message BatchRunReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @param message BatchRunReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Verifies a BatchRunReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsResponse; + + /** + * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. + * @param message BatchRunReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunPivotReportsRequest. */ + interface IBatchRunPivotReportsRequest { + + /** BatchRunPivotReportsRequest property */ + property?: (string|null); + + /** BatchRunPivotReportsRequest requests */ + requests?: (google.analytics.data.v1beta.IRunPivotReportRequest[]|null); + } + + /** Represents a BatchRunPivotReportsRequest. */ + class BatchRunPivotReportsRequest implements IBatchRunPivotReportsRequest { + + /** + * Constructs a new BatchRunPivotReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest); + + /** BatchRunPivotReportsRequest property. */ + public property: string; + + /** BatchRunPivotReportsRequest requests. */ + public requests: google.analytics.data.v1beta.IRunPivotReportRequest[]; + + /** + * Creates a new BatchRunPivotReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunPivotReportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @param message BatchRunPivotReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @param message BatchRunPivotReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Verifies a BatchRunPivotReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunPivotReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsRequest; + + /** + * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. + * @param message BatchRunPivotReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunPivotReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunPivotReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchRunPivotReportsResponse. */ + interface IBatchRunPivotReportsResponse { + + /** BatchRunPivotReportsResponse pivotReports */ + pivotReports?: (google.analytics.data.v1beta.IRunPivotReportResponse[]|null); + + /** BatchRunPivotReportsResponse kind */ + kind?: (string|null); + } + + /** Represents a BatchRunPivotReportsResponse. */ + class BatchRunPivotReportsResponse implements IBatchRunPivotReportsResponse { + + /** + * Constructs a new BatchRunPivotReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse); + + /** BatchRunPivotReportsResponse pivotReports. */ + public pivotReports: google.analytics.data.v1beta.IRunPivotReportResponse[]; + + /** BatchRunPivotReportsResponse kind. */ + public kind: string; + + /** + * Creates a new BatchRunPivotReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchRunPivotReportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @param message BatchRunPivotReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @param message BatchRunPivotReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Verifies a BatchRunPivotReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchRunPivotReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsResponse; + + /** + * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. + * @param message BatchRunPivotReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchRunPivotReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchRunPivotReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMetadataRequest. */ + interface IGetMetadataRequest { + + /** GetMetadataRequest name */ + name?: (string|null); + } + + /** Represents a GetMetadataRequest. */ + class GetMetadataRequest implements IGetMetadataRequest { + + /** + * Constructs a new GetMetadataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IGetMetadataRequest); + + /** GetMetadataRequest name. */ + public name: string; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetadataRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IGetMetadataRequest): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Verifies a GetMetadataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetadataRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetMetadataRequest; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @param message GetMetadataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMetadataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMetadataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunRealtimeReportRequest. */ + interface IRunRealtimeReportRequest { + + /** RunRealtimeReportRequest property */ + property?: (string|null); + + /** RunRealtimeReportRequest dimensions */ + dimensions?: (google.analytics.data.v1beta.IDimension[]|null); + + /** RunRealtimeReportRequest metrics */ + metrics?: (google.analytics.data.v1beta.IMetric[]|null); + + /** RunRealtimeReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunRealtimeReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + + /** RunRealtimeReportRequest orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** RunRealtimeReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunRealtimeReportRequest minuteRanges */ + minuteRanges?: (google.analytics.data.v1beta.IMinuteRange[]|null); + } + + /** Represents a RunRealtimeReportRequest. */ + class RunRealtimeReportRequest implements IRunRealtimeReportRequest { + + /** + * Constructs a new RunRealtimeReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest); + + /** RunRealtimeReportRequest property. */ + public property: string; + + /** RunRealtimeReportRequest dimensions. */ + public dimensions: google.analytics.data.v1beta.IDimension[]; + + /** RunRealtimeReportRequest metrics. */ + public metrics: google.analytics.data.v1beta.IMetric[]; + + /** RunRealtimeReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** RunRealtimeReportRequest limit. */ + public limit: (number|Long|string); + + /** RunRealtimeReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** RunRealtimeReportRequest orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** RunRealtimeReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunRealtimeReportRequest minuteRanges. */ + public minuteRanges: google.analytics.data.v1beta.IMinuteRange[]; + + /** + * Creates a new RunRealtimeReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunRealtimeReportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @param message RunRealtimeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @param message RunRealtimeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Verifies a RunRealtimeReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunRealtimeReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportRequest; + + /** + * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. + * @param message RunRealtimeReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunRealtimeReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunRealtimeReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunRealtimeReportResponse. */ + interface IRunRealtimeReportResponse { + + /** RunRealtimeReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); + + /** RunRealtimeReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); + + /** RunRealtimeReportResponse rows */ + rows?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse totals */ + totals?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse maximums */ + maximums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse minimums */ + minimums?: (google.analytics.data.v1beta.IRow[]|null); + + /** RunRealtimeReportResponse rowCount */ + rowCount?: (number|null); + + /** RunRealtimeReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunRealtimeReportResponse kind */ + kind?: (string|null); + } + + /** Represents a RunRealtimeReportResponse. */ + class RunRealtimeReportResponse implements IRunRealtimeReportResponse { + + /** + * Constructs a new RunRealtimeReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse); + + /** RunRealtimeReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; + + /** RunRealtimeReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; + + /** RunRealtimeReportResponse rows. */ + public rows: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse totals. */ + public totals: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse maximums. */ + public maximums: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse minimums. */ + public minimums: google.analytics.data.v1beta.IRow[]; + + /** RunRealtimeReportResponse rowCount. */ + public rowCount: number; + + /** RunRealtimeReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); + + /** RunRealtimeReportResponse kind. */ + public kind: string; + + /** + * Creates a new RunRealtimeReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunRealtimeReportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @param message RunRealtimeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @param message RunRealtimeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Verifies a RunRealtimeReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunRealtimeReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportResponse; + + /** + * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. + * @param message RunRealtimeReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunRealtimeReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunRealtimeReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceExportRequest. */ + interface IGetAudienceExportRequest { + + /** GetAudienceExportRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceExportRequest. */ + class GetAudienceExportRequest implements IGetAudienceExportRequest { + + /** + * Constructs a new GetAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest); + + /** GetAudienceExportRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @param message GetAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @param message GetAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Verifies a GetAudienceExportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetAudienceExportRequest; + + /** + * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. + * @param message GetAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.GetAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceExportsRequest. */ + interface IListAudienceExportsRequest { + + /** ListAudienceExportsRequest parent */ + parent?: (string|null); + + /** ListAudienceExportsRequest pageSize */ + pageSize?: (number|null); + + /** ListAudienceExportsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudienceExportsRequest. */ + class ListAudienceExportsRequest implements IListAudienceExportsRequest { + + /** + * Constructs a new ListAudienceExportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest); + + /** ListAudienceExportsRequest parent. */ + public parent: string; + + /** ListAudienceExportsRequest pageSize. */ + public pageSize: number; + + /** ListAudienceExportsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudienceExportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceExportsRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @param message ListAudienceExportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @param message ListAudienceExportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Verifies a ListAudienceExportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceExportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsRequest; + + /** + * Creates a plain object from a ListAudienceExportsRequest message. Also converts values to other types if specified. + * @param message ListAudienceExportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceExportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceExportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudienceExportsResponse. */ + interface IListAudienceExportsResponse { + + /** ListAudienceExportsResponse audienceExports */ + audienceExports?: (google.analytics.data.v1beta.IAudienceExport[]|null); + + /** ListAudienceExportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudienceExportsResponse. */ + class ListAudienceExportsResponse implements IListAudienceExportsResponse { + + /** + * Constructs a new ListAudienceExportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse); + + /** ListAudienceExportsResponse audienceExports. */ + public audienceExports: google.analytics.data.v1beta.IAudienceExport[]; + + /** ListAudienceExportsResponse nextPageToken. */ + public nextPageToken?: (string|null); + + /** + * Creates a new ListAudienceExportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudienceExportsResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @param message ListAudienceExportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @param message ListAudienceExportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Verifies a ListAudienceExportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudienceExportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsResponse; + + /** + * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. + * @param message ListAudienceExportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudienceExportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudienceExportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceExportRequest. */ + interface ICreateAudienceExportRequest { + + /** CreateAudienceExportRequest parent */ + parent?: (string|null); + + /** CreateAudienceExportRequest audienceExport */ + audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + } + + /** Represents a CreateAudienceExportRequest. */ + class CreateAudienceExportRequest implements ICreateAudienceExportRequest { + + /** + * Constructs a new CreateAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest); + + /** CreateAudienceExportRequest parent. */ + public parent: string; + + /** CreateAudienceExportRequest audienceExport. */ + public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** + * Creates a new CreateAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @param message CreateAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @param message CreateAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Verifies a CreateAudienceExportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CreateAudienceExportRequest; + + /** + * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. + * @param message CreateAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CreateAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceExport. */ + interface IAudienceExport { + + /** AudienceExport name */ + name?: (string|null); + + /** AudienceExport audience */ + audience?: (string|null); + + /** AudienceExport audienceDisplayName */ + audienceDisplayName?: (string|null); + + /** AudienceExport dimensions */ + dimensions?: (google.analytics.data.v1beta.IAudienceDimension[]|null); + + /** AudienceExport state */ + state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); + + /** AudienceExport beginCreatingTime */ + beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceExport creationQuotaTokensCharged */ + creationQuotaTokensCharged?: (number|null); + + /** AudienceExport rowCount */ + rowCount?: (number|null); + + /** AudienceExport errorMessage */ + errorMessage?: (string|null); + + /** AudienceExport percentageCompleted */ + percentageCompleted?: (number|null); + } + + /** Represents an AudienceExport. */ + class AudienceExport implements IAudienceExport { + + /** + * Constructs a new AudienceExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceExport); + + /** AudienceExport name. */ + public name: string; + + /** AudienceExport audience. */ + public audience: string; + + /** AudienceExport audienceDisplayName. */ + public audienceDisplayName: string; + + /** AudienceExport dimensions. */ + public dimensions: google.analytics.data.v1beta.IAudienceDimension[]; + + /** AudienceExport state. */ + public state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); + + /** AudienceExport beginCreatingTime. */ + public beginCreatingTime?: (google.protobuf.ITimestamp|null); + + /** AudienceExport creationQuotaTokensCharged. */ + public creationQuotaTokensCharged: number; + + /** AudienceExport rowCount. */ + public rowCount?: (number|null); + + /** AudienceExport errorMessage. */ + public errorMessage?: (string|null); + + /** AudienceExport percentageCompleted. */ + public percentageCompleted?: (number|null); + + /** + * Creates a new AudienceExport instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceExport instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceExport): google.analytics.data.v1beta.AudienceExport; + + /** + * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @param message AudienceExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @param message AudienceExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceExport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceExport; + + /** + * Decodes an AudienceExport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceExport; + + /** + * Verifies an AudienceExport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceExport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceExport + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExport; + + /** + * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. + * @param message AudienceExport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceExport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceExport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceExport { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + FAILED = 3 + } + } + + /** Properties of an AudienceExportMetadata. */ + interface IAudienceExportMetadata { + } + + /** Represents an AudienceExportMetadata. */ + class AudienceExportMetadata implements IAudienceExportMetadata { + + /** + * Constructs a new AudienceExportMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceExportMetadata); + + /** + * Creates a new AudienceExportMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceExportMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceExportMetadata): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @param message AudienceExportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @param message AudienceExportMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Verifies an AudienceExportMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceExportMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExportMetadata; + + /** + * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. + * @param message AudienceExportMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceExportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceExportMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceExportMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceExportRequest. */ + interface IQueryAudienceExportRequest { + + /** QueryAudienceExportRequest name */ + name?: (string|null); + + /** QueryAudienceExportRequest offset */ + offset?: (number|Long|string|null); + + /** QueryAudienceExportRequest limit */ + limit?: (number|Long|string|null); + } + + /** Represents a QueryAudienceExportRequest. */ + class QueryAudienceExportRequest implements IQueryAudienceExportRequest { + + /** + * Constructs a new QueryAudienceExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest); + + /** QueryAudienceExportRequest name. */ + public name: string; + + /** QueryAudienceExportRequest offset. */ + public offset: (number|Long|string); + + /** QueryAudienceExportRequest limit. */ + public limit: (number|Long|string); + + /** + * Creates a new QueryAudienceExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceExportRequest instance + */ + public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @param message QueryAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @param message QueryAudienceExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Verifies a QueryAudienceExportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportRequest; + + /** + * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. + * @param message QueryAudienceExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryAudienceExportResponse. */ + interface IQueryAudienceExportResponse { + + /** QueryAudienceExportResponse audienceExport */ + audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** QueryAudienceExportResponse audienceRows */ + audienceRows?: (google.analytics.data.v1beta.IAudienceRow[]|null); + + /** QueryAudienceExportResponse rowCount */ + rowCount?: (number|null); + } + + /** Represents a QueryAudienceExportResponse. */ + class QueryAudienceExportResponse implements IQueryAudienceExportResponse { + + /** + * Constructs a new QueryAudienceExportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse); + + /** QueryAudienceExportResponse audienceExport. */ + public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); + + /** QueryAudienceExportResponse audienceRows. */ + public audienceRows: google.analytics.data.v1beta.IAudienceRow[]; + + /** QueryAudienceExportResponse rowCount. */ + public rowCount?: (number|null); + + /** + * Creates a new QueryAudienceExportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAudienceExportResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @param message QueryAudienceExportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @param message QueryAudienceExportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Verifies a QueryAudienceExportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAudienceExportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportResponse; + + /** + * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. + * @param message QueryAudienceExportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAudienceExportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryAudienceExportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceRow. */ + interface IAudienceRow { + + /** AudienceRow dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IAudienceDimensionValue[]|null); + } + + /** Represents an AudienceRow. */ + class AudienceRow implements IAudienceRow { + + /** + * Constructs a new AudienceRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceRow); + + /** AudienceRow dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IAudienceDimensionValue[]; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceRow instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceRow): google.analytics.data.v1beta.AudienceRow; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @param message AudienceRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceRow; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceRow; + + /** + * Verifies an AudienceRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceRow; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @param message AudienceRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimension. */ + interface IAudienceDimension { + + /** AudienceDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AudienceDimension. */ + class AudienceDimension implements IAudienceDimension { + + /** + * Constructs a new AudienceDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceDimension); + + /** AudienceDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimension instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceDimension): google.analytics.data.v1beta.AudienceDimension; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @param message AudienceDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceDimension; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceDimension; + + /** + * Verifies an AudienceDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimension; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @param message AudienceDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceDimensionValue. */ + interface IAudienceDimensionValue { + + /** AudienceDimensionValue value */ + value?: (string|null); + } + + /** Represents an AudienceDimensionValue. */ + class AudienceDimensionValue implements IAudienceDimensionValue { + + /** + * Constructs a new AudienceDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IAudienceDimensionValue); + + /** AudienceDimensionValue value. */ + public value?: (string|null); + + /** AudienceDimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IAudienceDimensionValue): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @param message AudienceDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Verifies an AudienceDimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimensionValue; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @param message AudienceDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateRange. */ + interface IDateRange { + + /** DateRange startDate */ + startDate?: (string|null); + + /** DateRange endDate */ + endDate?: (string|null); + + /** DateRange name */ + name?: (string|null); + } + + /** Represents a DateRange. */ + class DateRange implements IDateRange { + + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDateRange); + + /** DateRange startDate. */ + public startDate: string; + + /** DateRange endDate. */ + public endDate: string; + + /** DateRange name. */ + public name: string; + + /** + * Creates a new DateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns DateRange instance + */ + public static create(properties?: google.analytics.data.v1beta.IDateRange): google.analytics.data.v1beta.DateRange; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DateRange; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DateRange; + + /** + * Verifies a DateRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DateRange; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MinuteRange. */ + interface IMinuteRange { + + /** MinuteRange startMinutesAgo */ + startMinutesAgo?: (number|null); + + /** MinuteRange endMinutesAgo */ + endMinutesAgo?: (number|null); + + /** MinuteRange name */ + name?: (string|null); + } + + /** Represents a MinuteRange. */ + class MinuteRange implements IMinuteRange { + + /** + * Constructs a new MinuteRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMinuteRange); + + /** MinuteRange startMinutesAgo. */ + public startMinutesAgo?: (number|null); + + /** MinuteRange endMinutesAgo. */ + public endMinutesAgo?: (number|null); + + /** MinuteRange name. */ + public name: string; + + /** + * Creates a new MinuteRange instance using the specified properties. + * @param [properties] Properties to set + * @returns MinuteRange instance + */ + public static create(properties?: google.analytics.data.v1beta.IMinuteRange): google.analytics.data.v1beta.MinuteRange; + + /** + * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @param message MinuteRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @param message MinuteRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MinuteRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MinuteRange; + + /** + * Decodes a MinuteRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MinuteRange; + + /** + * Verifies a MinuteRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MinuteRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MinuteRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MinuteRange; + + /** + * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. + * @param message MinuteRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MinuteRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MinuteRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MinuteRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension name */ + name?: (string|null); + + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimension); + + /** Dimension name. */ + public name: string; + + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimension): google.analytics.data.v1beta.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Dimension; + + /** + * Verifies a Dimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { + + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); + } + + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { + + /** + * Constructs a new DimensionExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionExpression); + + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionExpression): google.analytics.data.v1beta.DimensionExpression; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression; + + /** + * Verifies a DimensionExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionExpression { + + /** Properties of a CaseExpression. */ + interface ICaseExpression { + + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } + + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { + + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression); + + /** CaseExpression dimensionName. */ + public dimensionName: string; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Verifies a CaseExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.CaseExpression; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { + + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); + + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } + + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { + + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression); + + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; + + /** ConcatenateExpression delimiter. */ + public delimiter: string; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetric); + + /** Metric name. */ + public name: string; + + /** Metric expression. */ + public expression: string; + + /** Metric invisible. */ + public invisible: boolean; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetric): google.analytics.data.v1beta.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Comparison. */ + interface IComparison { + + /** Comparison name */ + name?: (string|null); + + /** Comparison dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** Comparison comparison */ + comparison?: (string|null); + } + + /** Represents a Comparison. */ + class Comparison implements IComparison { + + /** + * Constructs a new Comparison. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IComparison); + + /** Comparison name. */ + public name?: (string|null); + + /** Comparison dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** Comparison comparison. */ + public comparison?: (string|null); + + /** Comparison oneComparison. */ + public oneComparison?: ("dimensionFilter"|"comparison"); + + /** + * Creates a new Comparison instance using the specified properties. + * @param [properties] Properties to set + * @returns Comparison instance + */ + public static create(properties?: google.analytics.data.v1beta.IComparison): google.analytics.data.v1beta.Comparison; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Comparison; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Comparison; + + /** + * Verifies a Comparison message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Comparison + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Comparison; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @param message Comparison + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Comparison to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Comparison + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpression. */ + interface IFilterExpression { + + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1beta.IFilter|null); + } + + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { + + /** + * Constructs a new FilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilterExpression); + + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1beta.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpression instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilterExpression): google.analytics.data.v1beta.FilterExpression; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.FilterExpression; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.FilterExpression; + + /** + * Verifies a FilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpression; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { + + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1beta.IFilterExpression[]|null); + } + + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { + + /** + * Constructs a new FilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilterExpressionList); + + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1beta.IFilterExpression[]; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterExpressionList instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilterExpressionList): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Verifies a FilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpressionList; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter fieldName */ + fieldName?: (string|null); + + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); + + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); + + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); + + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); + + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IFilter); + + /** Filter fieldName. */ + public fieldName: string; + + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); + + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); + + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); + + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1beta.IFilter): google.analytics.data.v1beta.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Filter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IStringFilter): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Verifies a StringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IInListFilter): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Verifies an InListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1beta.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1beta.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.INumericFilter): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Verifies a NumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1beta.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1beta.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Verifies a BetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Verifies an EmptyFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Filter.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); + + /** OrderBy pivot */ + pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); + + /** OrderBy pivot. */ + public pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"|"pivot"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.IOrderBy): google.analytics.data.v1beta.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy; + + /** + * Verifies an OrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + + /** Properties of a PivotOrderBy. */ + interface IPivotOrderBy { + + /** PivotOrderBy metricName */ + metricName?: (string|null); + + /** PivotOrderBy pivotSelections */ + pivotSelections?: (google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]|null); + } + + /** Represents a PivotOrderBy. */ + class PivotOrderBy implements IPivotOrderBy { + + /** + * Constructs a new PivotOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy); + + /** PivotOrderBy metricName. */ + public metricName: string; + + /** PivotOrderBy pivotSelections. */ + public pivotSelections: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]; + + /** + * Creates a new PivotOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotOrderBy instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @param message PivotOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @param message PivotOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Verifies a PivotOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PivotOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy; + + /** + * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. + * @param message PivotOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PivotOrderBy { + + /** Properties of a PivotSelection. */ + interface IPivotSelection { + + /** PivotSelection dimensionName */ + dimensionName?: (string|null); + + /** PivotSelection dimensionValue */ + dimensionValue?: (string|null); + } + + /** Represents a PivotSelection. */ + class PivotSelection implements IPivotSelection { + + /** + * Constructs a new PivotSelection. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection); + + /** PivotSelection dimensionName. */ + public dimensionName: string; + + /** PivotSelection dimensionValue. */ + public dimensionValue: string; + + /** + * Creates a new PivotSelection instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotSelection instance + */ + public static create(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @param message PivotSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @param message PivotSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotSelection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Decodes a PivotSelection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Verifies a PivotSelection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PivotSelection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotSelection + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; + + /** + * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. + * @param message PivotSelection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotSelection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotSelection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Pivot. */ + interface IPivot { + + /** Pivot fieldNames */ + fieldNames?: (string[]|null); + + /** Pivot orderBys */ + orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); + + /** Pivot offset */ + offset?: (number|Long|string|null); + + /** Pivot limit */ + limit?: (number|Long|string|null); + + /** Pivot metricAggregations */ + metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); + } + + /** Represents a Pivot. */ + class Pivot implements IPivot { + + /** + * Constructs a new Pivot. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivot); + + /** Pivot fieldNames. */ + public fieldNames: string[]; + + /** Pivot orderBys. */ + public orderBys: google.analytics.data.v1beta.IOrderBy[]; + + /** Pivot offset. */ + public offset: (number|Long|string); + + /** Pivot limit. */ + public limit: (number|Long|string); + + /** Pivot metricAggregations. */ + public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; + + /** + * Creates a new Pivot instance using the specified properties. + * @param [properties] Properties to set + * @returns Pivot instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivot): google.analytics.data.v1beta.Pivot; + + /** + * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @param message Pivot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @param message Pivot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pivot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Pivot; + + /** + * Decodes a Pivot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Pivot; + + /** + * Verifies a Pivot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Pivot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pivot + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Pivot; + + /** + * Creates a plain object from a Pivot message. Also converts values to other types if specified. + * @param message Pivot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Pivot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pivot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pivot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortSpec. */ + interface ICohortSpec { + + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1beta.ICohort[]|null); + + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); + + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); + } + + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { + + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortSpec); + + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1beta.ICohort[]; + + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); + + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); + + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortSpec): google.analytics.data.v1beta.CohortSpec; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortSpec; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortSpec; + + /** + * Verifies a CohortSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortSpec; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cohort. */ + interface ICohort { + + /** Cohort name */ + name?: (string|null); + + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1beta.IDateRange|null); + } + + /** Represents a Cohort. */ + class Cohort implements ICohort { + + /** + * Constructs a new Cohort. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohort); + + /** Cohort name. */ + public name: string; + + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1beta.IDateRange|null); + + /** + * Creates a new Cohort instance using the specified properties. + * @param [properties] Properties to set + * @returns Cohort instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohort): google.analytics.data.v1beta.Cohort; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Cohort; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Cohort; + + /** + * Verifies a Cohort message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cohort + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Cohort; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cohort to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cohort + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { + + /** + * Constructs a new CohortsRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortsRange instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortsRange): google.analytics.data.v1beta.CohortsRange; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortsRange; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortsRange; + + /** + * Verifies a CohortsRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortsRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortsRange; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortsRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortsRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CohortsRange { + + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } + + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); + } + + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { + + /** + * Constructs a new CohortReportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ICohortReportSettings); + + /** CohortReportSettings accumulate. */ + public accumulate: boolean; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortReportSettings instance + */ + public static create(properties?: google.analytics.data.v1beta.ICohortReportSettings): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Verifies a CohortReportSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortReportSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortReportSettings; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CohortReportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CohortReportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { + + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); + + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1beta.ISamplingMetadata[]|null); + } + + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { + + /** + * Constructs a new ResponseMetaData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IResponseMetaData); + + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1beta.ISamplingMetadata[]; + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetaData instance + */ + public static create(properties?: google.analytics.data.v1beta.IResponseMetaData): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Verifies a ResponseMetaData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetaData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1beta.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1beta.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { + + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); + + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); + } + + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { + + /** + * Constructs a new SamplingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.ISamplingMetadata); + + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SamplingMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.ISamplingMetadata): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Verifies a SamplingMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SamplingMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.SamplingMetadata; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SamplingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SamplingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { + + /** DimensionHeader name */ + name?: (string|null); + } + + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { + + /** + * Constructs a new DimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionHeader); + + /** DimensionHeader name. */ + public name: string; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionHeader): google.analytics.data.v1beta.DimensionHeader; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionHeader; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionHeader; + + /** + * Verifies a DimensionHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionHeader; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricHeader. */ + interface IMetricHeader { + + /** MetricHeader name */ + name?: (string|null); + + /** MetricHeader type */ + type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); + } + + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { + + /** + * Constructs a new MetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricHeader); + + /** MetricHeader name. */ + public name: string; + + /** MetricHeader type. */ + public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); + + /** + * Creates a new MetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricHeader): google.analytics.data.v1beta.MetricHeader; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricHeader; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricHeader; + + /** + * Verifies a MetricHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricHeader; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PivotHeader. */ + interface IPivotHeader { + + /** PivotHeader pivotDimensionHeaders */ + pivotDimensionHeaders?: (google.analytics.data.v1beta.IPivotDimensionHeader[]|null); + + /** PivotHeader rowCount */ + rowCount?: (number|null); + } + + /** Represents a PivotHeader. */ + class PivotHeader implements IPivotHeader { + + /** + * Constructs a new PivotHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivotHeader); + + /** PivotHeader pivotDimensionHeaders. */ + public pivotDimensionHeaders: google.analytics.data.v1beta.IPivotDimensionHeader[]; + + /** PivotHeader rowCount. */ + public rowCount: number; + + /** + * Creates a new PivotHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivotHeader): google.analytics.data.v1beta.PivotHeader; + + /** + * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @param message PivotHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @param message PivotHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PivotHeader; + + /** + * Decodes a PivotHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PivotHeader; + + /** + * Verifies a PivotHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PivotHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotHeader; + + /** + * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. + * @param message PivotHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PivotHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PivotDimensionHeader. */ + interface IPivotDimensionHeader { + + /** PivotDimensionHeader dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); + } + + /** Represents a PivotDimensionHeader. */ + class PivotDimensionHeader implements IPivotDimensionHeader { + + /** + * Constructs a new PivotDimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPivotDimensionHeader); + + /** PivotDimensionHeader dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; + + /** + * Creates a new PivotDimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PivotDimensionHeader instance + */ + public static create(properties?: google.analytics.data.v1beta.IPivotDimensionHeader): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @param message PivotDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @param message PivotDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Verifies a PivotDimensionHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PivotDimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotDimensionHeader; + + /** + * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. + * @param message PivotDimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PivotDimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PivotDimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PivotDimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); + + /** Row metricValues */ + metricValues?: (google.analytics.data.v1beta.IMetricValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IRow); + + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1beta.IMetricValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.analytics.data.v1beta.IRow): google.analytics.data.v1beta.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Row; + + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionValue. */ + interface IDimensionValue { + + /** DimensionValue value */ + value?: (string|null); + } + + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { + + /** + * Constructs a new DimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionValue); + + /** DimensionValue value. */ + public value?: (string|null); + + /** DimensionValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new DimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionValue): google.analytics.data.v1beta.DimensionValue; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionValue; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionValue; + + /** + * Verifies a DimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionValue; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricValue. */ + interface IMetricValue { + + /** MetricValue value */ + value?: (string|null); + } + + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { + + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricValue); + + /** MetricValue value. */ + public value?: (string|null); + + /** MetricValue oneValue. */ + public oneValue?: "value"; + + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricValue): google.analytics.data.v1beta.MetricValue; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricValue; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricValue; + + /** + * Verifies a MetricValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricValue; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1beta.INumericValue): google.analytics.data.v1beta.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { + + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + } + + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { + + /** + * Constructs a new PropertyQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IPropertyQuota); + + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyQuota instance + */ + public static create(properties?: google.analytics.data.v1beta.IPropertyQuota): google.analytics.data.v1beta.PropertyQuota; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PropertyQuota; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PropertyQuota; + + /** + * Verifies a PropertyQuota message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PropertyQuota; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { + + /** QuotaStatus consumed */ + consumed?: (number|null); + + /** QuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { + + /** + * Constructs a new QuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IQuotaStatus); + + /** QuotaStatus consumed. */ + public consumed?: (number|null); + + /** QuotaStatus remaining. */ + public remaining?: (number|null); + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaStatus instance + */ + public static create(properties?: google.analytics.data.v1beta.IQuotaStatus): google.analytics.data.v1beta.QuotaStatus; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QuotaStatus; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QuotaStatus; + + /** + * Verifies a QuotaStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QuotaStatus; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionMetadata. */ + interface IDimensionMetadata { + + /** DimensionMetadata apiName */ + apiName?: (string|null); + + /** DimensionMetadata uiName */ + uiName?: (string|null); + + /** DimensionMetadata description */ + description?: (string|null); + + /** DimensionMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** DimensionMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** DimensionMetadata category */ + category?: (string|null); + } + + /** Represents a DimensionMetadata. */ + class DimensionMetadata implements IDimensionMetadata { + + /** + * Constructs a new DimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionMetadata); + + /** DimensionMetadata apiName. */ + public apiName: string; + + /** DimensionMetadata uiName. */ + public uiName: string; + + /** DimensionMetadata description. */ + public description: string; + + /** DimensionMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** DimensionMetadata customDefinition. */ + public customDefinition: boolean; + + /** DimensionMetadata category. */ + public category: string; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionMetadata): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Verifies a DimensionMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionMetadata; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @param message DimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricMetadata. */ + interface IMetricMetadata { + + /** MetricMetadata apiName */ + apiName?: (string|null); + + /** MetricMetadata uiName */ + uiName?: (string|null); + + /** MetricMetadata description */ + description?: (string|null); + + /** MetricMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** MetricMetadata type */ + type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); + + /** MetricMetadata expression */ + expression?: (string|null); + + /** MetricMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** MetricMetadata blockedReasons */ + blockedReasons?: (google.analytics.data.v1beta.MetricMetadata.BlockedReason[]|null); + + /** MetricMetadata category */ + category?: (string|null); + } + + /** Represents a MetricMetadata. */ + class MetricMetadata implements IMetricMetadata { + + /** + * Constructs a new MetricMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricMetadata); + + /** MetricMetadata apiName. */ + public apiName: string; + + /** MetricMetadata uiName. */ + public uiName: string; + + /** MetricMetadata description. */ + public description: string; + + /** MetricMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** MetricMetadata type. */ + public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); + + /** MetricMetadata expression. */ + public expression: string; + + /** MetricMetadata customDefinition. */ + public customDefinition: boolean; + + /** MetricMetadata blockedReasons. */ + public blockedReasons: google.analytics.data.v1beta.MetricMetadata.BlockedReason[]; + + /** MetricMetadata category. */ + public category: string; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricMetadata): google.analytics.data.v1beta.MetricMetadata; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricMetadata; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricMetadata; + + /** + * Verifies a MetricMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricMetadata; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @param message MetricMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetricMetadata { + + /** BlockedReason enum. */ + enum BlockedReason { + BLOCKED_REASON_UNSPECIFIED = 0, + NO_REVENUE_METRICS = 1, + NO_COST_METRICS = 2 + } + } + + /** Properties of a ComparisonMetadata. */ + interface IComparisonMetadata { + + /** ComparisonMetadata apiName */ + apiName?: (string|null); + + /** ComparisonMetadata uiName */ + uiName?: (string|null); + + /** ComparisonMetadata description */ + description?: (string|null); + } + + /** Represents a ComparisonMetadata. */ + class ComparisonMetadata implements IComparisonMetadata { + + /** + * Constructs a new ComparisonMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IComparisonMetadata); + + /** ComparisonMetadata apiName. */ + public apiName: string; + + /** ComparisonMetadata uiName. */ + public uiName: string; + + /** ComparisonMetadata description. */ + public description: string; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ComparisonMetadata instance + */ + public static create(properties?: google.analytics.data.v1beta.IComparisonMetadata): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Verifies a ComparisonMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComparisonMetadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ComparisonMetadata; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @param message ComparisonMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComparisonMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComparisonMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionCompatibility. */ + interface IDimensionCompatibility { + + /** DimensionCompatibility dimensionMetadata */ + dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); + + /** DimensionCompatibility compatibility */ + compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a DimensionCompatibility. */ + class DimensionCompatibility implements IDimensionCompatibility { + + /** + * Constructs a new DimensionCompatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IDimensionCompatibility); + + /** DimensionCompatibility dimensionMetadata. */ + public dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); + + /** DimensionCompatibility compatibility. */ + public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + + /** + * Creates a new DimensionCompatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionCompatibility instance + */ + public static create(properties?: google.analytics.data.v1beta.IDimensionCompatibility): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @param message DimensionCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @param message DimensionCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Verifies a DimensionCompatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionCompatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionCompatibility + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionCompatibility; + + /** + * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. + * @param message DimensionCompatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.DimensionCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionCompatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionCompatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetricCompatibility. */ + interface IMetricCompatibility { + + /** MetricCompatibility metricMetadata */ + metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); + + /** MetricCompatibility compatibility */ + compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + } + + /** Represents a MetricCompatibility. */ + class MetricCompatibility implements IMetricCompatibility { + + /** + * Constructs a new MetricCompatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1beta.IMetricCompatibility); + + /** MetricCompatibility metricMetadata. */ + public metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); + + /** MetricCompatibility compatibility. */ + public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); + + /** + * Creates a new MetricCompatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricCompatibility instance + */ + public static create(properties?: google.analytics.data.v1beta.IMetricCompatibility): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @param message MetricCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @param message MetricCompatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Verifies a MetricCompatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricCompatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricCompatibility + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricCompatibility; + + /** + * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. + * @param message MetricCompatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1beta.MetricCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricCompatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricCompatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } + + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + + /** Compatibility enum. */ + enum Compatibility { + COMPATIBILITY_UNSPECIFIED = 0, + COMPATIBLE = 1, + INCOMPATIBLE = 2 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-analytics-data/protos/protos.js b/owl-bot-staging/google-analytics-data/protos/protos.js new file mode 100644 index 000000000000..c5814ccb74ed --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/protos.js @@ -0,0 +1,75986 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_analytics_data_protos || ($protobuf.roots._google_analytics_data_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.analytics = (function() { + + /** + * Namespace analytics. + * @memberof google + * @namespace + */ + var analytics = {}; + + analytics.data = (function() { + + /** + * Namespace data. + * @memberof google.analytics + * @namespace + */ + var data = {}; + + data.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.analytics.data + * @namespace + */ + var v1alpha = {}; + + v1alpha.AlphaAnalyticsData = (function() { + + /** + * Constructs a new AlphaAnalyticsData service. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AlphaAnalyticsData + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AlphaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AlphaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlphaAnalyticsData; + + /** + * Creates new AlphaAnalyticsData service using the specified rpc implementation. + * @function create + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AlphaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. + */ + AlphaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef RunFunnelReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} [response] RunFunnelReportResponse + */ + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback} callback Node-style callback called with the error, if any, and RunFunnelReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.runFunnelReport = function runFunnelReport(request, callback) { + return this.rpcCall(runFunnelReport, $root.google.analytics.data.v1alpha.RunFunnelReportRequest, $root.google.analytics.data.v1alpha.RunFunnelReportResponse, request, callback); + }, "name", { value: "RunFunnelReport" }); + + /** + * Calls RunFunnelReport. + * @function runFunnelReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createAudienceList = function createAudienceList(request, callback) { + return this.rpcCall(createAudienceList, $root.google.analytics.data.v1alpha.CreateAudienceListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAudienceList" }); + + /** + * Calls CreateAudienceList. + * @function createAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} [response] QueryAudienceListResponse + */ + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback} callback Node-style callback called with the error, if any, and QueryAudienceListResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryAudienceList = function queryAudienceList(request, callback) { + return this.rpcCall(queryAudienceList, $root.google.analytics.data.v1alpha.QueryAudienceListRequest, $root.google.analytics.data.v1alpha.QueryAudienceListResponse, request, callback); + }, "name", { value: "QueryAudienceList" }); + + /** + * Calls QueryAudienceList. + * @function queryAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.AudienceList} [response] AudienceList + */ + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback} callback Node-style callback called with the error, if any, and AudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getAudienceList = function getAudienceList(request, callback) { + return this.rpcCall(getAudienceList, $root.google.analytics.data.v1alpha.GetAudienceListRequest, $root.google.analytics.data.v1alpha.AudienceList, request, callback); + }, "name", { value: "GetAudienceList" }); + + /** + * Calls GetAudienceList. + * @function getAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} [response] ListAudienceListsResponse + */ + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback} callback Node-style callback called with the error, if any, and ListAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listAudienceLists = function listAudienceLists(request, callback) { + return this.rpcCall(listAudienceLists, $root.google.analytics.data.v1alpha.ListAudienceListsRequest, $root.google.analytics.data.v1alpha.ListAudienceListsResponse, request, callback); + }, "name", { value: "ListAudienceLists" }); + + /** + * Calls ListAudienceLists. + * @function listAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createRecurringAudienceList = function createRecurringAudienceList(request, callback) { + return this.rpcCall(createRecurringAudienceList, $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "CreateRecurringAudienceList" }); + + /** + * Calls CreateRecurringAudienceList. + * @function createRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetRecurringAudienceListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList + */ + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getRecurringAudienceList = function getRecurringAudienceList(request, callback) { + return this.rpcCall(getRecurringAudienceList, $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); + }, "name", { value: "GetRecurringAudienceList" }); + + /** + * Calls GetRecurringAudienceList. + * @function getRecurringAudienceList + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListRecurringAudienceListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} [response] ListRecurringAudienceListsResponse + */ + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback} callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listRecurringAudienceLists = function listRecurringAudienceLists(request, callback) { + return this.rpcCall(listRecurringAudienceLists, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, request, callback); + }, "name", { value: "ListRecurringAudienceLists" }); + + /** + * Calls ListRecurringAudienceLists. + * @function listRecurringAudienceLists + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetPropertyQuotasSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} [response] PropertyQuotasSnapshot + */ + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback} callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getPropertyQuotasSnapshot = function getPropertyQuotasSnapshot(request, callback) { + return this.rpcCall(getPropertyQuotasSnapshot, $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot, request, callback); + }, "name", { value: "GetPropertyQuotasSnapshot" }); + + /** + * Calls GetPropertyQuotasSnapshot. + * @function getPropertyQuotasSnapshot + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef CreateReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.createReportTask = function createReportTask(request, callback) { + return this.rpcCall(createReportTask, $root.google.analytics.data.v1alpha.CreateReportTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReportTask" }); + + /** + * Calls CreateReportTask. + * @function createReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef QueryReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} [response] QueryReportTaskResponse + */ + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback} callback Node-style callback called with the error, if any, and QueryReportTaskResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.queryReportTask = function queryReportTask(request, callback) { + return this.rpcCall(queryReportTask, $root.google.analytics.data.v1alpha.QueryReportTaskRequest, $root.google.analytics.data.v1alpha.QueryReportTaskResponse, request, callback); + }, "name", { value: "QueryReportTask" }); + + /** + * Calls QueryReportTask. + * @function queryReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetReportTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ReportTask} [response] ReportTask + */ + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback} callback Node-style callback called with the error, if any, and ReportTask + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getReportTask = function getReportTask(request, callback) { + return this.rpcCall(getReportTask, $root.google.analytics.data.v1alpha.GetReportTaskRequest, $root.google.analytics.data.v1alpha.ReportTask, request, callback); + }, "name", { value: "GetReportTask" }); + + /** + * Calls GetReportTask. + * @function getReportTask + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef ListReportTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} [response] ListReportTasksResponse + */ + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback} callback Node-style callback called with the error, if any, and ListReportTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.listReportTasks = function listReportTasks(request, callback) { + return this.rpcCall(listReportTasks, $root.google.analytics.data.v1alpha.ListReportTasksRequest, $root.google.analytics.data.v1alpha.ListReportTasksResponse, request, callback); + }, "name", { value: "ListReportTasks" }); + + /** + * Calls ListReportTasks. + * @function listReportTasks + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef RunReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RunReportResponse} [response] RunReportResponse + */ + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.runReport = function runReport(request, callback) { + return this.rpcCall(runReport, $root.google.analytics.data.v1alpha.RunReportRequest, $root.google.analytics.data.v1alpha.RunReportResponse, request, callback); + }, "name", { value: "RunReport" }); + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.Metadata} [response] Metadata + */ + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { + return this.rpcCall(getMetadata, $root.google.analytics.data.v1alpha.GetMetadataRequest, $root.google.analytics.data.v1alpha.Metadata, request, callback); + }, "name", { value: "GetMetadata" }); + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AlphaAnalyticsData; + })(); + + v1alpha.CreateRecurringAudienceListRequest = (function() { + + /** + * Properties of a CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateRecurringAudienceListRequest + * @property {string|null} [parent] CreateRecurringAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IRecurringAudienceList|null} [recurringAudienceList] CreateRecurringAudienceListRequest recurringAudienceList + */ + + /** + * Constructs a new CreateRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateRecurringAudienceListRequest. + * @implements ICreateRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + */ + function CreateRecurringAudienceListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRecurringAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.parent = ""; + + /** + * CreateRecurringAudienceListRequest recurringAudienceList. + * @member {google.analytics.data.v1alpha.IRecurringAudienceList|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + */ + CreateRecurringAudienceListRequest.prototype.recurringAudienceList = null; + + /** + * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest instance + */ + CreateRecurringAudienceListRequest.create = function create(properties) { + return new CreateRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRecurringAudienceListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceList); + if (error) + return "recurringAudienceList." + error; + } + return null; + }; + + /** + * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest + */ + CreateRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.recurringAudienceList != null) { + if (typeof object.recurringAudienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.recurringAudienceList: object expected"); + message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRecurringAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.recurringAudienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) + object.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceList, options); + return object; + }; + + /** + * Converts this CreateRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateRecurringAudienceListRequest"; + }; + + return CreateRecurringAudienceListRequest; + })(); + + v1alpha.RecurringAudienceList = (function() { + + /** + * Properties of a RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IRecurringAudienceList + * @property {string|null} [name] RecurringAudienceList name + * @property {string|null} [audience] RecurringAudienceList audience + * @property {string|null} [audienceDisplayName] RecurringAudienceList audienceDisplayName + * @property {Array.|null} [dimensions] RecurringAudienceList dimensions + * @property {number|null} [activeDaysRemaining] RecurringAudienceList activeDaysRemaining + * @property {Array.|null} [audienceLists] RecurringAudienceList audienceLists + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] RecurringAudienceList webhookNotification + */ + + /** + * Constructs a new RecurringAudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RecurringAudienceList. + * @implements IRecurringAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + */ + function RecurringAudienceList(properties) { + this.dimensions = []; + this.audienceLists = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecurringAudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.name = ""; + + /** + * RecurringAudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audience = ""; + + /** + * RecurringAudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceDisplayName = ""; + + /** + * RecurringAudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.dimensions = $util.emptyArray; + + /** + * RecurringAudienceList activeDaysRemaining. + * @member {number|null|undefined} activeDaysRemaining + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.activeDaysRemaining = null; + + /** + * RecurringAudienceList audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.audienceLists = $util.emptyArray; + + /** + * RecurringAudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + */ + RecurringAudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_activeDaysRemaining", { + get: $util.oneOfGetter($oneOfFields = ["activeDaysRemaining"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecurringAudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecurringAudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList instance + */ + RecurringAudienceList.create = function create(properties) { + return new RecurringAudienceList(properties); + }; + + /** + * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.activeDaysRemaining != null && Object.hasOwnProperty.call(message, "activeDaysRemaining")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activeDaysRemaining); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.audienceLists[i]); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringAudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.activeDaysRemaining = reader.int32(); + break; + } + case 6: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push(reader.string()); + break; + } + case 8: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringAudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringAudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringAudienceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + properties._activeDaysRemaining = 1; + if (!$util.isInteger(message.activeDaysRemaining)) + return "activeDaysRemaining: integer expected"; + } + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) + if (!$util.isString(message.audienceLists[i])) + return "audienceLists: string[] expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList + */ + RecurringAudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RecurringAudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + if (object.activeDaysRemaining != null) + message.activeDaysRemaining = object.activeDaysRemaining | 0; + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) + message.audienceLists[i] = String(object.audienceLists[i]); + } + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {google.analytics.data.v1alpha.RecurringAudienceList} message RecurringAudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringAudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.audienceLists = []; + } + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { + object.activeDaysRemaining = message.activeDaysRemaining; + if (options.oneofs) + object._activeDaysRemaining = "activeDaysRemaining"; + } + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = message.audienceLists[j]; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this RecurringAudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @instance + * @returns {Object.} JSON object + */ + RecurringAudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecurringAudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RecurringAudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringAudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RecurringAudienceList"; + }; + + return RecurringAudienceList; + })(); + + v1alpha.WebhookNotification = (function() { + + /** + * Properties of a WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @interface IWebhookNotification + * @property {string|null} [uri] WebhookNotification uri + * @property {string|null} [channelToken] WebhookNotification channelToken + */ + + /** + * Constructs a new WebhookNotification. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a WebhookNotification. + * @implements IWebhookNotification + * @constructor + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + */ + function WebhookNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebhookNotification uri. + * @member {string|null|undefined} uri + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.uri = null; + + /** + * WebhookNotification channelToken. + * @member {string|null|undefined} channelToken + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + */ + WebhookNotification.prototype.channelToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_uri", { + get: $util.oneOfGetter($oneOfFields = ["uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebhookNotification.prototype, "_channelToken", { + get: $util.oneOfGetter($oneOfFields = ["channelToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification instance + */ + WebhookNotification.create = function create(properties) { + return new WebhookNotification(properties); + }; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.channelToken != null && Object.hasOwnProperty.call(message, "channelToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelToken); + return writer; + }; + + /** + * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.channelToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookNotification message. + * @function verify + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties._uri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + properties._channelToken = 1; + if (!$util.isString(message.channelToken)) + return "channelToken: string expected"; + } + return null; + }; + + /** + * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification + */ + WebhookNotification.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.WebhookNotification) + return object; + var message = new $root.google.analytics.data.v1alpha.WebhookNotification(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.channelToken != null) + message.channelToken = String(object.channelToken); + return message; + }; + + /** + * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {google.analytics.data.v1alpha.WebhookNotification} message WebhookNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object._uri = "uri"; + } + if (message.channelToken != null && message.hasOwnProperty("channelToken")) { + object.channelToken = message.channelToken; + if (options.oneofs) + object._channelToken = "channelToken"; + } + return object; + }; + + /** + * Converts this WebhookNotification to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @instance + * @returns {Object.} JSON object + */ + WebhookNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookNotification + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.WebhookNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.WebhookNotification"; + }; + + return WebhookNotification; + })(); + + v1alpha.GetRecurringAudienceListRequest = (function() { + + /** + * Properties of a GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetRecurringAudienceListRequest + * @property {string|null} [name] GetRecurringAudienceListRequest name + */ + + /** + * Constructs a new GetRecurringAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetRecurringAudienceListRequest. + * @implements IGetRecurringAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + */ + function GetRecurringAudienceListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRecurringAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + */ + GetRecurringAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetRecurringAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest instance + */ + GetRecurringAudienceListRequest.create = function create(properties) { + return new GetRecurringAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecurringAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecurringAudienceListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest + */ + GetRecurringAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} message GetRecurringAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecurringAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRecurringAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecurringAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRecurringAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetRecurringAudienceListRequest"; + }; + + return GetRecurringAudienceListRequest; + })(); + + v1alpha.ListRecurringAudienceListsRequest = (function() { + + /** + * Properties of a ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsRequest + * @property {string|null} [parent] ListRecurringAudienceListsRequest parent + * @property {number|null} [pageSize] ListRecurringAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListRecurringAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsRequest. + * @implements IListRecurringAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + */ + function ListRecurringAudienceListsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRecurringAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.parent = ""; + + /** + * ListRecurringAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListRecurringAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + */ + ListRecurringAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest instance + */ + ListRecurringAudienceListsRequest.create = function create(properties) { + return new ListRecurringAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest + */ + ListRecurringAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListRecurringAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsRequest"; + }; + + return ListRecurringAudienceListsRequest; + })(); + + v1alpha.ListRecurringAudienceListsResponse = (function() { + + /** + * Properties of a ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListRecurringAudienceListsResponse + * @property {Array.|null} [recurringAudienceLists] ListRecurringAudienceListsResponse recurringAudienceLists + * @property {string|null} [nextPageToken] ListRecurringAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListRecurringAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListRecurringAudienceListsResponse. + * @implements IListRecurringAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + */ + function ListRecurringAudienceListsResponse(properties) { + this.recurringAudienceLists = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRecurringAudienceListsResponse recurringAudienceLists. + * @member {Array.} recurringAudienceLists + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.recurringAudienceLists = $util.emptyArray; + + /** + * ListRecurringAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + */ + ListRecurringAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListRecurringAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse instance + */ + ListRecurringAudienceListsResponse.create = function create(properties) { + return new ListRecurringAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurringAudienceLists != null && message.recurringAudienceLists.length) + for (var i = 0; i < message.recurringAudienceLists.length; ++i) + $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceLists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRecurringAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.recurringAudienceLists && message.recurringAudienceLists.length)) + message.recurringAudienceLists = []; + message.recurringAudienceLists.push($root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRecurringAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRecurringAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRecurringAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.recurringAudienceLists != null && message.hasOwnProperty("recurringAudienceLists")) { + if (!Array.isArray(message.recurringAudienceLists)) + return "recurringAudienceLists: array expected"; + for (var i = 0; i < message.recurringAudienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceLists[i]); + if (error) + return "recurringAudienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse + */ + ListRecurringAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); + if (object.recurringAudienceLists) { + if (!Array.isArray(object.recurringAudienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: array expected"); + message.recurringAudienceLists = []; + for (var i = 0; i < object.recurringAudienceLists.length; ++i) { + if (typeof object.recurringAudienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: object expected"); + message.recurringAudienceLists[i] = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRecurringAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.recurringAudienceLists = []; + if (message.recurringAudienceLists && message.recurringAudienceLists.length) { + object.recurringAudienceLists = []; + for (var j = 0; j < message.recurringAudienceLists.length; ++j) + object.recurringAudienceLists[j] = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListRecurringAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRecurringAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRecurringAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRecurringAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsResponse"; + }; + + return ListRecurringAudienceListsResponse; + })(); + + v1alpha.GetPropertyQuotasSnapshotRequest = (function() { + + /** + * Properties of a GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetPropertyQuotasSnapshotRequest + * @property {string|null} [name] GetPropertyQuotasSnapshotRequest name + */ + + /** + * Constructs a new GetPropertyQuotasSnapshotRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetPropertyQuotasSnapshotRequest. + * @implements IGetPropertyQuotasSnapshotRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + */ + function GetPropertyQuotasSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPropertyQuotasSnapshotRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + */ + GetPropertyQuotasSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest instance + */ + GetPropertyQuotasSnapshotRequest.create = function create(properties) { + return new GetPropertyQuotasSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyQuotasSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyQuotasSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPropertyQuotasSnapshotRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPropertyQuotasSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest + */ + GetPropertyQuotasSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPropertyQuotasSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPropertyQuotasSnapshotRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetPropertyQuotasSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPropertyQuotasSnapshotRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPropertyQuotasSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest"; + }; + + return GetPropertyQuotasSnapshotRequest; + })(); + + v1alpha.PropertyQuotasSnapshot = (function() { + + /** + * Properties of a PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuotasSnapshot + * @property {string|null} [name] PropertyQuotasSnapshot name + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [corePropertyQuota] PropertyQuotasSnapshot corePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [realtimePropertyQuota] PropertyQuotasSnapshot realtimePropertyQuota + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [funnelPropertyQuota] PropertyQuotasSnapshot funnelPropertyQuota + */ + + /** + * Constructs a new PropertyQuotasSnapshot. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuotasSnapshot. + * @implements IPropertyQuotasSnapshot + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + */ + function PropertyQuotasSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyQuotasSnapshot name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.name = ""; + + /** + * PropertyQuotasSnapshot corePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} corePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.corePropertyQuota = null; + + /** + * PropertyQuotasSnapshot realtimePropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} realtimePropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.realtimePropertyQuota = null; + + /** + * PropertyQuotasSnapshot funnelPropertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} funnelPropertyQuota + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + */ + PropertyQuotasSnapshot.prototype.funnelPropertyQuota = null; + + /** + * Creates a new PropertyQuotasSnapshot instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot instance + */ + PropertyQuotasSnapshot.create = function create(properties) { + return new PropertyQuotasSnapshot(properties); + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.corePropertyQuota != null && Object.hasOwnProperty.call(message, "corePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.corePropertyQuota, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.realtimePropertyQuota != null && Object.hasOwnProperty.call(message, "realtimePropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.realtimePropertyQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnelPropertyQuota != null && Object.hasOwnProperty.call(message, "funnelPropertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.funnelPropertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuotasSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 2: { + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 3: { + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuotasSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuotasSnapshot message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuotasSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.corePropertyQuota); + if (error) + return "corePropertyQuota." + error; + } + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.realtimePropertyQuota); + if (error) + return "realtimePropertyQuota." + error; + } + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.funnelPropertyQuota); + if (error) + return "funnelPropertyQuota." + error; + } + return null; + }; + + /** + * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot + */ + PropertyQuotasSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.corePropertyQuota != null) { + if (typeof object.corePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.corePropertyQuota: object expected"); + message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.corePropertyQuota); + } + if (object.realtimePropertyQuota != null) { + if (typeof object.realtimePropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.realtimePropertyQuota: object expected"); + message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.realtimePropertyQuota); + } + if (object.funnelPropertyQuota != null) { + if (typeof object.funnelPropertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.funnelPropertyQuota: object expected"); + message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.funnelPropertyQuota); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} message PropertyQuotasSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuotasSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.corePropertyQuota = null; + object.realtimePropertyQuota = null; + object.funnelPropertyQuota = null; + object.name = ""; + } + if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) + object.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.corePropertyQuota, options); + if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) + object.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.realtimePropertyQuota, options); + if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) + object.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.funnelPropertyQuota, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PropertyQuotasSnapshot to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @instance + * @returns {Object.} JSON object + */ + PropertyQuotasSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuotasSnapshot + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuotasSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuotasSnapshot"; + }; + + return PropertyQuotasSnapshot; + })(); + + v1alpha.GetAudienceListRequest = (function() { + + /** + * Properties of a GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetAudienceListRequest + * @property {string|null} [name] GetAudienceListRequest name + */ + + /** + * Constructs a new GetAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetAudienceListRequest. + * @implements IGetAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + */ + function GetAudienceListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + */ + GetAudienceListRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest instance + */ + GetAudienceListRequest.create = function create(properties) { + return new GetAudienceListRequest(properties); + }; + + /** + * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest + */ + GetAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.GetAudienceListRequest} message GetAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetAudienceListRequest"; + }; + + return GetAudienceListRequest; + })(); + + v1alpha.ListAudienceListsRequest = (function() { + + /** + * Properties of a ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsRequest + * @property {string|null} [parent] ListAudienceListsRequest parent + * @property {number|null} [pageSize] ListAudienceListsRequest pageSize + * @property {string|null} [pageToken] ListAudienceListsRequest pageToken + */ + + /** + * Constructs a new ListAudienceListsRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsRequest. + * @implements IListAudienceListsRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + */ + function ListAudienceListsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudienceListsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.parent = ""; + + /** + * ListAudienceListsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageSize = 0; + + /** + * ListAudienceListsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + */ + ListAudienceListsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudienceListsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest instance + */ + ListAudienceListsRequest.create = function create(properties) { + return new ListAudienceListsRequest(properties); + }; + + /** + * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest + */ + ListAudienceListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsRequest} message ListAudienceListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAudienceListsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsRequest"; + }; + + return ListAudienceListsRequest; + })(); + + v1alpha.ListAudienceListsResponse = (function() { + + /** + * Properties of a ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListAudienceListsResponse + * @property {Array.|null} [audienceLists] ListAudienceListsResponse audienceLists + * @property {string|null} [nextPageToken] ListAudienceListsResponse nextPageToken + */ + + /** + * Constructs a new ListAudienceListsResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListAudienceListsResponse. + * @implements IListAudienceListsResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + */ + function ListAudienceListsResponse(properties) { + this.audienceLists = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudienceListsResponse audienceLists. + * @member {Array.} audienceLists + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.audienceLists = $util.emptyArray; + + /** + * ListAudienceListsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + */ + ListAudienceListsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListAudienceListsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListAudienceListsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse instance + */ + ListAudienceListsResponse.create = function create(properties) { + return new ListAudienceListsResponse(properties); + }; + + /** + * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceLists != null && message.audienceLists.length) + for (var i = 0; i < message.audienceLists.length; ++i) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceLists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.audienceLists && message.audienceLists.length)) + message.audienceLists = []; + message.audienceLists.push($root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceListsResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { + if (!Array.isArray(message.audienceLists)) + return "audienceLists: array expected"; + for (var i = 0; i < message.audienceLists.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceLists[i]); + if (error) + return "audienceLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse + */ + ListAudienceListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); + if (object.audienceLists) { + if (!Array.isArray(object.audienceLists)) + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: array expected"); + message.audienceLists = []; + for (var i = 0; i < object.audienceLists.length; ++i) { + if (typeof object.audienceLists[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: object expected"); + message.audienceLists[i] = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} message ListAudienceListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceLists = []; + if (message.audienceLists && message.audienceLists.length) { + object.audienceLists = []; + for (var j = 0; j < message.audienceLists.length; ++j) + object.audienceLists[j] = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListAudienceListsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudienceListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceListsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsResponse"; + }; + + return ListAudienceListsResponse; + })(); + + v1alpha.CreateAudienceListRequest = (function() { + + /** + * Properties of a CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateAudienceListRequest + * @property {string|null} [parent] CreateAudienceListRequest parent + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] CreateAudienceListRequest audienceList + */ + + /** + * Constructs a new CreateAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateAudienceListRequest. + * @implements ICreateAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + */ + function CreateAudienceListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAudienceListRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.parent = ""; + + /** + * CreateAudienceListRequest audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + */ + CreateAudienceListRequest.prototype.audienceList = null; + + /** + * Creates a new CreateAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest instance + */ + CreateAudienceListRequest.create = function create(properties) { + return new CreateAudienceListRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest + */ + CreateAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateAudienceListRequest.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.CreateAudienceListRequest} message CreateAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audienceList = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + return object; + }; + + /** + * Converts this CreateAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateAudienceListRequest"; + }; + + return CreateAudienceListRequest; + })(); + + v1alpha.AudienceList = (function() { + + /** + * Properties of an AudienceList. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceList + * @property {string|null} [name] AudienceList name + * @property {string|null} [audience] AudienceList audience + * @property {string|null} [audienceDisplayName] AudienceList audienceDisplayName + * @property {Array.|null} [dimensions] AudienceList dimensions + * @property {google.analytics.data.v1alpha.AudienceList.State|null} [state] AudienceList state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceList beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] AudienceList creationQuotaTokensCharged + * @property {number|null} [rowCount] AudienceList rowCount + * @property {string|null} [errorMessage] AudienceList errorMessage + * @property {number|null} [percentageCompleted] AudienceList percentageCompleted + * @property {string|null} [recurringAudienceList] AudienceList recurringAudienceList + * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] AudienceList webhookNotification + */ + + /** + * Constructs a new AudienceList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceList. + * @implements IAudienceList + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + */ + function AudienceList(properties) { + this.dimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceList name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.name = ""; + + /** + * AudienceList audience. + * @member {string} audience + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audience = ""; + + /** + * AudienceList audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.audienceDisplayName = ""; + + /** + * AudienceList dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.dimensions = $util.emptyArray; + + /** + * AudienceList state. + * @member {google.analytics.data.v1alpha.AudienceList.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.state = null; + + /** + * AudienceList beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.beginCreatingTime = null; + + /** + * AudienceList creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.creationQuotaTokensCharged = 0; + + /** + * AudienceList rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.rowCount = null; + + /** + * AudienceList errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.errorMessage = null; + + /** + * AudienceList percentageCompleted. + * @member {number|null|undefined} percentageCompleted + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.percentageCompleted = null; + + /** + * AudienceList recurringAudienceList. + * @member {string|null|undefined} recurringAudienceList + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.recurringAudienceList = null; + + /** + * AudienceList webhookNotification. + * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + */ + AudienceList.prototype.webhookNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_percentageCompleted", { + get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_recurringAudienceList", { + get: $util.oneOfGetter($oneOfFields = ["recurringAudienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceList.prototype, "_webhookNotification", { + get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList instance + */ + AudienceList.create = function create(properties) { + return new AudienceList(properties); + }; + + /** + * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); + if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) + writer.uint32(/* id 11, wireType 1 =*/89).double(message.percentageCompleted); + if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.recurringAudienceList); + if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) + $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 8: { + message.rowCount = reader.int32(); + break; + } + case 9: { + message.errorMessage = reader.string(); + break; + } + case 11: { + message.percentageCompleted = reader.double(); + break; + } + case 12: { + message.recurringAudienceList = reader.string(); + break; + } + case 13: { + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceList message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + properties._percentageCompleted = 1; + if (typeof message.percentageCompleted !== "number") + return "percentageCompleted: number expected"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + properties._recurringAudienceList = 1; + if (!$util.isString(message.recurringAudienceList)) + return "recurringAudienceList: string expected"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + properties._webhookNotification = 1; + { + var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); + if (error) + return "webhookNotification." + error; + } + } + return null; + }; + + /** + * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList + */ + AudienceList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceList) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceList(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentageCompleted != null) + message.percentageCompleted = Number(object.percentageCompleted); + if (object.recurringAudienceList != null) + message.recurringAudienceList = String(object.recurringAudienceList); + if (object.webhookNotification != null) { + if (typeof object.webhookNotification !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceList.webhookNotification: object expected"); + message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); + } + return message; + }; + + /** + * Creates a plain object from an AudienceList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {google.analytics.data.v1alpha.AudienceList} message AudienceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + object.creationQuotaTokensCharged = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.AudienceList.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.AudienceList.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; + if (options.oneofs) + object._percentageCompleted = "percentageCompleted"; + } + if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { + object.recurringAudienceList = message.recurringAudienceList; + if (options.oneofs) + object._recurringAudienceList = "recurringAudienceList"; + } + if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { + object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); + if (options.oneofs) + object._webhookNotification = "webhookNotification"; + } + return object; + }; + + /** + * Converts this AudienceList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceList + * @instance + * @returns {Object.} JSON object + */ + AudienceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceList"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.AudienceList.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + AudienceList.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return AudienceList; + })(); + + v1alpha.AudienceListMetadata = (function() { + + /** + * Properties of an AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceListMetadata + */ + + /** + * Constructs a new AudienceListMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceListMetadata. + * @implements IAudienceListMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + */ + function AudienceListMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AudienceListMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata instance + */ + AudienceListMetadata.create = function create(properties) { + return new AudienceListMetadata(properties); + }; + + /** + * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceListMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceListMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceListMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata + */ + AudienceListMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceListMetadata) + return object; + return new $root.google.analytics.data.v1alpha.AudienceListMetadata(); + }; + + /** + * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {google.analytics.data.v1alpha.AudienceListMetadata} message AudienceListMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceListMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AudienceListMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @instance + * @returns {Object.} JSON object + */ + AudienceListMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceListMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceListMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceListMetadata"; + }; + + return AudienceListMetadata; + })(); + + v1alpha.QueryAudienceListRequest = (function() { + + /** + * Properties of a QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListRequest + * @property {string|null} [name] QueryAudienceListRequest name + * @property {number|Long|null} [offset] QueryAudienceListRequest offset + * @property {number|Long|null} [limit] QueryAudienceListRequest limit + */ + + /** + * Constructs a new QueryAudienceListRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListRequest. + * @implements IQueryAudienceListRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + */ + function QueryAudienceListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAudienceListRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.name = ""; + + /** + * QueryAudienceListRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryAudienceListRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + */ + QueryAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAudienceListRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest instance + */ + QueryAudienceListRequest.create = function create(properties) { + return new QueryAudienceListRequest(properties); + }; + + /** + * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest + */ + QueryAudienceListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListRequest} message QueryAudienceListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryAudienceListRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListRequest"; + }; + + return QueryAudienceListRequest; + })(); + + v1alpha.QueryAudienceListResponse = (function() { + + /** + * Properties of a QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryAudienceListResponse + * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] QueryAudienceListResponse audienceList + * @property {Array.|null} [audienceRows] QueryAudienceListResponse audienceRows + * @property {number|null} [rowCount] QueryAudienceListResponse rowCount + */ + + /** + * Constructs a new QueryAudienceListResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryAudienceListResponse. + * @implements IQueryAudienceListResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + */ + function QueryAudienceListResponse(properties) { + this.audienceRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAudienceListResponse audienceList. + * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceList = null; + + /** + * QueryAudienceListResponse audienceRows. + * @member {Array.} audienceRows + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.audienceRows = $util.emptyArray; + + /** + * QueryAudienceListResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + */ + QueryAudienceListResponse.prototype.rowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_audienceList", { + get: $util.oneOfGetter($oneOfFields = ["audienceList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceListResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryAudienceListResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse instance + */ + QueryAudienceListResponse.create = function create(properties) { + return new QueryAudienceListResponse(properties); + }; + + /** + * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) + $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceRows != null && message.audienceRows.length) + for (var i = 0; i < message.audienceRows.length; ++i) + $root.google.analytics.data.v1alpha.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.audienceRows && message.audienceRows.length)) + message.audienceRows = []; + message.audienceRows.push($root.google.analytics.data.v1alpha.AudienceRow.decode(reader, reader.uint32())); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceListResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceListResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + properties._audienceList = 1; + { + var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); + if (error) + return "audienceList." + error; + } + } + if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { + if (!Array.isArray(message.audienceRows)) + return "audienceRows: array expected"; + for (var i = 0; i < message.audienceRows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceRow.verify(message.audienceRows[i]); + if (error) + return "audienceRows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + return null; + }; + + /** + * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse + */ + QueryAudienceListResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); + if (object.audienceList != null) { + if (typeof object.audienceList !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceList: object expected"); + message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); + } + if (object.audienceRows) { + if (!Array.isArray(object.audienceRows)) + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: array expected"); + message.audienceRows = []; + for (var i = 0; i < object.audienceRows.length; ++i) { + if (typeof object.audienceRows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: object expected"); + message.audienceRows[i] = $root.google.analytics.data.v1alpha.AudienceRow.fromObject(object.audienceRows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} message QueryAudienceListResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceListResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceRows = []; + if (message.audienceList != null && message.hasOwnProperty("audienceList")) { + object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); + if (options.oneofs) + object._audienceList = "audienceList"; + } + if (message.audienceRows && message.audienceRows.length) { + object.audienceRows = []; + for (var j = 0; j < message.audienceRows.length; ++j) + object.audienceRows[j] = $root.google.analytics.data.v1alpha.AudienceRow.toObject(message.audienceRows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + return object; + }; + + /** + * Converts this QueryAudienceListResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceListResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceListResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListResponse"; + }; + + return QueryAudienceListResponse; + })(); + + v1alpha.AudienceRow = (function() { + + /** + * Properties of an AudienceRow. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + */ + + /** + * Constructs a new AudienceRow. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + */ + function AudienceRow(properties) { + this.dimensionValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + */ + AudienceRow.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance + */ + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); + }; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceRow message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + */ + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this AudienceRow to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceRow + * @instance + * @returns {Object.} JSON object + */ + AudienceRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceRow + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; + }; + + return AudienceRow; + })(); + + v1alpha.AudienceDimension = (function() { + + /** + * Properties of an AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName + */ + + /** + * Constructs a new AudienceDimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + */ + function AudienceDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + */ + AudienceDimension.prototype.dimensionName = ""; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance + */ + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); + }; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + */ + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AudienceDimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @instance + * @returns {Object.} JSON object + */ + AudienceDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; + }; + + return AudienceDimension; + })(); + + v1alpha.AudienceDimensionValue = (function() { + + /** + * Properties of an AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value + */ + + /** + * Constructs a new AudienceDimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + */ + function AudienceDimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance + */ + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); + }; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + */ + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; + }; + + return AudienceDimensionValue; + })(); + + v1alpha.RunFunnelReportRequest = (function() { + + /** + * Properties of a RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportRequest + * @property {string|null} [property] RunFunnelReportRequest property + * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel + * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown + * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction + * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType + * @property {Array.|null} [segments] RunFunnelReportRequest segments + * @property {number|Long|null} [limit] RunFunnelReportRequest limit + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter + * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota + */ + + /** + * Constructs a new RunFunnelReportRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportRequest. + * @implements IRunFunnelReportRequest + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + */ + function RunFunnelReportRequest(properties) { + this.dateRanges = []; + this.segments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunFunnelReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.property = ""; + + /** + * RunFunnelReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunFunnelReportRequest funnel. + * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnel = null; + + /** + * RunFunnelReportRequest funnelBreakdown. + * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelBreakdown = null; + + /** + * RunFunnelReportRequest funnelNextAction. + * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelNextAction = null; + + /** + * RunFunnelReportRequest funnelVisualizationType. + * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelVisualizationType = 0; + + /** + * RunFunnelReportRequest segments. + * @member {Array.} segments + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.segments = $util.emptyArray; + + /** + * RunFunnelReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunFunnelReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dimensionFilter = null; + + /** + * RunFunnelReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.returnPropertyQuota = false; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance + */ + RunFunnelReportRequest.create = function create(properties) { + return new RunFunnelReportRequest(properties); + }; + + /** + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) + $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) + $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) + $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 3: { + message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); + break; + } + case 6: { + message.funnelVisualizationType = reader.int32(); + break; + } + case 7: { + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); + break; + } + case 9: { + message.limit = reader.int64(); + break; + } + case 10: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 12: { + message.returnPropertyQuota = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.funnel != null && message.hasOwnProperty("funnel")) { + var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); + if (error) + return "funnel." + error; + } + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { + var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); + if (error) + return "funnelBreakdown." + error; + } + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { + var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); + if (error) + return "funnelNextAction." + error; + } + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + switch (message.funnelVisualizationType) { + default: + return "funnelVisualizationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + return null; + }; + + /** + * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + */ + RunFunnelReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.funnel != null) { + if (typeof object.funnel !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); + message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); + } + if (object.funnelBreakdown != null) { + if (typeof object.funnelBreakdown !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); + } + if (object.funnelNextAction != null) { + if (typeof object.funnelNextAction !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); + } + switch (object.funnelVisualizationType) { + default: + if (typeof object.funnelVisualizationType === "number") { + message.funnelVisualizationType = object.funnelVisualizationType; + break; + } + break; + case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": + case 0: + message.funnelVisualizationType = 0; + break; + case "STANDARD_FUNNEL": + case 1: + message.funnelVisualizationType = 1; + break; + case "TRENDED_FUNNEL": + case 2: + message.funnelVisualizationType = 2; + break; + } + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); + message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); + } + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dateRanges = []; + object.segments = []; + } + if (options.defaults) { + object.property = ""; + object.funnel = null; + object.funnelBreakdown = null; + object.funnelNextAction = null; + object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.dimensionFilter = null; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.funnel != null && message.hasOwnProperty("funnel")) + object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) + object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) + object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + return object; + }; + + /** + * Converts this RunFunnelReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; + }; + + /** + * FunnelVisualizationType enum. + * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType + * @enum {number} + * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value + * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value + * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value + */ + RunFunnelReportRequest.FunnelVisualizationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_FUNNEL"] = 1; + values[valuesById[2] = "TRENDED_FUNNEL"] = 2; + return values; + })(); + + return RunFunnelReportRequest; + })(); + + v1alpha.RunFunnelReportResponse = (function() { + + /** + * Properties of a RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @interface IRunFunnelReportResponse + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota + * @property {string|null} [kind] RunFunnelReportResponse kind + */ + + /** + * Constructs a new RunFunnelReportResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunFunnelReportResponse. + * @implements IRunFunnelReportResponse + * @constructor + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + */ + function RunFunnelReportResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunFunnelReportResponse funnelTable. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelTable = null; + + /** + * RunFunnelReportResponse funnelVisualization. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.funnelVisualization = null; + + /** + * RunFunnelReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.propertyQuota = null; + + /** + * RunFunnelReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + */ + RunFunnelReportResponse.prototype.kind = ""; + + /** + * Creates a new RunFunnelReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance + */ + RunFunnelReportResponse.create = function create(properties) { + return new RunFunnelReportResponse(properties); + }; + + /** + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + break; + } + case 3: { + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 4: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunFunnelReportResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunFunnelReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); + if (error) + return "funnelTable." + error; + } + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); + if (error) + return "funnelVisualization." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + */ + RunFunnelReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + if (object.funnelTable != null) { + if (typeof object.funnelTable !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); + } + if (object.funnelVisualization != null) { + if (typeof object.funnelVisualization !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunFunnelReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.funnelTable = null; + object.funnelVisualization = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) + object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) + object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunFunnelReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunFunnelReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunFunnelReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; + }; + + return RunFunnelReportResponse; + })(); + + v1alpha.ReportTask = (function() { + + /** + * Properties of a ReportTask. + * @memberof google.analytics.data.v1alpha + * @interface IReportTask + * @property {string|null} [name] ReportTask name + * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition + * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata + */ + + /** + * Constructs a new ReportTask. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTask. + * @implements IReportTask + * @constructor + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + */ + function ReportTask(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportTask name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.name = ""; + + /** + * ReportTask reportDefinition. + * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportDefinition = null; + + /** + * ReportTask reportMetadata. + * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + */ + ReportTask.prototype.reportMetadata = null; + + /** + * Creates a new ReportTask instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance + */ + ReportTask.create = function create(properties) { + return new ReportTask(properties); + }; + + /** + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) + $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) + $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); + break; + } + case 3: { + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTask message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); + if (error) + return "reportDefinition." + error; + } + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); + if (error) + return "reportMetadata." + error; + } + return null; + }; + + /** + * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask + */ + ReportTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask(); + if (object.name != null) + message.name = String(object.name); + if (object.reportDefinition != null) { + if (typeof object.reportDefinition !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); + } + if (object.reportMetadata != null) { + if (typeof object.reportMetadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); + } + return message; + }; + + /** + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.reportDefinition = null; + object.reportMetadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) + object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) + object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); + return object; + }; + + /** + * Converts this ReportTask to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask + * @instance + * @returns {Object.} JSON object + */ + ReportTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTask + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; + }; + + ReportTask.ReportDefinition = (function() { + + /** + * Properties of a ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportDefinition + * @property {Array.|null} [dimensions] ReportDefinition dimensions + * @property {Array.|null} [metrics] ReportDefinition metrics + * @property {Array.|null} [dateRanges] ReportDefinition dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter + * @property {number|Long|null} [offset] ReportDefinition offset + * @property {number|Long|null} [limit] ReportDefinition limit + * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations + * @property {Array.|null} [orderBys] ReportDefinition orderBys + * @property {string|null} [currencyCode] ReportDefinition currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec + * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows + * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel + */ + + /** + * Constructs a new ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportDefinition. + * @implements IReportDefinition + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + */ + function ReportDefinition(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportDefinition dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensions = $util.emptyArray; + + /** + * ReportDefinition metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metrics = $util.emptyArray; + + /** + * ReportDefinition dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dateRanges = $util.emptyArray; + + /** + * ReportDefinition dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensionFilter = null; + + /** + * ReportDefinition metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricFilter = null; + + /** + * ReportDefinition offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDefinition metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricAggregations = $util.emptyArray; + + /** + * ReportDefinition orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.orderBys = $util.emptyArray; + + /** + * ReportDefinition currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.currencyCode = ""; + + /** + * ReportDefinition cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.cohortSpec = null; + + /** + * ReportDefinition keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.keepEmptyRows = false; + + /** + * ReportDefinition samplingLevel. + * @member {google.analytics.data.v1alpha.SamplingLevel|null|undefined} samplingLevel + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.samplingLevel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportDefinition.prototype, "_samplingLevel", { + get: $util.oneOfGetter($oneOfFields = ["samplingLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportDefinition instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition instance + */ + ReportDefinition.create = function create(properties) { + return new ReportDefinition(properties); + }; + + /** + * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.samplingLevel != null && Object.hasOwnProperty.call(message, "samplingLevel")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.samplingLevel); + return writer; + }; + + /** + * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.samplingLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDefinition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDefinition message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDefinition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + properties._samplingLevel = 1; + switch (message.samplingLevel) { + default: + return "samplingLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition + */ + ReportDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + switch (object.samplingLevel) { + default: + if (typeof object.samplingLevel === "number") { + message.samplingLevel = object.samplingLevel; + break; + } + break; + case "SAMPLING_LEVEL_UNSPECIFIED": + case 0: + message.samplingLevel = 0; + break; + case "LOW": + case 1: + message.samplingLevel = 1; + break; + case "MEDIUM": + case 2: + message.samplingLevel = 2; + break; + case "UNSAMPLED": + case 3: + message.samplingLevel = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportDefinition} message ReportDefinition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDefinition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + } + if (options.defaults) { + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { + object.samplingLevel = options.enums === String ? $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] === undefined ? message.samplingLevel : $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] : message.samplingLevel; + if (options.oneofs) + object._samplingLevel = "samplingLevel"; + } + return object; + }; + + /** + * Converts this ReportDefinition to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + * @returns {Object.} JSON object + */ + ReportDefinition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDefinition + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportDefinition"; + }; + + return ReportDefinition; + })(); + + ReportTask.ReportMetadata = (function() { + + /** + * Properties of a ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportMetadata + * @property {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null} [state] ReportMetadata state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] ReportMetadata beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] ReportMetadata creationQuotaTokensCharged + * @property {number|null} [taskRowCount] ReportMetadata taskRowCount + * @property {string|null} [errorMessage] ReportMetadata errorMessage + * @property {number|null} [totalRowCount] ReportMetadata totalRowCount + */ + + /** + * Constructs a new ReportMetadata. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportMetadata. + * @implements IReportMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + */ + function ReportMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportMetadata state. + * @member {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null|undefined} state + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.state = null; + + /** + * ReportMetadata beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.beginCreatingTime = null; + + /** + * ReportMetadata creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.creationQuotaTokensCharged = 0; + + /** + * ReportMetadata taskRowCount. + * @member {number|null|undefined} taskRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.taskRowCount = null; + + /** + * ReportMetadata errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.errorMessage = null; + + /** + * ReportMetadata totalRowCount. + * @member {number|null|undefined} totalRowCount + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + */ + ReportMetadata.prototype.totalRowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_taskRowCount", { + get: $util.oneOfGetter($oneOfFields = ["taskRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportMetadata.prototype, "_totalRowCount", { + get: $util.oneOfGetter($oneOfFields = ["totalRowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata instance + */ + ReportMetadata.create = function create(properties) { + return new ReportMetadata(properties); + }; + + /** + * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.creationQuotaTokensCharged); + if (message.taskRowCount != null && Object.hasOwnProperty.call(message, "taskRowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.taskRowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorMessage); + if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalRowCount); + return writer; + }; + + /** + * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 4: { + message.taskRowCount = reader.int32(); + break; + } + case 5: { + message.errorMessage = reader.string(); + break; + } + case 6: { + message.totalRowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + properties._taskRowCount = 1; + if (!$util.isInteger(message.taskRowCount)) + return "taskRowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + properties._totalRowCount = 1; + if (!$util.isInteger(message.totalRowCount)) + return "totalRowCount: integer expected"; + } + return null; + }; + + /** + * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata + */ + ReportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportMetadata.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.taskRowCount != null) + message.taskRowCount = object.taskRowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.totalRowCount != null) + message.totalRowCount = object.totalRowCount | 0; + return message; + }; + + /** + * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTask.ReportMetadata} message ReportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.creationQuotaTokensCharged = 0; + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { + object.taskRowCount = message.taskRowCount; + if (options.oneofs) + object._taskRowCount = "taskRowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { + object.totalRowCount = message.totalRowCount; + if (options.oneofs) + object._totalRowCount = "totalRowCount"; + } + return object; + }; + + /** + * Converts this ReportMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportMetadata"; + }; + + /** + * State enum. + * @name google.analytics.data.v1alpha.ReportTask.ReportMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + ReportMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return ReportMetadata; + })(); + + return ReportTask; + })(); + + v1alpha.CreateReportTaskRequest = (function() { + + /** + * Properties of a CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface ICreateReportTaskRequest + * @property {string|null} [parent] CreateReportTaskRequest parent + * @property {google.analytics.data.v1alpha.IReportTask|null} [reportTask] CreateReportTaskRequest reportTask + */ + + /** + * Constructs a new CreateReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CreateReportTaskRequest. + * @implements ICreateReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + */ + function CreateReportTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReportTaskRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.parent = ""; + + /** + * CreateReportTaskRequest reportTask. + * @member {google.analytics.data.v1alpha.IReportTask|null|undefined} reportTask + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + */ + CreateReportTaskRequest.prototype.reportTask = null; + + /** + * Creates a new CreateReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest instance + */ + CreateReportTaskRequest.create = function create(properties) { + return new CreateReportTaskRequest(properties); + }; + + /** + * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.reportTask != null && Object.hasOwnProperty.call(message, "reportTask")) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReportTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.reportTask != null && message.hasOwnProperty("reportTask")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTask); + if (error) + return "reportTask." + error; + } + return null; + }; + + /** + * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest + */ + CreateReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CreateReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reportTask != null) { + if (typeof object.reportTask !== "object") + throw TypeError(".google.analytics.data.v1alpha.CreateReportTaskRequest.reportTask: object expected"); + message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTask); + } + return message; + }; + + /** + * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.CreateReportTaskRequest} message CreateReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reportTask = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reportTask != null && message.hasOwnProperty("reportTask")) + object.reportTask = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTask, options); + return object; + }; + + /** + * Converts this CreateReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateReportTaskRequest"; + }; + + return CreateReportTaskRequest; + })(); + + v1alpha.ReportTaskMetadata = (function() { + + /** + * Properties of a ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IReportTaskMetadata + */ + + /** + * Constructs a new ReportTaskMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ReportTaskMetadata. + * @implements IReportTaskMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + */ + function ReportTaskMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ReportTaskMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata instance + */ + ReportTaskMetadata.create = function create(properties) { + return new ReportTaskMetadata(properties); + }; + + /** + * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportTaskMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportTaskMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportTaskMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportTaskMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata + */ + ReportTaskMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTaskMetadata) + return object; + return new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); + }; + + /** + * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {google.analytics.data.v1alpha.ReportTaskMetadata} message ReportTaskMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportTaskMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReportTaskMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @instance + * @returns {Object.} JSON object + */ + ReportTaskMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportTaskMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ReportTaskMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportTaskMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTaskMetadata"; + }; + + return ReportTaskMetadata; + })(); + + v1alpha.QueryReportTaskRequest = (function() { + + /** + * Properties of a QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskRequest + * @property {string|null} [name] QueryReportTaskRequest name + * @property {number|Long|null} [offset] QueryReportTaskRequest offset + * @property {number|Long|null} [limit] QueryReportTaskRequest limit + */ + + /** + * Constructs a new QueryReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskRequest. + * @implements IQueryReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + */ + function QueryReportTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.name = ""; + + /** + * QueryReportTaskRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryReportTaskRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + */ + QueryReportTaskRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest instance + */ + QueryReportTaskRequest.create = function create(properties) { + return new QueryReportTaskRequest(properties); + }; + + /** + * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest + */ + QueryReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskRequest} message QueryReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskRequest"; + }; + + return QueryReportTaskRequest; + })(); + + v1alpha.QueryReportTaskResponse = (function() { + + /** + * Properties of a QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @interface IQueryReportTaskResponse + * @property {Array.|null} [dimensionHeaders] QueryReportTaskResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] QueryReportTaskResponse metricHeaders + * @property {Array.|null} [rows] QueryReportTaskResponse rows + * @property {Array.|null} [totals] QueryReportTaskResponse totals + * @property {Array.|null} [maximums] QueryReportTaskResponse maximums + * @property {Array.|null} [minimums] QueryReportTaskResponse minimums + * @property {number|null} [rowCount] QueryReportTaskResponse rowCount + * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] QueryReportTaskResponse metadata + */ + + /** + * Constructs a new QueryReportTaskResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QueryReportTaskResponse. + * @implements IQueryReportTaskResponse + * @constructor + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + */ + function QueryReportTaskResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryReportTaskResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * QueryReportTaskResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rows = $util.emptyArray; + + /** + * QueryReportTaskResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.totals = $util.emptyArray; + + /** + * QueryReportTaskResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.maximums = $util.emptyArray; + + /** + * QueryReportTaskResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.minimums = $util.emptyArray; + + /** + * QueryReportTaskResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.rowCount = 0; + + /** + * QueryReportTaskResponse metadata. + * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + */ + QueryReportTaskResponse.prototype.metadata = null; + + /** + * Creates a new QueryReportTaskResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse instance + */ + QueryReportTaskResponse.create = function create(properties) { + return new QueryReportTaskResponse(properties); + }; + + /** + * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReportTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReportTaskResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReportTaskResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReportTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse + */ + QueryReportTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} message QueryReportTaskResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReportTaskResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this QueryReportTaskResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @instance + * @returns {Object.} JSON object + */ + QueryReportTaskResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReportTaskResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReportTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskResponse"; + }; + + return QueryReportTaskResponse; + })(); + + v1alpha.GetReportTaskRequest = (function() { + + /** + * Properties of a GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetReportTaskRequest + * @property {string|null} [name] GetReportTaskRequest name + */ + + /** + * Constructs a new GetReportTaskRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetReportTaskRequest. + * @implements IGetReportTaskRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + */ + function GetReportTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReportTaskRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + */ + GetReportTaskRequest.prototype.name = ""; + + /** + * Creates a new GetReportTaskRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest instance + */ + GetReportTaskRequest.create = function create(properties) { + return new GetReportTaskRequest(properties); + }; + + /** + * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportTaskRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest + */ + GetReportTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetReportTaskRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {google.analytics.data.v1alpha.GetReportTaskRequest} message GetReportTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetReportTaskRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportTaskRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetReportTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetReportTaskRequest"; + }; + + return GetReportTaskRequest; + })(); + + v1alpha.ListReportTasksRequest = (function() { + + /** + * Properties of a ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksRequest + * @property {string|null} [parent] ListReportTasksRequest parent + * @property {number|null} [pageSize] ListReportTasksRequest pageSize + * @property {string|null} [pageToken] ListReportTasksRequest pageToken + */ + + /** + * Constructs a new ListReportTasksRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksRequest. + * @implements IListReportTasksRequest + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + */ + function ListReportTasksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReportTasksRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.parent = ""; + + /** + * ListReportTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageSize = 0; + + /** + * ListReportTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + */ + ListReportTasksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListReportTasksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest instance + */ + ListReportTasksRequest.create = function create(properties) { + return new ListReportTasksRequest(properties); + }; + + /** + * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest + */ + ListReportTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksRequest} message ListReportTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListReportTasksRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksRequest"; + }; + + return ListReportTasksRequest; + })(); + + v1alpha.ListReportTasksResponse = (function() { + + /** + * Properties of a ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @interface IListReportTasksResponse + * @property {Array.|null} [reportTasks] ListReportTasksResponse reportTasks + * @property {string|null} [nextPageToken] ListReportTasksResponse nextPageToken + */ + + /** + * Constructs a new ListReportTasksResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ListReportTasksResponse. + * @implements IListReportTasksResponse + * @constructor + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + */ + function ListReportTasksResponse(properties) { + this.reportTasks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReportTasksResponse reportTasks. + * @member {Array.} reportTasks + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.reportTasks = $util.emptyArray; + + /** + * ListReportTasksResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + */ + ListReportTasksResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListReportTasksResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListReportTasksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse instance + */ + ListReportTasksResponse.create = function create(properties) { + return new ListReportTasksResponse(properties); + }; + + /** + * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportTasks != null && message.reportTasks.length) + for (var i = 0; i < message.reportTasks.length; ++i) + $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reportTasks && message.reportTasks.length)) + message.reportTasks = []; + message.reportTasks.push($root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportTasksResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reportTasks != null && message.hasOwnProperty("reportTasks")) { + if (!Array.isArray(message.reportTasks)) + return "reportTasks: array expected"; + for (var i = 0; i < message.reportTasks.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTasks[i]); + if (error) + return "reportTasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse + */ + ListReportTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); + if (object.reportTasks) { + if (!Array.isArray(object.reportTasks)) + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: array expected"); + message.reportTasks = []; + for (var i = 0; i < object.reportTasks.length; ++i) { + if (typeof object.reportTasks[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: object expected"); + message.reportTasks[i] = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {google.analytics.data.v1alpha.ListReportTasksResponse} message ListReportTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reportTasks = []; + if (message.reportTasks && message.reportTasks.length) { + object.reportTasks = []; + for (var j = 0; j < message.reportTasks.length; ++j) + object.reportTasks[j] = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListReportTasksResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportTasksResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ListReportTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksResponse"; + }; + + return ListReportTasksResponse; + })(); + + v1alpha.RunReportRequest = (function() { + + /** + * Properties of a RunReportRequest. + * @memberof google.analytics.data.v1alpha + * @interface IRunReportRequest + * @property {string|null} [property] RunReportRequest property + * @property {Array.|null} [dimensions] RunReportRequest dimensions + * @property {Array.|null} [metrics] RunReportRequest metrics + * @property {Array.|null} [dateRanges] RunReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter + * @property {number|Long|null} [offset] RunReportRequest offset + * @property {number|Long|null} [limit] RunReportRequest limit + * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunReportRequest orderBys + * @property {string|null} [currencyCode] RunReportRequest currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunReportRequest comparisons + * @property {google.analytics.data.v1alpha.IConversionSpec|null} [conversionSpec] RunReportRequest conversionSpec + */ + + /** + * Constructs a new RunReportRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunReportRequest. + * @implements IRunReportRequest + * @constructor + * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set + */ + function RunReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + this.comparisons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.property = ""; + + /** + * RunReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensionFilter = null; + + /** + * RunReportRequest metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricFilter = null; + + /** + * RunReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricAggregations = $util.emptyArray; + + /** + * RunReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.currencyCode = ""; + + /** + * RunReportRequest cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.cohortSpec = null; + + /** + * RunReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.keepEmptyRows = false; + + /** + * RunReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.comparisons = $util.emptyArray; + + /** + * RunReportRequest conversionSpec. + * @member {google.analytics.data.v1alpha.IConversionSpec|null|undefined} conversionSpec + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + */ + RunReportRequest.prototype.conversionSpec = null; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest instance + */ + RunReportRequest.create = function create(properties) { + return new RunReportRequest(properties); + }; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1alpha.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.conversionSpec != null && Object.hasOwnProperty.call(message, "conversionSpec")) + $root.google.analytics.data.v1alpha.ConversionSpec.encode(message.conversionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 15: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1alpha.Comparison.decode(reader, reader.uint32())); + break; + } + case 16: { + message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) { + var error = $root.google.analytics.data.v1alpha.ConversionSpec.verify(message.conversionSpec); + if (error) + return "conversionSpec." + error; + } + return null; + }; + + /** + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest + */ + RunReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunReportRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.RunReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1alpha.Comparison.fromObject(object.comparisons[i]); + } + } + if (object.conversionSpec != null) { + if (typeof object.conversionSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.conversionSpec: object expected"); + message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.fromObject(object.conversionSpec); + } + return message; + }; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {google.analytics.data.v1alpha.RunReportRequest} message RunReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + object.conversionSpec = null; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1alpha.Comparison.toObject(message.comparisons[j], options); + } + if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) + object.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.toObject(message.conversionSpec, options); + return object; + }; + + /** + * Converts this RunReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportRequest"; + }; + + return RunReportRequest; + })(); + + v1alpha.RunReportResponse = (function() { + + /** + * Properties of a RunReportResponse. + * @memberof google.analytics.data.v1alpha + * @interface IRunReportResponse + * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders + * @property {Array.|null} [rows] RunReportResponse rows + * @property {Array.|null} [totals] RunReportResponse totals + * @property {Array.|null} [maximums] RunReportResponse maximums + * @property {Array.|null} [minimums] RunReportResponse minimums + * @property {number|null} [rowCount] RunReportResponse rowCount + * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] RunReportResponse metadata + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota + * @property {string|null} [kind] RunReportResponse kind + * @property {string|null} [nextPageToken] RunReportResponse nextPageToken + */ + + /** + * Constructs a new RunReportResponse. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a RunReportResponse. + * @implements IRunReportResponse + * @constructor + * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set + */ + function RunReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.totals = $util.emptyArray; + + /** + * RunReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rowCount = 0; + + /** + * RunReportResponse metadata. + * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metadata = null; + + /** + * RunReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.propertyQuota = null; + + /** + * RunReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.kind = ""; + + /** + * RunReportResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RunReportResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse instance + */ + RunReportResponse.create = function create(properties) { + return new RunReportResponse(properties); + }; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 10: { + message.kind = reader.string(); + break; + } + case 11: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse + */ + RunReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunReportResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.RunReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {google.analytics.data.v1alpha.RunReportResponse} message RunReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this RunReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportResponse"; + }; + + return RunReportResponse; + })(); + + v1alpha.GetMetadataRequest = (function() { + + /** + * Properties of a GetMetadataRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetMetadataRequest + * @property {string|null} [name] GetMetadataRequest name + */ + + /** + * Constructs a new GetMetadataRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetMetadataRequest. + * @implements IGetMetadataRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set + */ + function GetMetadataRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMetadataRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @instance + */ + GetMetadataRequest.prototype.name = ""; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest instance + */ + GetMetadataRequest.create = function create(properties) { + return new GetMetadataRequest(properties); + }; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + */ + GetMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetMetadataRequest) + return object; + var message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.GetMetadataRequest} message GetMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMetadataRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetMetadataRequest"; + }; + + return GetMetadataRequest; + })(); + + v1alpha.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.analytics.data.v1alpha + * @interface IMetadata + * @property {string|null} [name] Metadata name + * @property {Array.|null} [dimensions] Metadata dimensions + * @property {Array.|null} [metrics] Metadata metrics + * @property {Array.|null} [comparisons] Metadata comparisons + * @property {Array.|null} [conversions] Metadata conversions + */ + + /** + * Constructs a new Metadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.dimensions = []; + this.metrics = []; + this.comparisons = []; + this.conversions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.name = ""; + + /** + * Metadata dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.dimensions = $util.emptyArray; + + /** + * Metadata metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.metrics = $util.emptyArray; + + /** + * Metadata comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.comparisons = $util.emptyArray; + + /** + * Metadata conversions. + * @member {Array.} conversions + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.conversions = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1alpha.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conversions != null && message.conversions.length) + for (var i = 0; i < message.conversions.length; ++i) + $root.google.analytics.data.v1alpha.ConversionMetadata.encode(message.conversions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.name = reader.string(); + break; + } + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.DimensionMetadata.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.MetricMetadata.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1alpha.ComparisonMetadata.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.conversions && message.conversions.length)) + message.conversions = []; + message.conversions.push($root.google.analytics.data.v1alpha.ConversionMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionMetadata.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricMetadata.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ComparisonMetadata.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + if (message.conversions != null && message.hasOwnProperty("conversions")) { + if (!Array.isArray(message.conversions)) + return "conversions: array expected"; + for (var i = 0; i < message.conversions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ConversionMetadata.verify(message.conversions[i]); + if (error) + return "conversions." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metadata) + return object; + var message = new $root.google.analytics.data.v1alpha.Metadata(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.DimensionMetadata.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.MetricMetadata.fromObject(object.metrics[i]); + } + } + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1alpha.ComparisonMetadata.fromObject(object.comparisons[i]); + } + } + if (object.conversions) { + if (!Array.isArray(object.conversions)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: array expected"); + message.conversions = []; + for (var i = 0; i < object.conversions.length; ++i) { + if (typeof object.conversions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: object expected"); + message.conversions[i] = $root.google.analytics.data.v1alpha.ConversionMetadata.fromObject(object.conversions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {google.analytics.data.v1alpha.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.comparisons = []; + object.conversions = []; + } + if (options.defaults) + object.name = ""; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.DimensionMetadata.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.MetricMetadata.toObject(message.metrics[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1alpha.ComparisonMetadata.toObject(message.comparisons[j], options); + } + if (message.conversions && message.conversions.length) { + object.conversions = []; + for (var j = 0; j < message.conversions.length; ++j) + object.conversions[j] = $root.google.analytics.data.v1alpha.ConversionMetadata.toObject(message.conversions[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metadata"; + }; + + return Metadata; + })(); + + v1alpha.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.analytics.data.v1alpha + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name + */ + + /** + * Constructs a new DateRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + */ + function DateRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.startDate = ""; + + /** + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.endDate = ""; + + /** + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + */ + DateRange.prototype.name = ""; + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DateRange) + return object; + var message = new $root.google.analytics.data.v1alpha.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {google.analytics.data.v1alpha.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; + }; + + return DateRange; + })(); + + v1alpha.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.analytics.data.v1alpha + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + */ + + /** + * Constructs a new Dimension. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + */ + function Dimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.name = ""; + + /** + * Dimension dimensionExpression. + * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Dimension) + return object; + var message = new $root.google.analytics.data.v1alpha.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {google.analytics.data.v1alpha.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; + }; + + return Dimension; + })(); + + v1alpha.DimensionExpression = (function() { + + /** + * Properties of a DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionExpression + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + */ + + /** + * Constructs a new DimensionExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + */ + function DimensionExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.lowerCase = null; + + /** + * DimensionExpression upperCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.upperCase = null; + + /** + * DimensionExpression concatenate. + * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + DimensionExpression.prototype.concatenate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + */ + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance + */ + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); + }; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (error) + return "lowerCase." + error; + } + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); + if (error) + return "upperCase." + error; + } + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (error) + return "concatenate." + error; + } + } + return null; + }; + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + */ + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); + } + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); + } + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + } + return message; + }; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); + if (options.oneofs) + object.oneExpression = "lowerCase"; + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); + if (options.oneofs) + object.oneExpression = "upperCase"; + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (options.oneofs) + object.oneExpression = "concatenate"; + } + return object; + }; + + /** + * Converts this DimensionExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @instance + * @returns {Object.} JSON object + */ + DimensionExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; + }; + + DimensionExpression.CaseExpression = (function() { + + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ + + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; + }; + + return CaseExpression; + })(); + + DimensionExpression.ConcatenateExpression = (function() { + + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ + + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; + }; + + return ConcatenateExpression; + })(); + + return DimensionExpression; + })(); + + v1alpha.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.analytics.data.v1alpha + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible + */ + + /** + * Constructs a new Metric. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.expression = ""; + + /** + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metric) + return object; + var message = new $root.google.analytics.data.v1alpha.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {google.analytics.data.v1alpha.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expression = ""; + object.invisible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; + }; + + return Metric; + })(); + + v1alpha.Comparison = (function() { + + /** + * Properties of a Comparison. + * @memberof google.analytics.data.v1alpha + * @interface IComparison + * @property {string|null} [name] Comparison name + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter + * @property {string|null} [comparison] Comparison comparison + */ + + /** + * Constructs a new Comparison. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Comparison. + * @implements IComparison + * @constructor + * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set + */ + function Comparison(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Comparison name. + * @member {string|null|undefined} name + * @memberof google.analytics.data.v1alpha.Comparison + * @instance + */ + Comparison.prototype.name = null; + + /** + * Comparison dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.Comparison + * @instance + */ + Comparison.prototype.dimensionFilter = null; + + /** + * Comparison comparison. + * @member {string|null|undefined} comparison + * @memberof google.analytics.data.v1alpha.Comparison + * @instance + */ + Comparison.prototype.comparison = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Comparison.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Comparison oneComparison. + * @member {"dimensionFilter"|"comparison"|undefined} oneComparison + * @memberof google.analytics.data.v1alpha.Comparison + * @instance + */ + Object.defineProperty(Comparison.prototype, "oneComparison", { + get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Comparison instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Comparison} Comparison instance + */ + Comparison.create = function create(properties) { + return new Comparison(properties); + }; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); + return writer; + }; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Comparison(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 3: { + message.comparison = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Comparison message. + * @function verify + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Comparison.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + properties.oneComparison = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + if (properties.oneComparison === 1) + return "oneComparison: multiple values"; + properties.oneComparison = 1; + if (!$util.isString(message.comparison)) + return "comparison: string expected"; + } + return null; + }; + + /** + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Comparison} Comparison + */ + Comparison.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Comparison) + return object; + var message = new $root.google.analytics.data.v1alpha.Comparison(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Comparison.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.comparison != null) + message.comparison = String(object.comparison); + return message; + }; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {google.analytics.data.v1alpha.Comparison} message Comparison + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Comparison.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (options.oneofs) + object.oneComparison = "dimensionFilter"; + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + object.comparison = message.comparison; + if (options.oneofs) + object.oneComparison = "comparison"; + } + return object; + }; + + /** + * Converts this Comparison to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Comparison + * @instance + * @returns {Object.} JSON object + */ + Comparison.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Comparison + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Comparison + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Comparison"; + }; + + return Comparison; + })(); + + v1alpha.FilterExpression = (function() { + + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpression + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter + */ + + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; + + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; + + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; + + /** + * FilterExpression filter. + * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; + }; + + return FilterExpression; + })(); + + v1alpha.FilterExpressionList = (function() { + + /** + * Properties of a FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions + */ + + /** + * Constructs a new FilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + */ + function FilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + */ + FilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance + */ + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); + }; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + */ + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; + }; + + return FilterExpressionList; + })(); + + v1alpha.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.analytics.data.v1alpha + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + */ + + /** + * Constructs a new Filter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Filter) + return object; + var message = new $root.google.analytics.data.v1alpha.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {google.analytics.data.v1alpha.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; + }; + + return Filter; + })(); + + v1alpha.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.data.v1alpha + * @interface IStringFilter + * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + */ + function StringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.data.v1alpha.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + v1alpha.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.data.v1alpha + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + */ + function InListFilter(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; + }; + + return InListFilter; + })(); + + v1alpha.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.data.v1alpha + * @interface INumericFilter + * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1alpha.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + v1alpha.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1alpha + * @interface IOrderBy + * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + */ + function OrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return OrderBy; + })(); + + v1alpha.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @interface IBetweenFilter + * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + v1alpha.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) + return object; + return new $root.google.analytics.data.v1alpha.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + v1alpha.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1alpha + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; + }; + + return NumericValue; + })(); + + v1alpha.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1alpha + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1alpha.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1alpha + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + */ + function Cohort(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Cohort) + return object; + var message = new $root.google.analytics.data.v1alpha.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; + }; + + return Cohort; + })(); + + v1alpha.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1alpha + * @interface ICohortsRange + * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1alpha.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1alpha.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + /** + * Section enum. + * @name google.analytics.data.v1alpha.Section + * @enum {number} + * @property {number} SECTION_UNSPECIFIED=0 SECTION_UNSPECIFIED value + * @property {number} SECTION_REPORT=1 SECTION_REPORT value + * @property {number} SECTION_ADVERTISING=2 SECTION_ADVERTISING value + */ + v1alpha.Section = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SECTION_REPORT"] = 1; + values[valuesById[2] = "SECTION_ADVERTISING"] = 2; + return values; + })(); + + v1alpha.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + * @property {google.analytics.data.v1alpha.Section|null} [section] ResponseMetaData section + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + /** + * ResponseMetaData section. + * @member {google.analytics.data.v1alpha.Section} section + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.section = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.section != null && Object.hasOwnProperty.call(message, "section")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.section); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + case 10: { + message.section = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + if (message.section != null && message.hasOwnProperty("section")) + switch (message.section) { + default: + return "section: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + switch (object.section) { + default: + if (typeof object.section === "number") { + message.section = object.section; + break; + } + break; + case "SECTION_UNSPECIFIED": + case 0: + message.section = 0; + break; + case "SECTION_REPORT": + case 1: + message.section = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.section = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) { + object.dataLossFromOtherRow = false; + object.section = options.enums === String ? "SECTION_UNSPECIFIED" : 0; + } + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + if (message.section != null && message.hasOwnProperty("section")) + object.section = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.section] === undefined ? message.section : $root.google.analytics.data.v1alpha.Section[message.section] : message.section; + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; + + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; + })(); + + v1alpha.DimensionHeader = (function() { + + /** + * Properties of a DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name + */ + + /** + * Constructs a new DimensionHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + */ + function DimensionHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + */ + DimensionHeader.prototype.name = ""; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance + */ + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); + }; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + */ + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @instance + * @returns {Object.} JSON object + */ + DimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; + }; + + return DimensionHeader; + })(); + + v1alpha.MetricHeader = (function() { + + /** + * Properties of a MetricHeader. + * @memberof google.analytics.data.v1alpha + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type + */ + + /** + * Constructs a new MetricHeader. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader + * @constructor + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + */ + function MetricHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.name = ""; + + /** + * MetricHeader type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance + */ + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); + }; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricHeader message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + */ + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + return object; + }; + + /** + * Converts this MetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + * @returns {Object.} JSON object + */ + MetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; + }; + + return MetricHeader; + })(); + + v1alpha.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.analytics.data.v1alpha + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues + */ + + /** + * Constructs a new Row. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1alpha.Row + * @instance + */ + Row.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Row) + return object; + var message = new $root.google.analytics.data.v1alpha.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {google.analytics.data.v1alpha.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; + }; + + return Row; + })(); + + v1alpha.DimensionValue = (function() { + + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ + + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; + }; + + return DimensionValue; + })(); + + v1alpha.MetricValue = (function() { + + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1alpha + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ + + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + */ + function MetricValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + MetricValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; + }; + + return MetricValue; + })(); + + v1alpha.PropertyQuota = (function() { + + /** + * Properties of a PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @interface IPropertyQuota + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new PropertyQuota. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota + * @constructor + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + */ + function PropertyQuota(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerDay = null; + + /** + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance + */ + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); + }; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuota message. + * @function verify + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + */ + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) + return object; + var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this PropertyQuota to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + * @returns {Object.} JSON object + */ + PropertyQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuota + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; + }; + + return PropertyQuota; + })(); + + v1alpha.QuotaStatus = (function() { + + /** + * Properties of a QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining + */ + + /** + * Constructs a new QuotaStatus. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus + * @constructor + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + */ + function QuotaStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.consumed = 0; + + /** + * QuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + */ + QuotaStatus.prototype.remaining = 0; + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance + */ + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); + }; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaStatus message. + * @function verify + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + return null; + }; + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + */ + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) + return object; + var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consumed = 0; + object.remaining = 0; + } + if (message.consumed != null && message.hasOwnProperty("consumed")) + object.consumed = message.consumed; + if (message.remaining != null && message.hasOwnProperty("remaining")) + object.remaining = message.remaining; + return object; + }; + + /** + * Converts this QuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @instance + * @returns {Object.} JSON object + */ + QuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaStatus + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.QuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; + }; + + return QuotaStatus; + })(); + + v1alpha.FunnelBreakdown = (function() { + + /** + * Properties of a FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelBreakdown + * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension + * @property {number|Long|null} [limit] FunnelBreakdown limit + */ + + /** + * Constructs a new FunnelBreakdown. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelBreakdown. + * @implements IFunnelBreakdown + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + */ + function FunnelBreakdown(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelBreakdown breakdownDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.breakdownDimension = null; + + /** + * FunnelBreakdown limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + */ + FunnelBreakdown.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelBreakdown.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelBreakdown instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance + */ + FunnelBreakdown.create = function create(properties) { + return new FunnelBreakdown(properties); + }; + + /** + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelBreakdown message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelBreakdown.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); + if (error) + return "breakdownDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + */ + FunnelBreakdown.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + if (object.breakdownDimension != null) { + if (typeof object.breakdownDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelBreakdown.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.breakdownDimension = null; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) + object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelBreakdown to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @instance + * @returns {Object.} JSON object + */ + FunnelBreakdown.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelBreakdown + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; + }; + + return FunnelBreakdown; + })(); + + v1alpha.FunnelNextAction = (function() { + + /** + * Properties of a FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelNextAction + * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension + * @property {number|Long|null} [limit] FunnelNextAction limit + */ + + /** + * Constructs a new FunnelNextAction. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelNextAction. + * @implements IFunnelNextAction + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + */ + function FunnelNextAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelNextAction nextActionDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.nextActionDimension = null; + + /** + * FunnelNextAction limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + */ + FunnelNextAction.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelNextAction.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelNextAction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance + */ + FunnelNextAction.create = function create(properties) { + return new FunnelNextAction(properties); + }; + + /** + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelNextAction message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelNextAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); + if (error) + return "nextActionDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + */ + FunnelNextAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + if (object.nextActionDimension != null) { + if (typeof object.nextActionDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelNextAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nextActionDimension = null; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) + object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this FunnelNextAction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @instance + * @returns {Object.} JSON object + */ + FunnelNextAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelNextAction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; + }; + + return FunnelNextAction; + })(); + + v1alpha.Funnel = (function() { + + /** + * Properties of a Funnel. + * @memberof google.analytics.data.v1alpha + * @interface IFunnel + * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel + * @property {Array.|null} [steps] Funnel steps + */ + + /** + * Constructs a new Funnel. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Funnel. + * @implements IFunnel + * @constructor + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + */ + function Funnel(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Funnel isOpenFunnel. + * @member {boolean} isOpenFunnel + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.isOpenFunnel = false; + + /** + * Funnel steps. + * @member {Array.} steps + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + */ + Funnel.prototype.steps = $util.emptyArray; + + /** + * Creates a new Funnel instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance + */ + Funnel.create = function create(properties) { + return new Funnel(properties); + }; + + /** + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Funnel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Funnel message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isOpenFunnel = reader.bool(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Funnel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Funnel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Funnel message. + * @function verify + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Funnel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + if (typeof message.isOpenFunnel !== "boolean") + return "isOpenFunnel: boolean expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; + + /** + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Funnel} Funnel + */ + Funnel.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Funnel) + return object; + var message = new $root.google.analytics.data.v1alpha.Funnel(); + if (object.isOpenFunnel != null) + message.isOpenFunnel = Boolean(object.isOpenFunnel); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); + message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {google.analytics.data.v1alpha.Funnel} message Funnel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Funnel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.isOpenFunnel = false; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + object.isOpenFunnel = message.isOpenFunnel; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); + } + return object; + }; + + /** + * Converts this Funnel to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Funnel + * @instance + * @returns {Object.} JSON object + */ + Funnel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Funnel + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Funnel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; + }; + + return Funnel; + })(); + + v1alpha.FunnelStep = (function() { + + /** + * Properties of a FunnelStep. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelStep + * @property {string|null} [name] FunnelStep name + * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy + * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression + */ + + /** + * Constructs a new FunnelStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelStep. + * @implements IFunnelStep + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + */ + function FunnelStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelStep name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.name = ""; + + /** + * FunnelStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.isDirectlyFollowedBy = false; + + /** + * FunnelStep withinDurationFromPriorStep. + * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.withinDurationFromPriorStep = null; + + /** + * FunnelStep filterExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + */ + FunnelStep.prototype.filterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { + get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance + */ + FunnelStep.create = function create(properties) { + return new FunnelStep(properties); + }; + + /** + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); + if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) + $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 3: { + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + properties._withinDurationFromPriorStep = 1; + { + var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); + if (error) + return "withinDurationFromPriorStep." + error; + } + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + */ + FunnelStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelStep(); + if (object.name != null) + message.name = String(object.name); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + if (object.withinDurationFromPriorStep != null) { + if (typeof object.withinDurationFromPriorStep !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.isDirectlyFollowedBy = false; + object.filterExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); + if (options.oneofs) + object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this FunnelStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelStep + * @instance + * @returns {Object.} JSON object + */ + FunnelStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; + }; + + return FunnelStep; + })(); + + v1alpha.FunnelSubReport = (function() { + + /** + * Properties of a FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelSubReport + * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders + * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders + * @property {Array.|null} [rows] FunnelSubReport rows + * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata + */ + + /** + * Constructs a new FunnelSubReport. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelSubReport. + * @implements IFunnelSubReport + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + */ + function FunnelSubReport(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelSubReport dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; + + /** + * FunnelSubReport metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metricHeaders = $util.emptyArray; + + /** + * FunnelSubReport rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.rows = $util.emptyArray; + + /** + * FunnelSubReport metadata. + * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metadata = null; + + /** + * Creates a new FunnelSubReport instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance + */ + FunnelSubReport.create = function create(properties) { + return new FunnelSubReport(properties); + }; + + /** + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelSubReport message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelSubReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + */ + FunnelSubReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelSubReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + } + if (options.defaults) + object.metadata = null; + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this FunnelSubReport to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + * @returns {Object.} JSON object + */ + FunnelSubReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelSubReport + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; + }; + + return FunnelSubReport; + })(); + + v1alpha.UserSegment = (function() { + + /** + * Properties of a UserSegment. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegment + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria + * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion + */ + + /** + * Constructs a new UserSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegment. + * @implements IUserSegment + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + */ + function UserSegment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSegment userInclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.userInclusionCriteria = null; + + /** + * UserSegment exclusion. + * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + */ + UserSegment.prototype.exclusion = null; + + /** + * Creates a new UserSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance + */ + UserSegment.create = function create(properties) { + return new UserSegment(properties); + }; + + /** + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); + if (error) + return "userInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + */ + UserSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegment(); + if (object.userInclusionCriteria != null) { + if (typeof object.userInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userInclusionCriteria = null; + object.exclusion = null; + } + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) + object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this UserSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegment + * @instance + * @returns {Object.} JSON object + */ + UserSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; + }; + + return UserSegment; + })(); + + v1alpha.UserSegmentCriteria = (function() { + + /** + * Properties of a UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentCriteria + * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups + * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups + */ + + /** + * Constructs a new UserSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentCriteria. + * @implements IUserSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + */ + function UserSegmentCriteria(properties) { + this.andConditionGroups = []; + this.andSequenceGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * UserSegmentCriteria andSequenceGroups. + * @member {Array.} andSequenceGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + */ + UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; + + /** + * Creates a new UserSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance + */ + UserSegmentCriteria.create = function create(properties) { + return new UserSegmentCriteria(properties); + }; + + /** + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.andSequenceGroups != null && message.andSequenceGroups.length) + for (var i = 0; i < message.andSequenceGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.andSequenceGroups && message.andSequenceGroups.length)) + message.andSequenceGroups = []; + message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { + if (!Array.isArray(message.andSequenceGroups)) + return "andSequenceGroups: array expected"; + for (var i = 0; i < message.andSequenceGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); + if (error) + return "andSequenceGroups." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + */ + UserSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + if (object.andSequenceGroups) { + if (!Array.isArray(object.andSequenceGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); + message.andSequenceGroups = []; + for (var i = 0; i < object.andSequenceGroups.length; ++i) { + if (typeof object.andSequenceGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); + message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.andConditionGroups = []; + object.andSequenceGroups = []; + } + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + if (message.andSequenceGroups && message.andSequenceGroups.length) { + object.andSequenceGroups = []; + for (var j = 0; j < message.andSequenceGroups.length; ++j) + object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + UserSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; + }; + + return UserSegmentCriteria; + })(); + + /** + * UserCriteriaScoping enum. + * @name google.analytics.data.v1alpha.UserCriteriaScoping + * @enum {number} + * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value + * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value + */ + v1alpha.UserCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.UserSegmentConditionGroup = (function() { + + /** + * Properties of a UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentConditionGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new UserSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentConditionGroup. + * @implements IUserSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + */ + function UserSegmentConditionGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * UserSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + */ + UserSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance + */ + UserSegmentConditionGroup.create = function create(properties) { + return new UserSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + */ + UserSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.conditionScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; + }; + + return UserSegmentConditionGroup; + })(); + + v1alpha.UserSegmentSequenceGroup = (function() { + + /** + * Properties of a UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentSequenceGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration + * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps + */ + + /** + * Constructs a new UserSegmentSequenceGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentSequenceGroup. + * @implements IUserSegmentSequenceGroup + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + */ + function UserSegmentSequenceGroup(properties) { + this.userSequenceSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSegmentSequenceGroup sequenceScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceScoping = 0; + + /** + * UserSegmentSequenceGroup sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; + + /** + * UserSegmentSequenceGroup userSequenceSteps. + * @member {Array.} userSequenceSteps + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + */ + UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; + + /** + * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance + */ + UserSegmentSequenceGroup.create = function create(properties) { + return new UserSegmentSequenceGroup(properties); + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userSequenceSteps != null && message.userSequenceSteps.length) + for (var i = 0; i < message.userSequenceSteps.length; ++i) + $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sequenceScoping = reader.int32(); + break; + } + case 2: { + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.userSequenceSteps && message.userSequenceSteps.length)) + message.userSequenceSteps = []; + message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentSequenceGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentSequenceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + switch (message.sequenceScoping) { + default: + return "sequenceScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (error) + return "sequenceMaximumDuration." + error; + } + if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { + if (!Array.isArray(message.userSequenceSteps)) + return "userSequenceSteps: array expected"; + for (var i = 0; i < message.userSequenceSteps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); + if (error) + return "userSequenceSteps." + error; + } + } + return null; + }; + + /** + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + */ + UserSegmentSequenceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + switch (object.sequenceScoping) { + default: + if (typeof object.sequenceScoping === "number") { + message.sequenceScoping = object.sequenceScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.sequenceScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.sequenceScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.sequenceScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.sequenceScoping = 3; + break; + } + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.userSequenceSteps) { + if (!Array.isArray(object.userSequenceSteps)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); + message.userSequenceSteps = []; + for (var i = 0; i < object.userSequenceSteps.length; ++i) { + if (typeof object.userSequenceSteps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); + message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentSequenceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userSequenceSteps = []; + if (options.defaults) { + object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.userSequenceSteps && message.userSequenceSteps.length) { + object.userSequenceSteps = []; + for (var j = 0; j < message.userSequenceSteps.length; ++j) + object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); + } + return object; + }; + + /** + * Converts this UserSegmentSequenceGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @instance + * @returns {Object.} JSON object + */ + UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentSequenceGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; + }; + + return UserSegmentSequenceGroup; + })(); + + v1alpha.UserSequenceStep = (function() { + + /** + * Properties of a UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @interface IUserSequenceStep + * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression + */ + + /** + * Constructs a new UserSequenceStep. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSequenceStep. + * @implements IUserSequenceStep + * @constructor + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + */ + function UserSequenceStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSequenceStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.isDirectlyFollowedBy = false; + + /** + * UserSequenceStep stepScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.stepScoping = 0; + + /** + * UserSequenceStep segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + */ + UserSequenceStep.prototype.segmentFilterExpression = null; + + /** + * Creates a new UserSequenceStep instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance + */ + UserSequenceStep.create = function create(properties) { + return new UserSequenceStep(properties); + }; + + /** + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); + if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isDirectlyFollowedBy = reader.bool(); + break; + } + case 2: { + message.stepScoping = reader.int32(); + break; + } + case 3: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSequenceStep message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSequenceStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + switch (message.stepScoping) { + default: + return "stepScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + */ + UserSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + switch (object.stepScoping) { + default: + if (typeof object.stepScoping === "number") { + message.stepScoping = object.stepScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.stepScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.stepScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.stepScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.stepScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSequenceStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isDirectlyFollowedBy = false; + object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this UserSequenceStep to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @instance + * @returns {Object.} JSON object + */ + UserSequenceStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSequenceStep + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; + }; + + return UserSequenceStep; + })(); + + v1alpha.UserSegmentExclusion = (function() { + + /** + * Properties of a UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IUserSegmentExclusion + * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria + */ + + /** + * Constructs a new UserSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a UserSegmentExclusion. + * @implements IUserSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + */ + function UserSegmentExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserSegmentExclusion userExclusionDuration. + * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionDuration = 0; + + /** + * UserSegmentExclusion userExclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + */ + UserSegmentExclusion.prototype.userExclusionCriteria = null; + + /** + * Creates a new UserSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance + */ + UserSegmentExclusion.create = function create(properties) { + return new UserSegmentExclusion(properties); + }; + + /** + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); + if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userExclusionDuration = reader.int32(); + break; + } + case 2: { + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + switch (message.userExclusionDuration) { + default: + return "userExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); + if (error) + return "userExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + */ + UserSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + switch (object.userExclusionDuration) { + default: + if (typeof object.userExclusionDuration === "number") { + message.userExclusionDuration = object.userExclusionDuration; + break; + } + break; + case "USER_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.userExclusionDuration = 0; + break; + case "USER_EXCLUSION_TEMPORARY": + case 1: + message.userExclusionDuration = 1; + break; + case "USER_EXCLUSION_PERMANENT": + case 2: + message.userExclusionDuration = 2; + break; + } + if (object.userExclusionCriteria != null) { + if (typeof object.userExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.userExclusionCriteria = null; + } + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) + object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); + return object; + }; + + /** + * Converts this UserSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + UserSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; + }; + + return UserSegmentExclusion; + })(); + + /** + * UserExclusionDuration enum. + * @name google.analytics.data.v1alpha.UserExclusionDuration + * @enum {number} + * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value + * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value + */ + v1alpha.UserExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.SessionSegment = (function() { + + /** + * Properties of a SessionSegment. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegment + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria + * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion + */ + + /** + * Constructs a new SessionSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegment. + * @implements ISessionSegment + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + */ + function SessionSegment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSegment sessionInclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.sessionInclusionCriteria = null; + + /** + * SessionSegment exclusion. + * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + */ + SessionSegment.prototype.exclusion = null; + + /** + * Creates a new SessionSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance + */ + SessionSegment.create = function create(properties) { + return new SessionSegment(properties); + }; + + /** + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); + if (error) + return "sessionInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + */ + SessionSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegment(); + if (object.sessionInclusionCriteria != null) { + if (typeof object.sessionInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionInclusionCriteria = null; + object.exclusion = null; + } + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) + object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this SessionSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegment + * @instance + * @returns {Object.} JSON object + */ + SessionSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; + }; + + return SessionSegment; + })(); + + v1alpha.SessionSegmentCriteria = (function() { + + /** + * Properties of a SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentCriteria + * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new SessionSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentCriteria. + * @implements ISessionSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + */ + function SessionSegmentCriteria(properties) { + this.andConditionGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + */ + SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new SessionSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance + */ + SessionSegmentCriteria.create = function create(properties) { + return new SessionSegmentCriteria(properties); + }; + + /** + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + */ + SessionSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this SessionSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; + }; + + return SessionSegmentCriteria; + })(); + + /** + * SessionCriteriaScoping enum. + * @name google.analytics.data.v1alpha.SessionCriteriaScoping + * @enum {number} + * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value + */ + v1alpha.SessionCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; + return values; + })(); + + v1alpha.SessionSegmentConditionGroup = (function() { + + /** + * Properties of a SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentConditionGroup + * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new SessionSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentConditionGroup. + * @implements ISessionSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + */ + function SessionSegmentConditionGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * SessionSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + */ + SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance + */ + SessionSegmentConditionGroup.create = function create(properties) { + return new SessionSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + */ + SessionSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "SESSION_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "SESSION_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this SessionSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; + }; + + return SessionSegmentConditionGroup; + })(); + + v1alpha.SessionSegmentExclusion = (function() { + + /** + * Properties of a SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface ISessionSegmentExclusion + * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria + */ + + /** + * Constructs a new SessionSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SessionSegmentExclusion. + * @implements ISessionSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + */ + function SessionSegmentExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSegmentExclusion sessionExclusionDuration. + * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; + + /** + * SessionSegmentExclusion sessionExclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + */ + SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; + + /** + * Creates a new SessionSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance + */ + SessionSegmentExclusion.create = function create(properties) { + return new SessionSegmentExclusion(properties); + }; + + /** + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); + if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionExclusionDuration = reader.int32(); + break; + } + case 2: { + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + switch (message.sessionExclusionDuration) { + default: + return "sessionExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); + if (error) + return "sessionExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + */ + SessionSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + switch (object.sessionExclusionDuration) { + default: + if (typeof object.sessionExclusionDuration === "number") { + message.sessionExclusionDuration = object.sessionExclusionDuration; + break; + } + break; + case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.sessionExclusionDuration = 0; + break; + case "SESSION_EXCLUSION_TEMPORARY": + case 1: + message.sessionExclusionDuration = 1; + break; + case "SESSION_EXCLUSION_PERMANENT": + case 2: + message.sessionExclusionDuration = 2; + break; + } + if (object.sessionExclusionCriteria != null) { + if (typeof object.sessionExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.sessionExclusionCriteria = null; + } + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) + object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); + return object; + }; + + /** + * Converts this SessionSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + SessionSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; + }; + + return SessionSegmentExclusion; + })(); + + /** + * SessionExclusionDuration enum. + * @name google.analytics.data.v1alpha.SessionExclusionDuration + * @enum {number} + * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value + * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value + */ + v1alpha.SessionExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.EventSegment = (function() { + + /** + * Properties of an EventSegment. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegment + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria + * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion + */ + + /** + * Constructs a new EventSegment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegment. + * @implements IEventSegment + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + */ + function EventSegment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventSegment eventInclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.eventInclusionCriteria = null; + + /** + * EventSegment exclusion. + * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + */ + EventSegment.prototype.exclusion = null; + + /** + * Creates a new EventSegment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance + */ + EventSegment.create = function create(properties) { + return new EventSegment(properties); + }; + + /** + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegment message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); + if (error) + return "eventInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; + } + return null; + }; + + /** + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + */ + EventSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegment(); + if (object.eventInclusionCriteria != null) { + if (typeof object.eventInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); + } + return message; + }; + + /** + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventInclusionCriteria = null; + object.exclusion = null; + } + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) + object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); + return object; + }; + + /** + * Converts this EventSegment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegment + * @instance + * @returns {Object.} JSON object + */ + EventSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; + }; + + return EventSegment; + })(); + + v1alpha.EventSegmentCriteria = (function() { + + /** + * Properties of an EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentCriteria + * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups + */ + + /** + * Constructs a new EventSegmentCriteria. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentCriteria. + * @implements IEventSegmentCriteria + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + */ + function EventSegmentCriteria(properties) { + this.andConditionGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + */ + EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + + /** + * Creates a new EventSegmentCriteria instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance + */ + EventSegmentCriteria.create = function create(properties) { + return new EventSegmentCriteria(properties); + }; + + /** + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentCriteria message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } + } + return null; + }; + + /** + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + */ + EventSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + return object; + }; + + /** + * Converts this EventSegmentCriteria to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @instance + * @returns {Object.} JSON object + */ + EventSegmentCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentCriteria + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; + }; + + return EventSegmentCriteria; + })(); + + /** + * EventCriteriaScoping enum. + * @name google.analytics.data.v1alpha.EventCriteriaScoping + * @enum {number} + * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value + */ + v1alpha.EventCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; + return values; + })(); + + v1alpha.EventSegmentConditionGroup = (function() { + + /** + * Properties of an EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentConditionGroup + * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression + */ + + /** + * Constructs a new EventSegmentConditionGroup. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentConditionGroup. + * @implements IEventSegmentConditionGroup + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + */ + function EventSegmentConditionGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.conditionScoping = 0; + + /** + * EventSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance + */ + EventSegmentConditionGroup.create = function create(properties) { + return new EventSegmentConditionGroup(properties); + }; + + /** + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentConditionGroup message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentConditionGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + break; + } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; + } + return null; + }; + + /** + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + */ + EventSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; + } + break; + case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "EVENT_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentConditionGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; + } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + return object; + }; + + /** + * Converts this EventSegmentConditionGroup to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + * @returns {Object.} JSON object + */ + EventSegmentConditionGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentConditionGroup + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; + }; + + return EventSegmentConditionGroup; + })(); + + v1alpha.EventSegmentExclusion = (function() { + + /** + * Properties of an EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @interface IEventSegmentExclusion + * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria + */ + + /** + * Constructs a new EventSegmentExclusion. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EventSegmentExclusion. + * @implements IEventSegmentExclusion + * @constructor + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + */ + function EventSegmentExclusion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventSegmentExclusion eventExclusionDuration. + * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionDuration = 0; + + /** + * EventSegmentExclusion eventExclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + */ + EventSegmentExclusion.prototype.eventExclusionCriteria = null; + + /** + * Creates a new EventSegmentExclusion instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance + */ + EventSegmentExclusion.create = function create(properties) { + return new EventSegmentExclusion(properties); + }; + + /** + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); + if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventExclusionDuration = reader.int32(); + break; + } + case 2: { + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventSegmentExclusion message. + * @function verify + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventSegmentExclusion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + switch (message.eventExclusionDuration) { + default: + return "eventExclusionDuration: enum value expected"; + case 0: + case 1: + break; + } + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); + if (error) + return "eventExclusionCriteria." + error; + } + return null; + }; + + /** + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + */ + EventSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) + return object; + var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + switch (object.eventExclusionDuration) { + default: + if (typeof object.eventExclusionDuration === "number") { + message.eventExclusionDuration = object.eventExclusionDuration; + break; + } + break; + case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.eventExclusionDuration = 0; + break; + case "EVENT_EXCLUSION_PERMANENT": + case 1: + message.eventExclusionDuration = 1; + break; + } + if (object.eventExclusionCriteria != null) { + if (typeof object.eventExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); + } + return message; + }; + + /** + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventSegmentExclusion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.eventExclusionCriteria = null; + } + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) + object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); + return object; + }; + + /** + * Converts this EventSegmentExclusion to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @instance + * @returns {Object.} JSON object + */ + EventSegmentExclusion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventSegmentExclusion + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; + }; + + return EventSegmentExclusion; + })(); + + /** + * EventExclusionDuration enum. + * @name google.analytics.data.v1alpha.EventExclusionDuration + * @enum {number} + * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value + */ + v1alpha.EventExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; + return values; + })(); + + v1alpha.Segment = (function() { + + /** + * Properties of a Segment. + * @memberof google.analytics.data.v1alpha + * @interface ISegment + * @property {string|null} [name] Segment name + * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment + * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment + * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment + */ + + /** + * Constructs a new Segment. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Segment. + * @implements ISegment + * @constructor + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + */ + function Segment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Segment name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.name = ""; + + /** + * Segment userSegment. + * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.userSegment = null; + + /** + * Segment sessionSegment. + * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.sessionSegment = null; + + /** + * Segment eventSegment. + * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.eventSegment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Segment oneSegmentScope. + * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "oneSegmentScope", { + get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Segment instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Segment} Segment instance + */ + Segment.create = function create(properties) { + return new Segment(properties); + }; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) + $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) + $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) + $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Segment message. + * @function verify + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Segment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.userSegment != null && message.hasOwnProperty("userSegment")) { + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); + if (error) + return "userSegment." + error; + } + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); + if (error) + return "sessionSegment." + error; + } + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); + if (error) + return "eventSegment." + error; + } + } + return null; + }; + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Segment} Segment + */ + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Segment) + return object; + var message = new $root.google.analytics.data.v1alpha.Segment(); + if (object.name != null) + message.name = String(object.name); + if (object.userSegment != null) { + if (typeof object.userSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); + } + if (object.sessionSegment != null) { + if (typeof object.sessionSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); + } + if (object.eventSegment != null) { + if (typeof object.eventSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); + } + return message; + }; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {google.analytics.data.v1alpha.Segment} message Segment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Segment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userSegment != null && message.hasOwnProperty("userSegment")) { + object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); + if (options.oneofs) + object.oneSegmentScope = "userSegment"; + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); + if (options.oneofs) + object.oneSegmentScope = "sessionSegment"; + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); + if (options.oneofs) + object.oneSegmentScope = "eventSegment"; + } + return object; + }; + + /** + * Converts this Segment to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Segment + * @instance + * @returns {Object.} JSON object + */ + Segment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Segment + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Segment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; + }; + + return Segment; + })(); + + v1alpha.SegmentFilterExpression = (function() { + + /** + * Properties of a SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter + * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter + */ + + /** + * Constructs a new SegmentFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpression. + * @implements ISegmentFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + */ + function SegmentFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.andGroup = null; + + /** + * SegmentFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.orGroup = null; + + /** + * SegmentFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.notExpression = null; + + /** + * SegmentFilterExpression segmentFilter. + * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentFilter = null; + + /** + * SegmentFilterExpression segmentEventFilter. + * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.segmentEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + Object.defineProperty(SegmentFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance + */ + SegmentFilterExpression.create = function create(properties) { + return new SegmentFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) + $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) + $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); + if (error) + return "segmentFilter." + error; + } + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); + if (error) + return "segmentEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + */ + SegmentFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); + } + if (object.segmentFilter != null) { + if (typeof object.segmentFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); + } + if (object.segmentEventFilter != null) { + if (typeof object.segmentEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); + if (options.oneofs) + object.expr = "segmentFilter"; + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); + if (options.oneofs) + object.expr = "segmentEventFilter"; + } + return object; + }; + + /** + * Converts this SegmentFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; + }; + + return SegmentFilterExpression; + })(); + + v1alpha.SegmentFilterExpressionList = (function() { + + /** + * Properties of a SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterExpressionList + * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterExpressionList. + * @implements ISegmentFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + */ + function SegmentFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + */ + SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance + */ + SegmentFilterExpressionList.create = function create(properties) { + return new SegmentFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + */ + SegmentFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; + }; + + return SegmentFilterExpressionList; + })(); + + v1alpha.SegmentFilter = (function() { + + /** + * Properties of a SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilter + * @property {string|null} [fieldName] SegmentFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping + */ + + /** + * Constructs a new SegmentFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilter. + * @implements ISegmentFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + */ + function SegmentFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.fieldName = ""; + + /** + * SegmentFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.stringFilter = null; + + /** + * SegmentFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.inListFilter = null; + + /** + * SegmentFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.numericFilter = null; + + /** + * SegmentFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.betweenFilter = null; + + /** + * SegmentFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + Object.defineProperty(SegmentFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance + */ + SegmentFilter.create = function create(properties) { + return new SegmentFilter(properties); + }; + + /** + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + */ + SegmentFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.filterScoping = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; + }; + + return SegmentFilter; + })(); + + v1alpha.SegmentFilterScoping = (function() { + + /** + * Properties of a SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentFilterScoping + * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime + */ + + /** + * Constructs a new SegmentFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentFilterScoping. + * @implements ISegmentFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + */ + function SegmentFilterScoping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilterScoping atAnyPointInTime. + * @member {boolean|null|undefined} atAnyPointInTime + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + */ + SegmentFilterScoping.prototype.atAnyPointInTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { + get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance + */ + SegmentFilterScoping.create = function create(properties) { + return new SegmentFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); + return writer; + }; + + /** + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.atAnyPointInTime = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + properties._atAnyPointInTime = 1; + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + } + return null; + }; + + /** + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + */ + SegmentFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + return message; + }; + + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + object.atAnyPointInTime = message.atAnyPointInTime; + if (options.oneofs) + object._atAnyPointInTime = "atAnyPointInTime"; + } + return object; + }; + + /** + * Converts this SegmentFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; + }; + + return SegmentFilterScoping; + })(); + + v1alpha.SegmentEventFilter = (function() { + + /** + * Properties of a SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentEventFilter + * @property {string|null} [eventName] SegmentEventFilter eventName + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression + */ + + /** + * Constructs a new SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentEventFilter. + * @implements ISegmentEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + */ + function SegmentEventFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.eventName = null; + + /** + * SegmentEventFilter segmentParameterFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + */ + SegmentEventFilter.prototype.segmentParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance + */ + SegmentEventFilter.create = function create(properties) { + return new SegmentEventFilter(properties); + }; + + /** + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + properties._segmentParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); + if (error) + return "segmentParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + */ + SegmentEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.segmentParameterFilterExpression != null) { + if (typeof object.segmentParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); + if (options.oneofs) + object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this SegmentEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; + }; + + return SegmentEventFilter; + })(); + + v1alpha.SegmentParameterFilterExpression = (function() { + + /** + * Properties of a SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter + */ + + /** + * Constructs a new SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpression. + * @implements ISegmentParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + */ + function SegmentParameterFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.andGroup = null; + + /** + * SegmentParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.orGroup = null; + + /** + * SegmentParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.notExpression = null; + + /** + * SegmentParameterFilterExpression segmentParameterFilter. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + */ + Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance + */ + SegmentParameterFilterExpression.create = function create(properties) { + return new SegmentParameterFilterExpression(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) + $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); + if (error) + return "segmentParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + */ + SegmentParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); + } + if (object.segmentParameterFilter != null) { + if (typeof object.segmentParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); + if (options.oneofs) + object.expr = "segmentParameterFilter"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; + }; + + return SegmentParameterFilterExpression; + })(); + + v1alpha.SegmentParameterFilterExpressionList = (function() { + + /** + * Properties of a SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpressionList + * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions + */ + + /** + * Constructs a new SegmentParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterExpressionList. + * @implements ISegmentParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + */ + function SegmentParameterFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + */ + SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance + */ + SegmentParameterFilterExpressionList.create = function create(properties) { + return new SegmentParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + */ + SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this SegmentParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; + }; + + return SegmentParameterFilterExpressionList; + })(); + + v1alpha.SegmentParameterFilter = (function() { + + /** + * Properties of a SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilter + * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName + * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping + */ + + /** + * Constructs a new SegmentParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilter. + * @implements ISegmentParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + */ + function SegmentParameterFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.eventParameterName = null; + + /** + * SegmentParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.itemParameterName = null; + + /** + * SegmentParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.stringFilter = null; + + /** + * SegmentParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.inListFilter = null; + + /** + * SegmentParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.numericFilter = null; + + /** + * SegmentParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.betweenFilter = null; + + /** + * SegmentParameterFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SegmentParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SegmentParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance + */ + SegmentParameterFilter.create = function create(properties) { + return new SegmentParameterFilter(properties); + }; + + /** + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); + if (error) + return "filterScoping." + error; + } + return null; + }; + + /** + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + */ + SegmentParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); + } + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filterScoping = null; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); + return object; + }; + + /** + * Converts this SegmentParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; + }; + + return SegmentParameterFilter; + })(); + + v1alpha.SegmentParameterFilterScoping = (function() { + + /** + * Properties of a SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterScoping + * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod + */ + + /** + * Constructs a new SegmentParameterFilterScoping. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentParameterFilterScoping. + * @implements ISegmentParameterFilterScoping + * @constructor + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + */ + function SegmentParameterFilterScoping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentParameterFilterScoping inAnyNDayPeriod. + * @member {number|Long|null|undefined} inAnyNDayPeriod + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + */ + SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { + get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance + */ + SegmentParameterFilterScoping.create = function create(properties) { + return new SegmentParameterFilterScoping(properties); + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); + return writer; + }; + + /** + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inAnyNDayPeriod = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentParameterFilterScoping message. + * @function verify + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentParameterFilterScoping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + properties._inAnyNDayPeriod = 1; + if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) + return "inAnyNDayPeriod: integer|Long expected"; + } + return null; + }; + + /** + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + */ + SegmentParameterFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) + return object; + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + if (object.inAnyNDayPeriod != null) + if ($util.Long) + (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; + else if (typeof object.inAnyNDayPeriod === "string") + message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); + else if (typeof object.inAnyNDayPeriod === "number") + message.inAnyNDayPeriod = object.inAnyNDayPeriod; + else if (typeof object.inAnyNDayPeriod === "object") + message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentParameterFilterScoping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + if (typeof message.inAnyNDayPeriod === "number") + object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; + else + object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; + if (options.oneofs) + object._inAnyNDayPeriod = "inAnyNDayPeriod"; + } + return object; + }; + + /** + * Converts this SegmentParameterFilterScoping to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @instance + * @returns {Object.} JSON object + */ + SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SegmentParameterFilterScoping + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; + }; + + return SegmentParameterFilterScoping; + })(); + + v1alpha.FunnelFilterExpression = (function() { + + /** + * Properties of a FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter + * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter + */ + + /** + * Constructs a new FunnelFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpression. + * @implements IFunnelFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + */ + function FunnelFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.andGroup = null; + + /** + * FunnelFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.orGroup = null; + + /** + * FunnelFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.notExpression = null; + + /** + * FunnelFilterExpression funnelFieldFilter. + * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelFieldFilter = null; + + /** + * FunnelFilterExpression funnelEventFilter. + * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + Object.defineProperty(FunnelFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance + */ + FunnelFilterExpression.create = function create(properties) { + return new FunnelFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) + $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) + $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); + if (error) + return "funnelFieldFilter." + error; + } + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); + if (error) + return "funnelEventFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + */ + FunnelFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); + } + if (object.funnelFieldFilter != null) { + if (typeof object.funnelFieldFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); + } + if (object.funnelEventFilter != null) { + if (typeof object.funnelEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); + if (options.oneofs) + object.expr = "funnelFieldFilter"; + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); + if (options.oneofs) + object.expr = "funnelEventFilter"; + } + return object; + }; + + /** + * Converts this FunnelFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; + }; + + return FunnelFilterExpression; + })(); + + v1alpha.FunnelFilterExpressionList = (function() { + + /** + * Properties of a FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFilterExpressionList + * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFilterExpressionList. + * @implements IFunnelFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + */ + function FunnelFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + */ + FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance + */ + FunnelFilterExpressionList.create = function create(properties) { + return new FunnelFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + */ + FunnelFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; + }; + + return FunnelFilterExpressionList; + })(); + + v1alpha.FunnelFieldFilter = (function() { + + /** + * Properties of a FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelFieldFilter + * @property {string|null} [fieldName] FunnelFieldFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter + */ + + /** + * Constructs a new FunnelFieldFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelFieldFilter. + * @implements IFunnelFieldFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + */ + function FunnelFieldFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelFieldFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.fieldName = ""; + + /** + * FunnelFieldFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.stringFilter = null; + + /** + * FunnelFieldFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.inListFilter = null; + + /** + * FunnelFieldFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.numericFilter = null; + + /** + * FunnelFieldFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFieldFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance + */ + FunnelFieldFilter.create = function create(properties) { + return new FunnelFieldFilter(properties); + }; + + /** + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFieldFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFieldFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + */ + FunnelFieldFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelFieldFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelFieldFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelFieldFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelFieldFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; + }; + + return FunnelFieldFilter; + })(); + + v1alpha.FunnelEventFilter = (function() { + + /** + * Properties of a FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelEventFilter + * @property {string|null} [eventName] FunnelEventFilter eventName + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression + */ + + /** + * Constructs a new FunnelEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelEventFilter. + * @implements IFunnelEventFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + */ + function FunnelEventFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.eventName = null; + + /** + * FunnelEventFilter funnelParameterFilterExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + */ + FunnelEventFilter.prototype.funnelParameterFilterExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance + */ + FunnelEventFilter.create = function create(properties) { + return new FunnelEventFilter(properties); + }; + + /** + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelEventFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + properties._funnelParameterFilterExpression = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); + if (error) + return "funnelParameterFilterExpression." + error; + } + } + return null; + }; + + /** + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + */ + FunnelEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.funnelParameterFilterExpression != null) { + if (typeof object.funnelParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); + if (options.oneofs) + object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; + } + return object; + }; + + /** + * Converts this FunnelEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelEventFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; + }; + + return FunnelEventFilter; + })(); + + v1alpha.FunnelParameterFilterExpression = (function() { + + /** + * Properties of a FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter + */ + + /** + * Constructs a new FunnelParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpression. + * @implements IFunnelParameterFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + */ + function FunnelParameterFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.andGroup = null; + + /** + * FunnelParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.orGroup = null; + + /** + * FunnelParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.notExpression = null; + + /** + * FunnelParameterFilterExpression funnelParameterFilter. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance + */ + FunnelParameterFilterExpression.create = function create(properties) { + return new FunnelParameterFilterExpression(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) + $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); + if (error) + return "funnelParameterFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + */ + FunnelParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); + } + if (object.funnelParameterFilter != null) { + if (typeof object.funnelParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); + if (options.oneofs) + object.expr = "funnelParameterFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; + }; + + return FunnelParameterFilterExpression; + })(); + + v1alpha.FunnelParameterFilterExpressionList = (function() { + + /** + * Properties of a FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilterExpressionList + * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions + */ + + /** + * Constructs a new FunnelParameterFilterExpressionList. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilterExpressionList. + * @implements IFunnelParameterFilterExpressionList + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + */ + function FunnelParameterFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + */ + FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance + */ + FunnelParameterFilterExpressionList.create = function create(properties) { + return new FunnelParameterFilterExpressionList(properties); + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + */ + FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FunnelParameterFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; + }; + + return FunnelParameterFilterExpressionList; + })(); + + v1alpha.FunnelParameterFilter = (function() { + + /** + * Properties of a FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelParameterFilter + * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName + * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter + */ + + /** + * Constructs a new FunnelParameterFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelParameterFilter. + * @implements IFunnelParameterFilter + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + */ + function FunnelParameterFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.eventParameterName = null; + + /** + * FunnelParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.itemParameterName = null; + + /** + * FunnelParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.stringFilter = null; + + /** + * FunnelParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.inListFilter = null; + + /** + * FunnelParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.numericFilter = null; + + /** + * FunnelParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FunnelParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance + */ + FunnelParameterFilter.create = function create(properties) { + return new FunnelParameterFilter(properties); + }; + + /** + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelParameterFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelParameterFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + return null; + }; + + /** + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + */ + FunnelParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + return message; + }; + + /** + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelParameterFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this FunnelParameterFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + * @returns {Object.} JSON object + */ + FunnelParameterFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelParameterFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; + }; + + return FunnelParameterFilter; + })(); + + v1alpha.FunnelResponseMetadata = (function() { + + /** + * Properties of a FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelResponseMetadata + * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas + */ + + /** + * Constructs a new FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelResponseMetadata. + * @implements IFunnelResponseMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + */ + function FunnelResponseMetadata(properties) { + this.samplingMetadatas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FunnelResponseMetadata samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + */ + FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; + + /** + * Creates a new FunnelResponseMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance + */ + FunnelResponseMetadata.create = function create(properties) { + return new FunnelResponseMetadata(properties); + }; + + /** + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelResponseMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelResponseMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + */ + FunnelResponseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunnelResponseMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this FunnelResponseMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @instance + * @returns {Object.} JSON object + */ + FunnelResponseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunnelResponseMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; + }; + + return FunnelResponseMetadata; + })(); + + v1alpha.SamplingMetadata = (function() { + + /** + * Properties of a SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + */ + + /** + * Constructs a new SamplingMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata + * @constructor + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + */ + function SamplingMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance + */ + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); + }; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + return writer; + }; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.samplesReadCount = reader.int64(); + break; + } + case 2: { + message.samplingSpaceSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SamplingMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SamplingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; + return null; + }; + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + */ + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SamplingMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; + } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + return object; + }; + + /** + * Converts this SamplingMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @instance + * @returns {Object.} JSON object + */ + SamplingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1alpha.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1alpha.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1alpha.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1alpha.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1alpha.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1alpha.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + /** + * SamplingLevel enum. + * @name google.analytics.data.v1alpha.SamplingLevel + * @enum {number} + * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} UNSAMPLED=3 UNSAMPLED value + */ + v1alpha.SamplingLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "UNSAMPLED"] = 3; + return values; + })(); + + v1alpha.ConversionSpec = (function() { + + /** + * Properties of a ConversionSpec. + * @memberof google.analytics.data.v1alpha + * @interface IConversionSpec + * @property {Array.|null} [conversionActions] ConversionSpec conversionActions + * @property {google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null} [attributionModel] ConversionSpec attributionModel + */ + + /** + * Constructs a new ConversionSpec. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ConversionSpec. + * @implements IConversionSpec + * @constructor + * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set + */ + function ConversionSpec(properties) { + this.conversionActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversionSpec conversionActions. + * @member {Array.} conversionActions + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @instance + */ + ConversionSpec.prototype.conversionActions = $util.emptyArray; + + /** + * ConversionSpec attributionModel. + * @member {google.analytics.data.v1alpha.ConversionSpec.AttributionModel} attributionModel + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @instance + */ + ConversionSpec.prototype.attributionModel = 0; + + /** + * Creates a new ConversionSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec instance + */ + ConversionSpec.create = function create(properties) { + return new ConversionSpec(properties); + }; + + /** + * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionActions != null && message.conversionActions.length) + for (var i = 0; i < message.conversionActions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionActions[i]); + if (message.attributionModel != null && Object.hasOwnProperty.call(message, "attributionModel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attributionModel); + return writer; + }; + + /** + * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.conversionActions && message.conversionActions.length)) + message.conversionActions = []; + message.conversionActions.push(reader.string()); + break; + } + case 2: { + message.attributionModel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionSpec message. + * @function verify + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionActions != null && message.hasOwnProperty("conversionActions")) { + if (!Array.isArray(message.conversionActions)) + return "conversionActions: array expected"; + for (var i = 0; i < message.conversionActions.length; ++i) + if (!$util.isString(message.conversionActions[i])) + return "conversionActions: string[] expected"; + } + if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) + switch (message.attributionModel) { + default: + return "attributionModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec + */ + ConversionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ConversionSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.ConversionSpec(); + if (object.conversionActions) { + if (!Array.isArray(object.conversionActions)) + throw TypeError(".google.analytics.data.v1alpha.ConversionSpec.conversionActions: array expected"); + message.conversionActions = []; + for (var i = 0; i < object.conversionActions.length; ++i) + message.conversionActions[i] = String(object.conversionActions[i]); + } + switch (object.attributionModel) { + default: + if (typeof object.attributionModel === "number") { + message.attributionModel = object.attributionModel; + break; + } + break; + case "ATTRIBUTION_MODEL_UNSPECIFIED": + case 0: + message.attributionModel = 0; + break; + case "DATA_DRIVEN": + case 1: + message.attributionModel = 1; + break; + case "LAST_CLICK": + case 2: + message.attributionModel = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {google.analytics.data.v1alpha.ConversionSpec} message ConversionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversionActions = []; + if (options.defaults) + object.attributionModel = options.enums === String ? "ATTRIBUTION_MODEL_UNSPECIFIED" : 0; + if (message.conversionActions && message.conversionActions.length) { + object.conversionActions = []; + for (var j = 0; j < message.conversionActions.length; ++j) + object.conversionActions[j] = message.conversionActions[j]; + } + if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) + object.attributionModel = options.enums === String ? $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] === undefined ? message.attributionModel : $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] : message.attributionModel; + return object; + }; + + /** + * Converts this ConversionSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @instance + * @returns {Object.} JSON object + */ + ConversionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionSpec"; + }; + + /** + * AttributionModel enum. + * @name google.analytics.data.v1alpha.ConversionSpec.AttributionModel + * @enum {number} + * @property {number} ATTRIBUTION_MODEL_UNSPECIFIED=0 ATTRIBUTION_MODEL_UNSPECIFIED value + * @property {number} DATA_DRIVEN=1 DATA_DRIVEN value + * @property {number} LAST_CLICK=2 LAST_CLICK value + */ + ConversionSpec.AttributionModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_DRIVEN"] = 1; + values[valuesById[2] = "LAST_CLICK"] = 2; + return values; + })(); + + return ConversionSpec; + })(); + + v1alpha.DimensionMetadata = (function() { + + /** + * Properties of a DimensionMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionMetadata + * @property {string|null} [apiName] DimensionMetadata apiName + * @property {string|null} [uiName] DimensionMetadata uiName + * @property {string|null} [description] DimensionMetadata description + * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames + * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition + * @property {string|null} [category] DimensionMetadata category + * @property {Array.|null} [sections] DimensionMetadata sections + */ + + /** + * Constructs a new DimensionMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionMetadata. + * @implements IDimensionMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set + */ + function DimensionMetadata(properties) { + this.deprecatedApiNames = []; + this.sections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.apiName = ""; + + /** + * DimensionMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.uiName = ""; + + /** + * DimensionMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.description = ""; + + /** + * DimensionMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * DimensionMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.customDefinition = false; + + /** + * DimensionMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.category = ""; + + /** + * DimensionMetadata sections. + * @member {Array.} sections + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.sections = $util.emptyArray; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata instance + */ + DimensionMetadata.create = function create(properties) { + return new DimensionMetadata(properties); + }; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.category); + if (message.sections != null && message.sections.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.sections.length; ++i) + writer.int32(message.sections[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.customDefinition = reader.bool(); + break; + } + case 6: { + message.category = reader.string(); + break; + } + case 7: { + if (!(message.sections && message.sections.length)) + message.sections = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sections.push(reader.int32()); + } else + message.sections.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.sections != null && message.hasOwnProperty("sections")) { + if (!Array.isArray(message.sections)) + return "sections: array expected"; + for (var i = 0; i < message.sections.length; ++i) + switch (message.sections[i]) { + default: + return "sections: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata + */ + DimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.category != null) + message.category = String(object.category); + if (object.sections) { + if (!Array.isArray(object.sections)) + throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.sections: array expected"); + message.sections = []; + for (var i = 0; i < object.sections.length; ++i) + switch (object.sections[i]) { + default: + if (typeof object.sections[i] === "number") { + message.sections[i] = object.sections[i]; + break; + } + case "SECTION_UNSPECIFIED": + case 0: + message.sections[i] = 0; + break; + case "SECTION_REPORT": + case 1: + message.sections[i] = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.sections[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {google.analytics.data.v1alpha.DimensionMetadata} message DimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.sections = []; + } + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.sections && message.sections.length) { + object.sections = []; + for (var j = 0; j < message.sections.length; ++j) + object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; + } + return object; + }; + + /** + * Converts this DimensionMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + DimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionMetadata"; + }; + + return DimensionMetadata; + })(); + + v1alpha.MetricMetadata = (function() { + + /** + * Properties of a MetricMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IMetricMetadata + * @property {string|null} [apiName] MetricMetadata apiName + * @property {string|null} [uiName] MetricMetadata uiName + * @property {string|null} [description] MetricMetadata description + * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricMetadata type + * @property {string|null} [expression] MetricMetadata expression + * @property {boolean|null} [customDefinition] MetricMetadata customDefinition + * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons + * @property {string|null} [category] MetricMetadata category + * @property {Array.|null} [sections] MetricMetadata sections + */ + + /** + * Constructs a new MetricMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricMetadata. + * @implements IMetricMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set + */ + function MetricMetadata(properties) { + this.deprecatedApiNames = []; + this.blockedReasons = []; + this.sections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.apiName = ""; + + /** + * MetricMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.uiName = ""; + + /** + * MetricMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.description = ""; + + /** + * MetricMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * MetricMetadata type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.type = 0; + + /** + * MetricMetadata expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.expression = ""; + + /** + * MetricMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.customDefinition = false; + + /** + * MetricMetadata blockedReasons. + * @member {Array.} blockedReasons + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.blockedReasons = $util.emptyArray; + + /** + * MetricMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.category = ""; + + /** + * MetricMetadata sections. + * @member {Array.} sections + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.sections = $util.emptyArray; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata instance + */ + MetricMetadata.create = function create(properties) { + return new MetricMetadata(properties); + }; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); + if (message.blockedReasons != null && message.blockedReasons.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockedReasons.length; ++i) + writer.int32(message.blockedReasons[i]); + writer.ldelim(); + } + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.category); + if (message.sections != null && message.sections.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.sections.length; ++i) + writer.int32(message.sections[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.expression = reader.string(); + break; + } + case 7: { + message.customDefinition = reader.bool(); + break; + } + case 8: { + if (!(message.blockedReasons && message.blockedReasons.length)) + message.blockedReasons = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockedReasons.push(reader.int32()); + } else + message.blockedReasons.push(reader.int32()); + break; + } + case 9: { + message.category = reader.string(); + break; + } + case 10: { + if (!(message.sections && message.sections.length)) + message.sections = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sections.push(reader.int32()); + } else + message.sections.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { + if (!Array.isArray(message.blockedReasons)) + return "blockedReasons: array expected"; + for (var i = 0; i < message.blockedReasons.length; ++i) + switch (message.blockedReasons[i]) { + default: + return "blockedReasons: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.sections != null && message.hasOwnProperty("sections")) { + if (!Array.isArray(message.sections)) + return "sections: array expected"; + for (var i = 0; i < message.sections.length; ++i) + switch (message.sections[i]) { + default: + return "sections: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata + */ + MetricMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + if (object.expression != null) + message.expression = String(object.expression); + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.blockedReasons) { + if (!Array.isArray(object.blockedReasons)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.blockedReasons: array expected"); + message.blockedReasons = []; + for (var i = 0; i < object.blockedReasons.length; ++i) + switch (object.blockedReasons[i]) { + default: + if (typeof object.blockedReasons[i] === "number") { + message.blockedReasons[i] = object.blockedReasons[i]; + break; + } + case "BLOCKED_REASON_UNSPECIFIED": + case 0: + message.blockedReasons[i] = 0; + break; + case "NO_REVENUE_METRICS": + case 1: + message.blockedReasons[i] = 1; + break; + case "NO_COST_METRICS": + case 2: + message.blockedReasons[i] = 2; + break; + } + } + if (object.category != null) + message.category = String(object.category); + if (object.sections) { + if (!Array.isArray(object.sections)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.sections: array expected"); + message.sections = []; + for (var i = 0; i < object.sections.length; ++i) + switch (object.sections[i]) { + default: + if (typeof object.sections[i] === "number") { + message.sections[i] = object.sections[i]; + break; + } + case "SECTION_UNSPECIFIED": + case 0: + message.sections[i] = 0; + break; + case "SECTION_REPORT": + case 1: + message.sections[i] = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.sections[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {google.analytics.data.v1alpha.MetricMetadata} message MetricMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.blockedReasons = []; + object.sections = []; + } + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + object.expression = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.blockedReasons && message.blockedReasons.length) { + object.blockedReasons = []; + for (var j = 0; j < message.blockedReasons.length; ++j) + object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.sections && message.sections.length) { + object.sections = []; + for (var j = 0; j < message.sections.length; ++j) + object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; + } + return object; + }; + + /** + * Converts this MetricMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricMetadata"; + }; + + /** + * BlockedReason enum. + * @name google.analytics.data.v1alpha.MetricMetadata.BlockedReason + * @enum {number} + * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value + * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value + * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value + */ + MetricMetadata.BlockedReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; + values[valuesById[2] = "NO_COST_METRICS"] = 2; + return values; + })(); + + return MetricMetadata; + })(); + + v1alpha.ComparisonMetadata = (function() { + + /** + * Properties of a ComparisonMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IComparisonMetadata + * @property {string|null} [apiName] ComparisonMetadata apiName + * @property {string|null} [uiName] ComparisonMetadata uiName + * @property {string|null} [description] ComparisonMetadata description + */ + + /** + * Constructs a new ComparisonMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ComparisonMetadata. + * @implements IComparisonMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set + */ + function ComparisonMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComparisonMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.apiName = ""; + + /** + * ComparisonMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.uiName = ""; + + /** + * ComparisonMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.description = ""; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata instance + */ + ComparisonMetadata.create = function create(properties) { + return new ComparisonMetadata(properties); + }; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComparisonMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComparisonMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata + */ + ComparisonMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ComparisonMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {google.analytics.data.v1alpha.ComparisonMetadata} message ComparisonMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComparisonMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ComparisonMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + * @returns {Object.} JSON object + */ + ComparisonMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComparisonMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ComparisonMetadata"; + }; + + return ComparisonMetadata; + })(); + + v1alpha.ConversionMetadata = (function() { + + /** + * Properties of a ConversionMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IConversionMetadata + * @property {string|null} [conversionAction] ConversionMetadata conversionAction + * @property {string|null} [displayName] ConversionMetadata displayName + */ + + /** + * Constructs a new ConversionMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ConversionMetadata. + * @implements IConversionMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set + */ + function ConversionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversionMetadata conversionAction. + * @member {string} conversionAction + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @instance + */ + ConversionMetadata.prototype.conversionAction = ""; + + /** + * ConversionMetadata displayName. + * @member {string} displayName + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @instance + */ + ConversionMetadata.prototype.displayName = ""; + + /** + * Creates a new ConversionMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata instance + */ + ConversionMetadata.create = function create(properties) { + return new ConversionMetadata(properties); + }; + + /** + * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionAction != null && Object.hasOwnProperty.call(message, "conversionAction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionAction); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conversionAction = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionMetadata message. + * @function verify + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) + if (!$util.isString(message.conversionAction)) + return "conversionAction: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata + */ + ConversionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ConversionMetadata) + return object; + var message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); + if (object.conversionAction != null) + message.conversionAction = String(object.conversionAction); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {google.analytics.data.v1alpha.ConversionMetadata} message ConversionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionAction = ""; + object.displayName = ""; + } + if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) + object.conversionAction = message.conversionAction; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ConversionMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @instance + * @returns {Object.} JSON object + */ + ConversionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ConversionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionMetadata"; + }; + + return ConversionMetadata; + })(); + + return v1alpha; + })(); + + data.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.analytics.data + * @namespace + */ + var v1beta = {}; + + v1beta.BetaAnalyticsData = (function() { + + /** + * Constructs a new BetaAnalyticsData service. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BetaAnalyticsData + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function BetaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BetaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BetaAnalyticsData; + + /** + * Creates new BetaAnalyticsData service using the specified rpc implementation. + * @function create + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {BetaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. + */ + BetaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunReportResponse} [response] RunReportResponse + */ + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runReport = function runReport(request, callback) { + return this.rpcCall(runReport, $root.google.analytics.data.v1beta.RunReportRequest, $root.google.analytics.data.v1beta.RunReportResponse, request, callback); + }, "name", { value: "RunReport" }); + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunPivotReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunPivotReportResponse} [response] RunPivotReportResponse + */ + + /** + * Calls RunPivotReport. + * @function runPivotReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback} callback Node-style callback called with the error, if any, and RunPivotReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runPivotReport = function runPivotReport(request, callback) { + return this.rpcCall(runPivotReport, $root.google.analytics.data.v1beta.RunPivotReportRequest, $root.google.analytics.data.v1beta.RunPivotReportResponse, request, callback); + }, "name", { value: "RunPivotReport" }); + + /** + * Calls RunPivotReport. + * @function runPivotReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef BatchRunReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.BatchRunReportsResponse} [response] BatchRunReportsResponse + */ + + /** + * Calls BatchRunReports. + * @function batchRunReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback} callback Node-style callback called with the error, if any, and BatchRunReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.batchRunReports = function batchRunReports(request, callback) { + return this.rpcCall(batchRunReports, $root.google.analytics.data.v1beta.BatchRunReportsRequest, $root.google.analytics.data.v1beta.BatchRunReportsResponse, request, callback); + }, "name", { value: "BatchRunReports" }); + + /** + * Calls BatchRunReports. + * @function batchRunReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef BatchRunPivotReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} [response] BatchRunPivotReportsResponse + */ + + /** + * Calls BatchRunPivotReports. + * @function batchRunPivotReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback} callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.batchRunPivotReports = function batchRunPivotReports(request, callback) { + return this.rpcCall(batchRunPivotReports, $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest, $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse, request, callback); + }, "name", { value: "BatchRunPivotReports" }); + + /** + * Calls BatchRunPivotReports. + * @function batchRunPivotReports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef GetMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.Metadata} [response] Metadata + */ + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { + return this.rpcCall(getMetadata, $root.google.analytics.data.v1beta.GetMetadataRequest, $root.google.analytics.data.v1beta.Metadata, request, callback); + }, "name", { value: "GetMetadata" }); + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef RunRealtimeReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} [response] RunRealtimeReportResponse + */ + + /** + * Calls RunRealtimeReport. + * @function runRealtimeReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback} callback Node-style callback called with the error, if any, and RunRealtimeReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.runRealtimeReport = function runRealtimeReport(request, callback) { + return this.rpcCall(runRealtimeReport, $root.google.analytics.data.v1beta.RunRealtimeReportRequest, $root.google.analytics.data.v1beta.RunRealtimeReportResponse, request, callback); + }, "name", { value: "RunRealtimeReport" }); + + /** + * Calls RunRealtimeReport. + * @function runRealtimeReport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef CheckCompatibilityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} [response] CheckCompatibilityResponse + */ + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.checkCompatibility = function checkCompatibility(request, callback) { + return this.rpcCall(checkCompatibility, $root.google.analytics.data.v1beta.CheckCompatibilityRequest, $root.google.analytics.data.v1beta.CheckCompatibilityResponse, request, callback); + }, "name", { value: "CheckCompatibility" }); + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef CreateAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAudienceExport. + * @function createAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.createAudienceExport = function createAudienceExport(request, callback) { + return this.rpcCall(createAudienceExport, $root.google.analytics.data.v1beta.CreateAudienceExportRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAudienceExport" }); + + /** + * Calls CreateAudienceExport. + * @function createAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef QueryAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} [response] QueryAudienceExportResponse + */ + + /** + * Calls QueryAudienceExport. + * @function queryAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback} callback Node-style callback called with the error, if any, and QueryAudienceExportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.queryAudienceExport = function queryAudienceExport(request, callback) { + return this.rpcCall(queryAudienceExport, $root.google.analytics.data.v1beta.QueryAudienceExportRequest, $root.google.analytics.data.v1beta.QueryAudienceExportResponse, request, callback); + }, "name", { value: "QueryAudienceExport" }); + + /** + * Calls QueryAudienceExport. + * @function queryAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef GetAudienceExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.AudienceExport} [response] AudienceExport + */ + + /** + * Calls GetAudienceExport. + * @function getAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback} callback Node-style callback called with the error, if any, and AudienceExport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.getAudienceExport = function getAudienceExport(request, callback) { + return this.rpcCall(getAudienceExport, $root.google.analytics.data.v1beta.GetAudienceExportRequest, $root.google.analytics.data.v1beta.AudienceExport, request, callback); + }, "name", { value: "GetAudienceExport" }); + + /** + * Calls GetAudienceExport. + * @function getAudienceExport + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @typedef ListAudienceExportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} [response] ListAudienceExportsResponse + */ + + /** + * Calls ListAudienceExports. + * @function listAudienceExports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object + * @param {google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback} callback Node-style callback called with the error, if any, and ListAudienceExportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BetaAnalyticsData.prototype.listAudienceExports = function listAudienceExports(request, callback) { + return this.rpcCall(listAudienceExports, $root.google.analytics.data.v1beta.ListAudienceExportsRequest, $root.google.analytics.data.v1beta.ListAudienceExportsResponse, request, callback); + }, "name", { value: "ListAudienceExports" }); + + /** + * Calls ListAudienceExports. + * @function listAudienceExports + * @memberof google.analytics.data.v1beta.BetaAnalyticsData + * @instance + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BetaAnalyticsData; + })(); + + v1beta.CheckCompatibilityRequest = (function() { + + /** + * Properties of a CheckCompatibilityRequest. + * @memberof google.analytics.data.v1beta + * @interface ICheckCompatibilityRequest + * @property {string|null} [property] CheckCompatibilityRequest property + * @property {Array.|null} [dimensions] CheckCompatibilityRequest dimensions + * @property {Array.|null} [metrics] CheckCompatibilityRequest metrics + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] CheckCompatibilityRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] CheckCompatibilityRequest metricFilter + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibilityFilter] CheckCompatibilityRequest compatibilityFilter + */ + + /** + * Constructs a new CheckCompatibilityRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CheckCompatibilityRequest. + * @implements ICheckCompatibilityRequest + * @constructor + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set + */ + function CheckCompatibilityRequest(properties) { + this.dimensions = []; + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckCompatibilityRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.property = ""; + + /** + * CheckCompatibilityRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.dimensions = $util.emptyArray; + + /** + * CheckCompatibilityRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.metrics = $util.emptyArray; + + /** + * CheckCompatibilityRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.dimensionFilter = null; + + /** + * CheckCompatibilityRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.metricFilter = null; + + /** + * CheckCompatibilityRequest compatibilityFilter. + * @member {google.analytics.data.v1beta.Compatibility} compatibilityFilter + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.compatibilityFilter = 0; + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest instance + */ + CheckCompatibilityRequest.create = function create(properties) { + return new CheckCompatibilityRequest(properties); + }; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.compatibilityFilter != null && Object.hasOwnProperty.call(message, "compatibilityFilter")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.compatibilityFilter); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.compatibilityFilter = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) + switch (message.compatibilityFilter) { + default: + return "compatibilityFilter: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest + */ + CheckCompatibilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityRequest) + return object; + var message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + switch (object.compatibilityFilter) { + default: + if (typeof object.compatibilityFilter === "number") { + message.compatibilityFilter = object.compatibilityFilter; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibilityFilter = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibilityFilter = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibilityFilter = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {google.analytics.data.v1beta.CheckCompatibilityRequest} message CheckCompatibilityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + object.compatibilityFilter = options.enums === String ? "COMPATIBILITY_UNSPECIFIED" : 0; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) + object.compatibilityFilter = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] === undefined ? message.compatibilityFilter : $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] : message.compatibilityFilter; + return object; + }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityRequest"; + }; + + return CheckCompatibilityRequest; + })(); + + v1beta.CheckCompatibilityResponse = (function() { + + /** + * Properties of a CheckCompatibilityResponse. + * @memberof google.analytics.data.v1beta + * @interface ICheckCompatibilityResponse + * @property {Array.|null} [dimensionCompatibilities] CheckCompatibilityResponse dimensionCompatibilities + * @property {Array.|null} [metricCompatibilities] CheckCompatibilityResponse metricCompatibilities + */ + + /** + * Constructs a new CheckCompatibilityResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CheckCompatibilityResponse. + * @implements ICheckCompatibilityResponse + * @constructor + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set + */ + function CheckCompatibilityResponse(properties) { + this.dimensionCompatibilities = []; + this.metricCompatibilities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckCompatibilityResponse dimensionCompatibilities. + * @member {Array.} dimensionCompatibilities + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.dimensionCompatibilities = $util.emptyArray; + + /** + * CheckCompatibilityResponse metricCompatibilities. + * @member {Array.} metricCompatibilities + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.metricCompatibilities = $util.emptyArray; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse instance + */ + CheckCompatibilityResponse.create = function create(properties) { + return new CheckCompatibilityResponse(properties); + }; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionCompatibilities != null && message.dimensionCompatibilities.length) + for (var i = 0; i < message.dimensionCompatibilities.length; ++i) + $root.google.analytics.data.v1beta.DimensionCompatibility.encode(message.dimensionCompatibilities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricCompatibilities != null && message.metricCompatibilities.length) + for (var i = 0; i < message.metricCompatibilities.length; ++i) + $root.google.analytics.data.v1beta.MetricCompatibility.encode(message.metricCompatibilities[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionCompatibilities && message.dimensionCompatibilities.length)) + message.dimensionCompatibilities = []; + message.dimensionCompatibilities.push($root.google.analytics.data.v1beta.DimensionCompatibility.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricCompatibilities && message.metricCompatibilities.length)) + message.metricCompatibilities = []; + message.metricCompatibilities.push($root.google.analytics.data.v1beta.MetricCompatibility.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionCompatibilities != null && message.hasOwnProperty("dimensionCompatibilities")) { + if (!Array.isArray(message.dimensionCompatibilities)) + return "dimensionCompatibilities: array expected"; + for (var i = 0; i < message.dimensionCompatibilities.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionCompatibility.verify(message.dimensionCompatibilities[i]); + if (error) + return "dimensionCompatibilities." + error; + } + } + if (message.metricCompatibilities != null && message.hasOwnProperty("metricCompatibilities")) { + if (!Array.isArray(message.metricCompatibilities)) + return "metricCompatibilities: array expected"; + for (var i = 0; i < message.metricCompatibilities.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricCompatibility.verify(message.metricCompatibilities[i]); + if (error) + return "metricCompatibilities." + error; + } + } + return null; + }; + + /** + * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse + */ + CheckCompatibilityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityResponse) + return object; + var message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); + if (object.dimensionCompatibilities) { + if (!Array.isArray(object.dimensionCompatibilities)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: array expected"); + message.dimensionCompatibilities = []; + for (var i = 0; i < object.dimensionCompatibilities.length; ++i) { + if (typeof object.dimensionCompatibilities[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: object expected"); + message.dimensionCompatibilities[i] = $root.google.analytics.data.v1beta.DimensionCompatibility.fromObject(object.dimensionCompatibilities[i]); + } + } + if (object.metricCompatibilities) { + if (!Array.isArray(object.metricCompatibilities)) + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: array expected"); + message.metricCompatibilities = []; + for (var i = 0; i < object.metricCompatibilities.length; ++i) { + if (typeof object.metricCompatibilities[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: object expected"); + message.metricCompatibilities[i] = $root.google.analytics.data.v1beta.MetricCompatibility.fromObject(object.metricCompatibilities[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} message CheckCompatibilityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionCompatibilities = []; + object.metricCompatibilities = []; + } + if (message.dimensionCompatibilities && message.dimensionCompatibilities.length) { + object.dimensionCompatibilities = []; + for (var j = 0; j < message.dimensionCompatibilities.length; ++j) + object.dimensionCompatibilities[j] = $root.google.analytics.data.v1beta.DimensionCompatibility.toObject(message.dimensionCompatibilities[j], options); + } + if (message.metricCompatibilities && message.metricCompatibilities.length) { + object.metricCompatibilities = []; + for (var j = 0; j < message.metricCompatibilities.length; ++j) + object.metricCompatibilities[j] = $root.google.analytics.data.v1beta.MetricCompatibility.toObject(message.metricCompatibilities[j], options); + } + return object; + }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityResponse"; + }; + + return CheckCompatibilityResponse; + })(); + + v1beta.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.analytics.data.v1beta + * @interface IMetadata + * @property {string|null} [name] Metadata name + * @property {Array.|null} [dimensions] Metadata dimensions + * @property {Array.|null} [metrics] Metadata metrics + * @property {Array.|null} [comparisons] Metadata comparisons + */ + + /** + * Constructs a new Metadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.dimensions = []; + this.metrics = []; + this.comparisons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.name = ""; + + /** + * Metadata dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.dimensions = $util.emptyArray; + + /** + * Metadata metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.metrics = $util.emptyArray; + + /** + * Metadata comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.Metadata + * @instance + */ + Metadata.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.name = reader.string(); + break; + } + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.ComparisonMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.ComparisonMetadata.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Metadata) + return object; + var message = new $root.google.analytics.data.v1beta.Metadata(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metrics[i]); + } + } + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.ComparisonMetadata.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {google.analytics.data.v1beta.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.comparisons = []; + } + if (options.defaults) + object.name = ""; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metrics[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.ComparisonMetadata.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Metadata"; + }; + + return Metadata; + })(); + + v1beta.RunReportRequest = (function() { + + /** + * Properties of a RunReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunReportRequest + * @property {string|null} [property] RunReportRequest property + * @property {Array.|null} [dimensions] RunReportRequest dimensions + * @property {Array.|null} [metrics] RunReportRequest metrics + * @property {Array.|null} [dateRanges] RunReportRequest dateRanges + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter + * @property {number|Long|null} [offset] RunReportRequest offset + * @property {number|Long|null} [limit] RunReportRequest limit + * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunReportRequest orderBys + * @property {string|null} [currencyCode] RunReportRequest currencyCode + * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunReportRequest comparisons + */ + + /** + * Constructs a new RunReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunReportRequest. + * @implements IRunReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set + */ + function RunReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + this.comparisons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.property = ""; + + /** + * RunReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.dimensionFilter = null; + + /** + * RunReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricFilter = null; + + /** + * RunReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.metricAggregations = $util.emptyArray; + + /** + * RunReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.currencyCode = ""; + + /** + * RunReportRequest cohortSpec. + * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.cohortSpec = null; + + /** + * RunReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.keepEmptyRows = false; + + /** + * RunReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + */ + RunReportRequest.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest instance + */ + RunReportRequest.create = function create(properties) { + return new RunReportRequest(properties); + }; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 15: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest + */ + RunReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {google.analytics.data.v1beta.RunReportRequest} message RunReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this RunReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportRequest"; + }; + + return RunReportRequest; + })(); + + v1beta.RunReportResponse = (function() { + + /** + * Properties of a RunReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunReportResponse + * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders + * @property {Array.|null} [rows] RunReportResponse rows + * @property {Array.|null} [totals] RunReportResponse totals + * @property {Array.|null} [maximums] RunReportResponse maximums + * @property {Array.|null} [minimums] RunReportResponse minimums + * @property {number|null} [rowCount] RunReportResponse rowCount + * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunReportResponse metadata + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota + * @property {string|null} [kind] RunReportResponse kind + */ + + /** + * Constructs a new RunReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunReportResponse. + * @implements IRunReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set + */ + function RunReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.totals = $util.emptyArray; + + /** + * RunReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rowCount = 0; + + /** + * RunReportResponse metadata. + * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metadata = null; + + /** + * RunReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.propertyQuota = null; + + /** + * RunReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + */ + RunReportResponse.prototype.kind = ""; + + /** + * Creates a new RunReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse instance + */ + RunReportResponse.create = function create(properties) { + return new RunReportResponse(properties); + }; + + /** + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 10: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse + */ + RunReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {google.analytics.data.v1beta.RunReportResponse} message RunReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportResponse"; + }; + + return RunReportResponse; + })(); + + v1beta.RunPivotReportRequest = (function() { + + /** + * Properties of a RunPivotReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunPivotReportRequest + * @property {string|null} [property] RunPivotReportRequest property + * @property {Array.|null} [dimensions] RunPivotReportRequest dimensions + * @property {Array.|null} [metrics] RunPivotReportRequest metrics + * @property {Array.|null} [dateRanges] RunPivotReportRequest dateRanges + * @property {Array.|null} [pivots] RunPivotReportRequest pivots + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunPivotReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunPivotReportRequest metricFilter + * @property {string|null} [currencyCode] RunPivotReportRequest currencyCode + * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunPivotReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunPivotReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunPivotReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunPivotReportRequest comparisons + */ + + /** + * Constructs a new RunPivotReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunPivotReportRequest. + * @implements IRunPivotReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set + */ + function RunPivotReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.pivots = []; + this.comparisons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunPivotReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.property = ""; + + /** + * RunPivotReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunPivotReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunPivotReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunPivotReportRequest pivots. + * @member {Array.} pivots + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.pivots = $util.emptyArray; + + /** + * RunPivotReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.dimensionFilter = null; + + /** + * RunPivotReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.metricFilter = null; + + /** + * RunPivotReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.currencyCode = ""; + + /** + * RunPivotReportRequest cohortSpec. + * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.cohortSpec = null; + + /** + * RunPivotReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.keepEmptyRows = false; + + /** + * RunPivotReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunPivotReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + */ + RunPivotReportRequest.prototype.comparisons = $util.emptyArray; + + /** + * Creates a new RunPivotReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest instance + */ + RunPivotReportRequest.create = function create(properties) { + return new RunPivotReportRequest(properties); + }; + + /** + * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pivots != null && message.pivots.length) + for (var i = 0; i < message.pivots.length; ++i) + $root.google.analytics.data.v1beta.Pivot.encode(message.pivots[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.pivots && message.pivots.length)) + message.pivots = []; + message.pivots.push($root.google.analytics.data.v1beta.Pivot.decode(reader, reader.uint32())); + break; + } + case 6: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 8: { + message.currencyCode = reader.string(); + break; + } + case 9: { + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 10: { + message.keepEmptyRows = reader.bool(); + break; + } + case 11: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 12: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunPivotReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunPivotReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.pivots != null && message.hasOwnProperty("pivots")) { + if (!Array.isArray(message.pivots)) + return "pivots: array expected"; + for (var i = 0; i < message.pivots.length; ++i) { + var error = $root.google.analytics.data.v1beta.Pivot.verify(message.pivots[i]); + if (error) + return "pivots." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + return null; + }; + + /** + * Creates a RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest + */ + RunPivotReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.pivots) { + if (!Array.isArray(object.pivots)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: array expected"); + message.pivots = []; + for (var i = 0; i < object.pivots.length; ++i) { + if (typeof object.pivots[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: object expected"); + message.pivots[i] = $root.google.analytics.data.v1beta.Pivot.fromObject(object.pivots[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {google.analytics.data.v1beta.RunPivotReportRequest} message RunPivotReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunPivotReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.pivots = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); + } + if (message.pivots && message.pivots.length) { + object.pivots = []; + for (var j = 0; j < message.pivots.length; ++j) + object.pivots[j] = $root.google.analytics.data.v1beta.Pivot.toObject(message.pivots[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); + } + return object; + }; + + /** + * Converts this RunPivotReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunPivotReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunPivotReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunPivotReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunPivotReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportRequest"; + }; + + return RunPivotReportRequest; + })(); + + v1beta.RunPivotReportResponse = (function() { + + /** + * Properties of a RunPivotReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunPivotReportResponse + * @property {Array.|null} [pivotHeaders] RunPivotReportResponse pivotHeaders + * @property {Array.|null} [dimensionHeaders] RunPivotReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunPivotReportResponse metricHeaders + * @property {Array.|null} [rows] RunPivotReportResponse rows + * @property {Array.|null} [aggregates] RunPivotReportResponse aggregates + * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunPivotReportResponse metadata + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunPivotReportResponse propertyQuota + * @property {string|null} [kind] RunPivotReportResponse kind + */ + + /** + * Constructs a new RunPivotReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunPivotReportResponse. + * @implements IRunPivotReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set + */ + function RunPivotReportResponse(properties) { + this.pivotHeaders = []; + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.aggregates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunPivotReportResponse pivotHeaders. + * @member {Array.} pivotHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.pivotHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunPivotReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunPivotReportResponse aggregates. + * @member {Array.} aggregates + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.aggregates = $util.emptyArray; + + /** + * RunPivotReportResponse metadata. + * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.metadata = null; + + /** + * RunPivotReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.propertyQuota = null; + + /** + * RunPivotReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + */ + RunPivotReportResponse.prototype.kind = ""; + + /** + * Creates a new RunPivotReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse instance + */ + RunPivotReportResponse.create = function create(properties) { + return new RunPivotReportResponse(properties); + }; + + /** + * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotHeaders != null && message.pivotHeaders.length) + for (var i = 0; i < message.pivotHeaders.length; ++i) + $root.google.analytics.data.v1beta.PivotHeader.encode(message.pivotHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregates != null && message.aggregates.length) + for (var i = 0; i < message.aggregates.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.aggregates[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunPivotReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotHeaders && message.pivotHeaders.length)) + message.pivotHeaders = []; + message.pivotHeaders.push($root.google.analytics.data.v1beta.PivotHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.aggregates && message.aggregates.length)) + message.aggregates = []; + message.aggregates.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 8: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunPivotReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunPivotReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunPivotReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotHeaders != null && message.hasOwnProperty("pivotHeaders")) { + if (!Array.isArray(message.pivotHeaders)) + return "pivotHeaders: array expected"; + for (var i = 0; i < message.pivotHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.PivotHeader.verify(message.pivotHeaders[i]); + if (error) + return "pivotHeaders." + error; + } + } + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.aggregates != null && message.hasOwnProperty("aggregates")) { + if (!Array.isArray(message.aggregates)) + return "aggregates: array expected"; + for (var i = 0; i < message.aggregates.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.aggregates[i]); + if (error) + return "aggregates." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse + */ + RunPivotReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); + if (object.pivotHeaders) { + if (!Array.isArray(object.pivotHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: array expected"); + message.pivotHeaders = []; + for (var i = 0; i < object.pivotHeaders.length; ++i) { + if (typeof object.pivotHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: object expected"); + message.pivotHeaders[i] = $root.google.analytics.data.v1beta.PivotHeader.fromObject(object.pivotHeaders[i]); + } + } + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.aggregates) { + if (!Array.isArray(object.aggregates)) + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: array expected"); + message.aggregates = []; + for (var i = 0; i < object.aggregates.length; ++i) { + if (typeof object.aggregates[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: object expected"); + message.aggregates[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.aggregates[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {google.analytics.data.v1beta.RunPivotReportResponse} message RunPivotReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunPivotReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pivotHeaders = []; + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.aggregates = []; + } + if (options.defaults) { + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; + } + if (message.pivotHeaders && message.pivotHeaders.length) { + object.pivotHeaders = []; + for (var j = 0; j < message.pivotHeaders.length; ++j) + object.pivotHeaders[j] = $root.google.analytics.data.v1beta.PivotHeader.toObject(message.pivotHeaders[j], options); + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.aggregates && message.aggregates.length) { + object.aggregates = []; + for (var j = 0; j < message.aggregates.length; ++j) + object.aggregates[j] = $root.google.analytics.data.v1beta.Row.toObject(message.aggregates[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunPivotReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunPivotReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunPivotReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunPivotReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunPivotReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportResponse"; + }; + + return RunPivotReportResponse; + })(); + + v1beta.BatchRunReportsRequest = (function() { + + /** + * Properties of a BatchRunReportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunReportsRequest + * @property {string|null} [property] BatchRunReportsRequest property + * @property {Array.|null} [requests] BatchRunReportsRequest requests + */ + + /** + * Constructs a new BatchRunReportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunReportsRequest. + * @implements IBatchRunReportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set + */ + function BatchRunReportsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchRunReportsRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + */ + BatchRunReportsRequest.prototype.property = ""; + + /** + * BatchRunReportsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + */ + BatchRunReportsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchRunReportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest instance + */ + BatchRunReportsRequest.create = function create(properties) { + return new BatchRunReportsRequest(properties); + }; + + /** + * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.data.v1beta.RunReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.data.v1beta.RunReportRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunReportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunReportRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest + */ + BatchRunReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.data.v1beta.RunReportRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {google.analytics.data.v1beta.BatchRunReportsRequest} message BatchRunReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.data.v1beta.RunReportRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchRunReportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchRunReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunReportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsRequest"; + }; + + return BatchRunReportsRequest; + })(); + + v1beta.BatchRunReportsResponse = (function() { + + /** + * Properties of a BatchRunReportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunReportsResponse + * @property {Array.|null} [reports] BatchRunReportsResponse reports + * @property {string|null} [kind] BatchRunReportsResponse kind + */ + + /** + * Constructs a new BatchRunReportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunReportsResponse. + * @implements IBatchRunReportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set + */ + function BatchRunReportsResponse(properties) { + this.reports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchRunReportsResponse reports. + * @member {Array.} reports + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + */ + BatchRunReportsResponse.prototype.reports = $util.emptyArray; + + /** + * BatchRunReportsResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + */ + BatchRunReportsResponse.prototype.kind = ""; + + /** + * Creates a new BatchRunReportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse instance + */ + BatchRunReportsResponse.create = function create(properties) { + return new BatchRunReportsResponse(properties); + }; + + /** + * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reports != null && message.reports.length) + for (var i = 0; i < message.reports.length; ++i) + $root.google.analytics.data.v1beta.RunReportResponse.encode(message.reports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + return writer; + }; + + /** + * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.reports && message.reports.length)) + message.reports = []; + message.reports.push($root.google.analytics.data.v1beta.RunReportResponse.decode(reader, reader.uint32())); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunReportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reports != null && message.hasOwnProperty("reports")) { + if (!Array.isArray(message.reports)) + return "reports: array expected"; + for (var i = 0; i < message.reports.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunReportResponse.verify(message.reports[i]); + if (error) + return "reports." + error; + } + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse + */ + BatchRunReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); + if (object.reports) { + if (!Array.isArray(object.reports)) + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: array expected"); + message.reports = []; + for (var i = 0; i < object.reports.length; ++i) { + if (typeof object.reports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: object expected"); + message.reports[i] = $root.google.analytics.data.v1beta.RunReportResponse.fromObject(object.reports[i]); + } + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {google.analytics.data.v1beta.BatchRunReportsResponse} message BatchRunReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reports = []; + if (options.defaults) + object.kind = ""; + if (message.reports && message.reports.length) { + object.reports = []; + for (var j = 0; j < message.reports.length; ++j) + object.reports[j] = $root.google.analytics.data.v1beta.RunReportResponse.toObject(message.reports[j], options); + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this BatchRunReportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchRunReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunReportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsResponse"; + }; + + return BatchRunReportsResponse; + })(); + + v1beta.BatchRunPivotReportsRequest = (function() { + + /** + * Properties of a BatchRunPivotReportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunPivotReportsRequest + * @property {string|null} [property] BatchRunPivotReportsRequest property + * @property {Array.|null} [requests] BatchRunPivotReportsRequest requests + */ + + /** + * Constructs a new BatchRunPivotReportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunPivotReportsRequest. + * @implements IBatchRunPivotReportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set + */ + function BatchRunPivotReportsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchRunPivotReportsRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + */ + BatchRunPivotReportsRequest.prototype.property = ""; + + /** + * BatchRunPivotReportsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + */ + BatchRunPivotReportsRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchRunPivotReportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest instance + */ + BatchRunPivotReportsRequest.create = function create(properties) { + return new BatchRunPivotReportsRequest(properties); + }; + + /** + * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.data.v1beta.RunPivotReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.data.v1beta.RunPivotReportRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunPivotReportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunPivotReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunPivotReportRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest + */ + BatchRunPivotReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.data.v1beta.RunPivotReportRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {google.analytics.data.v1beta.BatchRunPivotReportsRequest} message BatchRunPivotReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunPivotReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.data.v1beta.RunPivotReportRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchRunPivotReportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchRunPivotReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunPivotReportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunPivotReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsRequest"; + }; + + return BatchRunPivotReportsRequest; + })(); + + v1beta.BatchRunPivotReportsResponse = (function() { + + /** + * Properties of a BatchRunPivotReportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IBatchRunPivotReportsResponse + * @property {Array.|null} [pivotReports] BatchRunPivotReportsResponse pivotReports + * @property {string|null} [kind] BatchRunPivotReportsResponse kind + */ + + /** + * Constructs a new BatchRunPivotReportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a BatchRunPivotReportsResponse. + * @implements IBatchRunPivotReportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set + */ + function BatchRunPivotReportsResponse(properties) { + this.pivotReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchRunPivotReportsResponse pivotReports. + * @member {Array.} pivotReports + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + */ + BatchRunPivotReportsResponse.prototype.pivotReports = $util.emptyArray; + + /** + * BatchRunPivotReportsResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + */ + BatchRunPivotReportsResponse.prototype.kind = ""; + + /** + * Creates a new BatchRunPivotReportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse instance + */ + BatchRunPivotReportsResponse.create = function create(properties) { + return new BatchRunPivotReportsResponse(properties); + }; + + /** + * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotReports != null && message.pivotReports.length) + for (var i = 0; i < message.pivotReports.length; ++i) + $root.google.analytics.data.v1beta.RunPivotReportResponse.encode(message.pivotReports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + return writer; + }; + + /** + * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchRunPivotReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotReports && message.pivotReports.length)) + message.pivotReports = []; + message.pivotReports.push($root.google.analytics.data.v1beta.RunPivotReportResponse.decode(reader, reader.uint32())); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchRunPivotReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchRunPivotReportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchRunPivotReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotReports != null && message.hasOwnProperty("pivotReports")) { + if (!Array.isArray(message.pivotReports)) + return "pivotReports: array expected"; + for (var i = 0; i < message.pivotReports.length; ++i) { + var error = $root.google.analytics.data.v1beta.RunPivotReportResponse.verify(message.pivotReports[i]); + if (error) + return "pivotReports." + error; + } + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse + */ + BatchRunPivotReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); + if (object.pivotReports) { + if (!Array.isArray(object.pivotReports)) + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: array expected"); + message.pivotReports = []; + for (var i = 0; i < object.pivotReports.length; ++i) { + if (typeof object.pivotReports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: object expected"); + message.pivotReports[i] = $root.google.analytics.data.v1beta.RunPivotReportResponse.fromObject(object.pivotReports[i]); + } + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} message BatchRunPivotReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchRunPivotReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotReports = []; + if (options.defaults) + object.kind = ""; + if (message.pivotReports && message.pivotReports.length) { + object.pivotReports = []; + for (var j = 0; j < message.pivotReports.length; ++j) + object.pivotReports[j] = $root.google.analytics.data.v1beta.RunPivotReportResponse.toObject(message.pivotReports[j], options); + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this BatchRunPivotReportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchRunPivotReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchRunPivotReportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunPivotReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsResponse"; + }; + + return BatchRunPivotReportsResponse; + })(); + + v1beta.GetMetadataRequest = (function() { + + /** + * Properties of a GetMetadataRequest. + * @memberof google.analytics.data.v1beta + * @interface IGetMetadataRequest + * @property {string|null} [name] GetMetadataRequest name + */ + + /** + * Constructs a new GetMetadataRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a GetMetadataRequest. + * @implements IGetMetadataRequest + * @constructor + * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set + */ + function GetMetadataRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMetadataRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @instance + */ + GetMetadataRequest.prototype.name = ""; + + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest instance + */ + GetMetadataRequest.create = function create(properties) { + return new GetMetadataRequest(properties); + }; + + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest + */ + GetMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.GetMetadataRequest) + return object; + var message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {google.analytics.data.v1beta.GetMetadataRequest} message GetMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMetadataRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.GetMetadataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.GetMetadataRequest"; + }; + + return GetMetadataRequest; + })(); + + v1beta.RunRealtimeReportRequest = (function() { + + /** + * Properties of a RunRealtimeReportRequest. + * @memberof google.analytics.data.v1beta + * @interface IRunRealtimeReportRequest + * @property {string|null} [property] RunRealtimeReportRequest property + * @property {Array.|null} [dimensions] RunRealtimeReportRequest dimensions + * @property {Array.|null} [metrics] RunRealtimeReportRequest metrics + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunRealtimeReportRequest dimensionFilter + * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunRealtimeReportRequest metricFilter + * @property {number|Long|null} [limit] RunRealtimeReportRequest limit + * @property {Array.|null} [metricAggregations] RunRealtimeReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunRealtimeReportRequest orderBys + * @property {boolean|null} [returnPropertyQuota] RunRealtimeReportRequest returnPropertyQuota + * @property {Array.|null} [minuteRanges] RunRealtimeReportRequest minuteRanges + */ + + /** + * Constructs a new RunRealtimeReportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunRealtimeReportRequest. + * @implements IRunRealtimeReportRequest + * @constructor + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set + */ + function RunRealtimeReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.metricAggregations = []; + this.orderBys = []; + this.minuteRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunRealtimeReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.property = ""; + + /** + * RunRealtimeReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunRealtimeReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunRealtimeReportRequest dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.dimensionFilter = null; + + /** + * RunRealtimeReportRequest metricFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metricFilter = null; + + /** + * RunRealtimeReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunRealtimeReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.metricAggregations = $util.emptyArray; + + /** + * RunRealtimeReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunRealtimeReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.returnPropertyQuota = false; + + /** + * RunRealtimeReportRequest minuteRanges. + * @member {Array.} minuteRanges + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + */ + RunRealtimeReportRequest.prototype.minuteRanges = $util.emptyArray; + + /** + * Creates a new RunRealtimeReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest instance + */ + RunRealtimeReportRequest.create = function create(properties) { + return new RunRealtimeReportRequest(properties); + }; + + /** + * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.returnPropertyQuota); + if (message.minuteRanges != null && message.minuteRanges.length) + for (var i = 0; i < message.minuteRanges.length; ++i) + $root.google.analytics.data.v1beta.MinuteRange.encode(message.minuteRanges[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.limit = reader.int64(); + break; + } + case 7: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 8: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 9: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 10: { + if (!(message.minuteRanges && message.minuteRanges.length)) + message.minuteRanges = []; + message.minuteRanges.push($root.google.analytics.data.v1beta.MinuteRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunRealtimeReportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunRealtimeReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.minuteRanges != null && message.hasOwnProperty("minuteRanges")) { + if (!Array.isArray(message.minuteRanges)) + return "minuteRanges: array expected"; + for (var i = 0; i < message.minuteRanges.length; ++i) { + var error = $root.google.analytics.data.v1beta.MinuteRange.verify(message.minuteRanges[i]); + if (error) + return "minuteRanges." + error; + } + } + return null; + }; + + /** + * Creates a RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest + */ + RunRealtimeReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.minuteRanges) { + if (!Array.isArray(object.minuteRanges)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: array expected"); + message.minuteRanges = []; + for (var i = 0; i < object.minuteRanges.length; ++i) { + if (typeof object.minuteRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: object expected"); + message.minuteRanges[i] = $root.google.analytics.data.v1beta.MinuteRange.fromObject(object.minuteRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {google.analytics.data.v1beta.RunRealtimeReportRequest} message RunRealtimeReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunRealtimeReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.metricAggregations = []; + object.orderBys = []; + object.minuteRanges = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.minuteRanges && message.minuteRanges.length) { + object.minuteRanges = []; + for (var j = 0; j < message.minuteRanges.length; ++j) + object.minuteRanges[j] = $root.google.analytics.data.v1beta.MinuteRange.toObject(message.minuteRanges[j], options); + } + return object; + }; + + /** + * Converts this RunRealtimeReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunRealtimeReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunRealtimeReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunRealtimeReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportRequest"; + }; + + return RunRealtimeReportRequest; + })(); + + v1beta.RunRealtimeReportResponse = (function() { + + /** + * Properties of a RunRealtimeReportResponse. + * @memberof google.analytics.data.v1beta + * @interface IRunRealtimeReportResponse + * @property {Array.|null} [dimensionHeaders] RunRealtimeReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunRealtimeReportResponse metricHeaders + * @property {Array.|null} [rows] RunRealtimeReportResponse rows + * @property {Array.|null} [totals] RunRealtimeReportResponse totals + * @property {Array.|null} [maximums] RunRealtimeReportResponse maximums + * @property {Array.|null} [minimums] RunRealtimeReportResponse minimums + * @property {number|null} [rowCount] RunRealtimeReportResponse rowCount + * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunRealtimeReportResponse propertyQuota + * @property {string|null} [kind] RunRealtimeReportResponse kind + */ + + /** + * Constructs a new RunRealtimeReportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a RunRealtimeReportResponse. + * @implements IRunRealtimeReportResponse + * @constructor + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set + */ + function RunRealtimeReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunRealtimeReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunRealtimeReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunRealtimeReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunRealtimeReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.totals = $util.emptyArray; + + /** + * RunRealtimeReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunRealtimeReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunRealtimeReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.rowCount = 0; + + /** + * RunRealtimeReportResponse propertyQuota. + * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.propertyQuota = null; + + /** + * RunRealtimeReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + */ + RunRealtimeReportResponse.prototype.kind = ""; + + /** + * Creates a new RunRealtimeReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse instance + */ + RunRealtimeReportResponse.create = function create(properties) { + return new RunRealtimeReportResponse(properties); + }; + + /** + * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kind); + return writer; + }; + + /** + * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunRealtimeReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 9: { + message.kind = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunRealtimeReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunRealtimeReportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunRealtimeReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } + } + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } + } + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + return null; + }; + + /** + * Creates a RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse + */ + RunRealtimeReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + return message; + }; + + /** + * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} message RunRealtimeReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunRealtimeReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; + } + if (options.defaults) { + object.rowCount = 0; + object.propertyQuota = null; + object.kind = ""; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + return object; + }; + + /** + * Converts this RunRealtimeReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunRealtimeReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunRealtimeReportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunRealtimeReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportResponse"; + }; + + return RunRealtimeReportResponse; + })(); + + v1beta.GetAudienceExportRequest = (function() { + + /** + * Properties of a GetAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface IGetAudienceExportRequest + * @property {string|null} [name] GetAudienceExportRequest name + */ + + /** + * Constructs a new GetAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a GetAudienceExportRequest. + * @implements IGetAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set + */ + function GetAudienceExportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAudienceExportRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @instance + */ + GetAudienceExportRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest instance + */ + GetAudienceExportRequest.create = function create(properties) { + return new GetAudienceExportRequest(properties); + }; + + /** + * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceExportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceExportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest + */ + GetAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.GetAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.GetAudienceExportRequest} message GetAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.GetAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.GetAudienceExportRequest"; + }; + + return GetAudienceExportRequest; + })(); + + v1beta.ListAudienceExportsRequest = (function() { + + /** + * Properties of a ListAudienceExportsRequest. + * @memberof google.analytics.data.v1beta + * @interface IListAudienceExportsRequest + * @property {string|null} [parent] ListAudienceExportsRequest parent + * @property {number|null} [pageSize] ListAudienceExportsRequest pageSize + * @property {string|null} [pageToken] ListAudienceExportsRequest pageToken + */ + + /** + * Constructs a new ListAudienceExportsRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ListAudienceExportsRequest. + * @implements IListAudienceExportsRequest + * @constructor + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set + */ + function ListAudienceExportsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudienceExportsRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.parent = ""; + + /** + * ListAudienceExportsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.pageSize = 0; + + /** + * ListAudienceExportsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + */ + ListAudienceExportsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudienceExportsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest instance + */ + ListAudienceExportsRequest.create = function create(properties) { + return new ListAudienceExportsRequest(properties); + }; + + /** + * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceExportsRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceExportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest + */ + ListAudienceExportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsRequest) + return object; + var message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceExportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {google.analytics.data.v1beta.ListAudienceExportsRequest} message ListAudienceExportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceExportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAudienceExportsRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudienceExportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceExportsRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceExportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsRequest"; + }; + + return ListAudienceExportsRequest; + })(); + + v1beta.ListAudienceExportsResponse = (function() { + + /** + * Properties of a ListAudienceExportsResponse. + * @memberof google.analytics.data.v1beta + * @interface IListAudienceExportsResponse + * @property {Array.|null} [audienceExports] ListAudienceExportsResponse audienceExports + * @property {string|null} [nextPageToken] ListAudienceExportsResponse nextPageToken + */ + + /** + * Constructs a new ListAudienceExportsResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ListAudienceExportsResponse. + * @implements IListAudienceExportsResponse + * @constructor + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set + */ + function ListAudienceExportsResponse(properties) { + this.audienceExports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudienceExportsResponse audienceExports. + * @member {Array.} audienceExports + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + */ + ListAudienceExportsResponse.prototype.audienceExports = $util.emptyArray; + + /** + * ListAudienceExportsResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + */ + ListAudienceExportsResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListAudienceExportsResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListAudienceExportsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse instance + */ + ListAudienceExportsResponse.create = function create(properties) { + return new ListAudienceExportsResponse(properties); + }; + + /** + * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceExports != null && message.audienceExports.length) + for (var i = 0; i < message.audienceExports.length; ++i) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudienceExportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.audienceExports && message.audienceExports.length)) + message.audienceExports = []; + message.audienceExports.push($root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudienceExportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudienceExportsResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudienceExportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceExports != null && message.hasOwnProperty("audienceExports")) { + if (!Array.isArray(message.audienceExports)) + return "audienceExports: array expected"; + for (var i = 0; i < message.audienceExports.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExports[i]); + if (error) + return "audienceExports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; + }; + + /** + * Creates a ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse + */ + ListAudienceExportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsResponse) + return object; + var message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); + if (object.audienceExports) { + if (!Array.isArray(object.audienceExports)) + throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: array expected"); + message.audienceExports = []; + for (var i = 0; i < object.audienceExports.length; ++i) { + if (typeof object.audienceExports[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: object expected"); + message.audienceExports[i] = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} message ListAudienceExportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudienceExportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceExports = []; + if (message.audienceExports && message.audienceExports.length) { + object.audienceExports = []; + for (var j = 0; j < message.audienceExports.length; ++j) + object.audienceExports[j] = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; + if (options.oneofs) + object._nextPageToken = "nextPageToken"; + } + return object; + }; + + /** + * Converts this ListAudienceExportsResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudienceExportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudienceExportsResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudienceExportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsResponse"; + }; + + return ListAudienceExportsResponse; + })(); + + v1beta.CreateAudienceExportRequest = (function() { + + /** + * Properties of a CreateAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface ICreateAudienceExportRequest + * @property {string|null} [parent] CreateAudienceExportRequest parent + * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] CreateAudienceExportRequest audienceExport + */ + + /** + * Constructs a new CreateAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CreateAudienceExportRequest. + * @implements ICreateAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set + */ + function CreateAudienceExportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAudienceExportRequest parent. + * @member {string} parent + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + */ + CreateAudienceExportRequest.prototype.parent = ""; + + /** + * CreateAudienceExportRequest audienceExport. + * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + */ + CreateAudienceExportRequest.prototype.audienceExport = null; + + /** + * Creates a new CreateAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest instance + */ + CreateAudienceExportRequest.create = function create(properties) { + return new CreateAudienceExportRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceExportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceExportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); + if (error) + return "audienceExport." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest + */ + CreateAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CreateAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audienceExport != null) { + if (typeof object.audienceExport !== "object") + throw TypeError(".google.analytics.data.v1beta.CreateAudienceExportRequest.audienceExport: object expected"); + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.CreateAudienceExportRequest} message CreateAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audienceExport = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) + object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); + return object; + }; + + /** + * Converts this CreateAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CreateAudienceExportRequest"; + }; + + return CreateAudienceExportRequest; + })(); + + v1beta.AudienceExport = (function() { + + /** + * Properties of an AudienceExport. + * @memberof google.analytics.data.v1beta + * @interface IAudienceExport + * @property {string|null} [name] AudienceExport name + * @property {string|null} [audience] AudienceExport audience + * @property {string|null} [audienceDisplayName] AudienceExport audienceDisplayName + * @property {Array.|null} [dimensions] AudienceExport dimensions + * @property {google.analytics.data.v1beta.AudienceExport.State|null} [state] AudienceExport state + * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceExport beginCreatingTime + * @property {number|null} [creationQuotaTokensCharged] AudienceExport creationQuotaTokensCharged + * @property {number|null} [rowCount] AudienceExport rowCount + * @property {string|null} [errorMessage] AudienceExport errorMessage + * @property {number|null} [percentageCompleted] AudienceExport percentageCompleted + */ + + /** + * Constructs a new AudienceExport. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceExport. + * @implements IAudienceExport + * @constructor + * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set + */ + function AudienceExport(properties) { + this.dimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceExport name. + * @member {string} name + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.name = ""; + + /** + * AudienceExport audience. + * @member {string} audience + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.audience = ""; + + /** + * AudienceExport audienceDisplayName. + * @member {string} audienceDisplayName + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.audienceDisplayName = ""; + + /** + * AudienceExport dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.dimensions = $util.emptyArray; + + /** + * AudienceExport state. + * @member {google.analytics.data.v1beta.AudienceExport.State|null|undefined} state + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.state = null; + + /** + * AudienceExport beginCreatingTime. + * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.beginCreatingTime = null; + + /** + * AudienceExport creationQuotaTokensCharged. + * @member {number} creationQuotaTokensCharged + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.creationQuotaTokensCharged = 0; + + /** + * AudienceExport rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.rowCount = null; + + /** + * AudienceExport errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.errorMessage = null; + + /** + * AudienceExport percentageCompleted. + * @member {number|null|undefined} percentageCompleted + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + */ + AudienceExport.prototype.percentageCompleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_beginCreatingTime", { + get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_errorMessage", { + get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudienceExport.prototype, "_percentageCompleted", { + get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceExport instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport instance + */ + AudienceExport.create = function create(properties) { + return new AudienceExport(properties); + }; + + /** + * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1beta.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) + $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); + if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) + writer.uint32(/* id 10, wireType 1 =*/81).double(message.percentageCompleted); + return writer; + }; + + /** + * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceExport message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + case 3: { + message.audienceDisplayName = reader.string(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1beta.AudienceDimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.creationQuotaTokensCharged = reader.int32(); + break; + } + case 8: { + message.rowCount = reader.int32(); + break; + } + case 9: { + message.errorMessage = reader.string(); + break; + } + case 10: { + message.percentageCompleted = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceExport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceExport message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceExport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + if (!$util.isString(message.audienceDisplayName)) + return "audienceDisplayName: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + properties._beginCreatingTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); + if (error) + return "beginCreatingTime." + error; + } + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + if (!$util.isInteger(message.creationQuotaTokensCharged)) + return "creationQuotaTokensCharged: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + properties._errorMessage = 1; + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + properties._percentageCompleted = 1; + if (typeof message.percentageCompleted !== "number") + return "percentageCompleted: number expected"; + } + return null; + }; + + /** + * Creates an AudienceExport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport + */ + AudienceExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceExport) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceExport(); + if (object.name != null) + message.name = String(object.name); + if (object.audience != null) + message.audience = String(object.audience); + if (object.audienceDisplayName != null) + message.audienceDisplayName = String(object.audienceDisplayName); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1beta.AudienceDimension.fromObject(object.dimensions[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.beginCreatingTime != null) { + if (typeof object.beginCreatingTime !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceExport.beginCreatingTime: object expected"); + message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); + } + if (object.creationQuotaTokensCharged != null) + message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentageCompleted != null) + message.percentageCompleted = Number(object.percentageCompleted); + return message; + }; + + /** + * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {google.analytics.data.v1beta.AudienceExport} message AudienceExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.name = ""; + object.audience = ""; + object.audienceDisplayName = ""; + object.creationQuotaTokensCharged = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) + object.audienceDisplayName = message.audienceDisplayName; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1beta.AudienceDimension.toObject(message.dimensions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.analytics.data.v1beta.AudienceExport.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1beta.AudienceExport.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { + object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); + if (options.oneofs) + object._beginCreatingTime = "beginCreatingTime"; + } + if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) + object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + object.errorMessage = message.errorMessage; + if (options.oneofs) + object._errorMessage = "errorMessage"; + } + if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { + object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; + if (options.oneofs) + object._percentageCompleted = "percentageCompleted"; + } + return object; + }; + + /** + * Converts this AudienceExport to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceExport + * @instance + * @returns {Object.} JSON object + */ + AudienceExport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceExport + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceExport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExport"; + }; + + /** + * State enum. + * @name google.analytics.data.v1beta.AudienceExport.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} FAILED=3 FAILED value + */ + AudienceExport.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return AudienceExport; + })(); + + v1beta.AudienceExportMetadata = (function() { + + /** + * Properties of an AudienceExportMetadata. + * @memberof google.analytics.data.v1beta + * @interface IAudienceExportMetadata + */ + + /** + * Constructs a new AudienceExportMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceExportMetadata. + * @implements IAudienceExportMetadata + * @constructor + * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set + */ + function AudienceExportMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AudienceExportMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata instance + */ + AudienceExportMetadata.create = function create(properties) { + return new AudienceExportMetadata(properties); + }; + + /** + * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExportMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceExportMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExportMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExportMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceExportMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceExportMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceExportMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata + */ + AudienceExportMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceExportMetadata) + return object; + return new $root.google.analytics.data.v1beta.AudienceExportMetadata(); + }; + + /** + * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {google.analytics.data.v1beta.AudienceExportMetadata} message AudienceExportMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceExportMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AudienceExportMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @instance + * @returns {Object.} JSON object + */ + AudienceExportMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceExportMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceExportMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceExportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExportMetadata"; + }; + + return AudienceExportMetadata; + })(); + + v1beta.QueryAudienceExportRequest = (function() { + + /** + * Properties of a QueryAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @interface IQueryAudienceExportRequest + * @property {string|null} [name] QueryAudienceExportRequest name + * @property {number|Long|null} [offset] QueryAudienceExportRequest offset + * @property {number|Long|null} [limit] QueryAudienceExportRequest limit + */ + + /** + * Constructs a new QueryAudienceExportRequest. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QueryAudienceExportRequest. + * @implements IQueryAudienceExportRequest + * @constructor + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set + */ + function QueryAudienceExportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAudienceExportRequest name. + * @member {string} name + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.name = ""; + + /** + * QueryAudienceExportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryAudienceExportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + */ + QueryAudienceExportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAudienceExportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest instance + */ + QueryAudienceExportRequest.create = function create(properties) { + return new QueryAudienceExportRequest(properties); + }; + + /** + * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + return writer; + }; + + /** + * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.offset = reader.int64(); + break; + } + case 3: { + message.limit = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceExportRequest message. + * @function verify + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceExportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest + */ + QueryAudienceExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportRequest) + return object; + var message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {google.analytics.data.v1beta.QueryAudienceExportRequest} message QueryAudienceExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + return object; + }; + + /** + * Converts this QueryAudienceExportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceExportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportRequest"; + }; + + return QueryAudienceExportRequest; + })(); + + v1beta.QueryAudienceExportResponse = (function() { + + /** + * Properties of a QueryAudienceExportResponse. + * @memberof google.analytics.data.v1beta + * @interface IQueryAudienceExportResponse + * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] QueryAudienceExportResponse audienceExport + * @property {Array.|null} [audienceRows] QueryAudienceExportResponse audienceRows + * @property {number|null} [rowCount] QueryAudienceExportResponse rowCount + */ + + /** + * Constructs a new QueryAudienceExportResponse. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QueryAudienceExportResponse. + * @implements IQueryAudienceExportResponse + * @constructor + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set + */ + function QueryAudienceExportResponse(properties) { + this.audienceRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAudienceExportResponse audienceExport. + * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.audienceExport = null; + + /** + * QueryAudienceExportResponse audienceRows. + * @member {Array.} audienceRows + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.audienceRows = $util.emptyArray; + + /** + * QueryAudienceExportResponse rowCount. + * @member {number|null|undefined} rowCount + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + */ + QueryAudienceExportResponse.prototype.rowCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceExportResponse.prototype, "_audienceExport", { + get: $util.oneOfGetter($oneOfFields = ["audienceExport"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QueryAudienceExportResponse.prototype, "_rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryAudienceExportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse instance + */ + QueryAudienceExportResponse.create = function create(properties) { + return new QueryAudienceExportResponse(properties); + }; + + /** + * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) + $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audienceRows != null && message.audienceRows.length) + for (var i = 0; i < message.audienceRows.length; ++i) + $root.google.analytics.data.v1beta.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAudienceExportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.audienceRows && message.audienceRows.length)) + message.audienceRows = []; + message.audienceRows.push($root.google.analytics.data.v1beta.AudienceRow.decode(reader, reader.uint32())); + break; + } + case 3: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAudienceExportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAudienceExportResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAudienceExportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { + properties._audienceExport = 1; + { + var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); + if (error) + return "audienceExport." + error; + } + } + if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { + if (!Array.isArray(message.audienceRows)) + return "audienceRows: array expected"; + for (var i = 0; i < message.audienceRows.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceRow.verify(message.audienceRows[i]); + if (error) + return "audienceRows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + properties._rowCount = 1; + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + } + return null; + }; + + /** + * Creates a QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse + */ + QueryAudienceExportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportResponse) + return object; + var message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); + if (object.audienceExport != null) { + if (typeof object.audienceExport !== "object") + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceExport: object expected"); + message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); + } + if (object.audienceRows) { + if (!Array.isArray(object.audienceRows)) + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: array expected"); + message.audienceRows = []; + for (var i = 0; i < object.audienceRows.length; ++i) { + if (typeof object.audienceRows[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: object expected"); + message.audienceRows[i] = $root.google.analytics.data.v1beta.AudienceRow.fromObject(object.audienceRows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} message QueryAudienceExportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAudienceExportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audienceRows = []; + if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { + object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); + if (options.oneofs) + object._audienceExport = "audienceExport"; + } + if (message.audienceRows && message.audienceRows.length) { + object.audienceRows = []; + for (var j = 0; j < message.audienceRows.length; ++j) + object.audienceRows[j] = $root.google.analytics.data.v1beta.AudienceRow.toObject(message.audienceRows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) { + object.rowCount = message.rowCount; + if (options.oneofs) + object._rowCount = "rowCount"; + } + return object; + }; + + /** + * Converts this QueryAudienceExportResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAudienceExportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryAudienceExportResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryAudienceExportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportResponse"; + }; + + return QueryAudienceExportResponse; + })(); + + v1beta.AudienceRow = (function() { + + /** + * Properties of an AudienceRow. + * @memberof google.analytics.data.v1beta + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + */ + + /** + * Constructs a new AudienceRow. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow + * @constructor + * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set + */ + function AudienceRow(properties) { + this.dimensionValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.AudienceRow + * @instance + */ + AudienceRow.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new AudienceRow instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow instance + */ + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); + }; + + /** + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.AudienceDimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceRow message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow + */ + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceRow) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {google.analytics.data.v1beta.AudienceRow} message AudienceRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this AudienceRow to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceRow + * @instance + * @returns {Object.} JSON object + */ + AudienceRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceRow + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceRow"; + }; + + return AudienceRow; + })(); + + v1beta.AudienceDimension = (function() { + + /** + * Properties of an AudienceDimension. + * @memberof google.analytics.data.v1beta + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName + */ + + /** + * Constructs a new AudienceDimension. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension + * @constructor + * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set + */ + function AudienceDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.AudienceDimension + * @instance + */ + AudienceDimension.prototype.dimensionName = ""; + + /** + * Creates a new AudienceDimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension instance + */ + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); + }; + + /** + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimension message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension + */ + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceDimension) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {google.analytics.data.v1beta.AudienceDimension} message AudienceDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AudienceDimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceDimension + * @instance + * @returns {Object.} JSON object + */ + AudienceDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimension + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimension"; + }; + + return AudienceDimension; + })(); + + v1beta.AudienceDimensionValue = (function() { + + /** + * Properties of an AudienceDimensionValue. + * @memberof google.analytics.data.v1beta + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value + */ + + /** + * Constructs a new AudienceDimensionValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue + * @constructor + * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set + */ + function AudienceDimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + */ + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue instance + */ + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); + }; + + /** + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionValue message. + * @function verify + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue + */ + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.AudienceDimensionValue) + return object; + var message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {google.analytics.data.v1beta.AudienceDimensionValue} message AudienceDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this AudienceDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.AudienceDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimensionValue"; + }; + + return AudienceDimensionValue; + })(); + + v1beta.DateRange = (function() { + + /** + * Properties of a DateRange. + * @memberof google.analytics.data.v1beta + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name + */ + + /** + * Constructs a new DateRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DateRange. + * @implements IDateRange + * @constructor + * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set + */ + function DateRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.startDate = ""; + + /** + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.endDate = ""; + + /** + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1beta.DateRange + * @instance + */ + DateRange.prototype.name = ""; + + /** + * Creates a new DateRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DateRange} DateRange instance + */ + DateRange.create = function create(properties) { + return new DateRange(properties); + }; + + /** + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DateRange} DateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateRange message. + * @function verify + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DateRange} DateRange + */ + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DateRange) + return object; + var message = new $root.google.analytics.data.v1beta.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {google.analytics.data.v1beta.DateRange} message DateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DateRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DateRange + * @instance + * @returns {Object.} JSON object + */ + DateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DateRange"; + }; + + return DateRange; + })(); + + v1beta.MinuteRange = (function() { + + /** + * Properties of a MinuteRange. + * @memberof google.analytics.data.v1beta + * @interface IMinuteRange + * @property {number|null} [startMinutesAgo] MinuteRange startMinutesAgo + * @property {number|null} [endMinutesAgo] MinuteRange endMinutesAgo + * @property {string|null} [name] MinuteRange name + */ + + /** + * Constructs a new MinuteRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MinuteRange. + * @implements IMinuteRange + * @constructor + * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set + */ + function MinuteRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MinuteRange startMinutesAgo. + * @member {number|null|undefined} startMinutesAgo + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.startMinutesAgo = null; + + /** + * MinuteRange endMinutesAgo. + * @member {number|null|undefined} endMinutesAgo + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.endMinutesAgo = null; + + /** + * MinuteRange name. + * @member {string} name + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + */ + MinuteRange.prototype.name = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MinuteRange.prototype, "_startMinutesAgo", { + get: $util.oneOfGetter($oneOfFields = ["startMinutesAgo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MinuteRange.prototype, "_endMinutesAgo", { + get: $util.oneOfGetter($oneOfFields = ["endMinutesAgo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MinuteRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange instance + */ + MinuteRange.create = function create(properties) { + return new MinuteRange(properties); + }; + + /** + * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinuteRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startMinutesAgo != null && Object.hasOwnProperty.call(message, "startMinutesAgo")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startMinutesAgo); + if (message.endMinutesAgo != null && Object.hasOwnProperty.call(message, "endMinutesAgo")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endMinutesAgo); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinuteRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MinuteRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinuteRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MinuteRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startMinutesAgo = reader.int32(); + break; + } + case 2: { + message.endMinutesAgo = reader.int32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MinuteRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinuteRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MinuteRange message. + * @function verify + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MinuteRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { + properties._startMinutesAgo = 1; + if (!$util.isInteger(message.startMinutesAgo)) + return "startMinutesAgo: integer expected"; + } + if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { + properties._endMinutesAgo = 1; + if (!$util.isInteger(message.endMinutesAgo)) + return "endMinutesAgo: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a MinuteRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange + */ + MinuteRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MinuteRange) + return object; + var message = new $root.google.analytics.data.v1beta.MinuteRange(); + if (object.startMinutesAgo != null) + message.startMinutesAgo = object.startMinutesAgo | 0; + if (object.endMinutesAgo != null) + message.endMinutesAgo = object.endMinutesAgo | 0; + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {google.analytics.data.v1beta.MinuteRange} message MinuteRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MinuteRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { + object.startMinutesAgo = message.startMinutesAgo; + if (options.oneofs) + object._startMinutesAgo = "startMinutesAgo"; + } + if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { + object.endMinutesAgo = message.endMinutesAgo; + if (options.oneofs) + object._endMinutesAgo = "endMinutesAgo"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this MinuteRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MinuteRange + * @instance + * @returns {Object.} JSON object + */ + MinuteRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MinuteRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MinuteRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MinuteRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MinuteRange"; + }; + + return MinuteRange; + })(); + + v1beta.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.analytics.data.v1beta + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1beta.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + */ + + /** + * Constructs a new Dimension. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set + */ + function Dimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Dimension + * @instance + */ + Dimension.prototype.name = ""; + + /** + * Dimension dimensionExpression. + * @member {google.analytics.data.v1beta.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1beta.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1beta.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1beta.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Dimension) + return object; + var message = new $root.google.analytics.data.v1beta.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1beta.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.fromObject(object.dimensionExpression); + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {google.analytics.data.v1beta.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.toObject(message.dimensionExpression, options); + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Dimension"; + }; + + return Dimension; + })(); + + v1beta.DimensionExpression = (function() { + + /** + * Properties of a DimensionExpression. + * @memberof google.analytics.data.v1beta + * @interface IDimensionExpression + * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + */ + + /** + * Constructs a new DimensionExpression. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression + * @constructor + * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set + */ + function DimensionExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.lowerCase = null; + + /** + * DimensionExpression upperCase. + * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.upperCase = null; + + /** + * DimensionExpression concatenate. + * @member {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + DimensionExpression.prototype.concatenate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + */ + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression instance + */ + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); + }; + + /** + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 5: { + message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (error) + return "lowerCase." + error; + } + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.upperCase); + if (error) + return "upperCase." + error; + } + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (error) + return "concatenate." + error; + } + } + return null; + }; + + /** + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression + */ + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.lowerCase); + } + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.upperCase); + } + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + } + return message; + }; + + /** + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression} message DimensionExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); + if (options.oneofs) + object.oneExpression = "lowerCase"; + } + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.upperCase, options); + if (options.oneofs) + object.oneExpression = "upperCase"; + } + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (options.oneofs) + object.oneExpression = "concatenate"; + } + return object; + }; + + /** + * Converts this DimensionExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression + * @instance + * @returns {Object.} JSON object + */ + DimensionExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression"; + }; + + DimensionExpression.CaseExpression = (function() { + + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ + + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; + + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; + + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.CaseExpression"; + }; + + return CaseExpression; + })(); + + DimensionExpression.ConcatenateExpression = (function() { + + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ + + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1beta.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; + + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; + + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + return object; + }; + + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression"; + }; + + return ConcatenateExpression; + })(); + + return DimensionExpression; + })(); + + v1beta.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.analytics.data.v1beta + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible + */ + + /** + * Constructs a new Metric. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.name = ""; + + /** + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.expression = ""; + + /** + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1beta.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Metric) + return object; + var message = new $root.google.analytics.data.v1beta.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {google.analytics.data.v1beta.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expression = ""; + object.invisible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Metric"; + }; + + return Metric; + })(); + + v1beta.Comparison = (function() { + + /** + * Properties of a Comparison. + * @memberof google.analytics.data.v1beta + * @interface IComparison + * @property {string|null} [name] Comparison name + * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter + * @property {string|null} [comparison] Comparison comparison + */ + + /** + * Constructs a new Comparison. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Comparison. + * @implements IComparison + * @constructor + * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set + */ + function Comparison(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Comparison name. + * @member {string|null|undefined} name + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.name = null; + + /** + * Comparison dimensionFilter. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.dimensionFilter = null; + + /** + * Comparison comparison. + * @member {string|null|undefined} comparison + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Comparison.prototype.comparison = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Comparison.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Comparison oneComparison. + * @member {"dimensionFilter"|"comparison"|undefined} oneComparison + * @memberof google.analytics.data.v1beta.Comparison + * @instance + */ + Object.defineProperty(Comparison.prototype, "oneComparison", { + get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Comparison instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Comparison} Comparison instance + */ + Comparison.create = function create(properties) { + return new Comparison(properties); + }; + + /** + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); + return writer; + }; + + /** + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Comparison.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Comparison message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Comparison(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 3: { + message.comparison = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Comparison message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Comparison} Comparison + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Comparison.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Comparison message. + * @function verify + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Comparison.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + properties.oneComparison = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + if (properties.oneComparison === 1) + return "oneComparison: multiple values"; + properties.oneComparison = 1; + if (!$util.isString(message.comparison)) + return "comparison: string expected"; + } + return null; + }; + + /** + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Comparison} Comparison + */ + Comparison.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Comparison) + return object; + var message = new $root.google.analytics.data.v1beta.Comparison(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Comparison.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.comparison != null) + message.comparison = String(object.comparison); + return message; + }; + + /** + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {google.analytics.data.v1beta.Comparison} message Comparison + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Comparison.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); + if (options.oneofs) + object.oneComparison = "dimensionFilter"; + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + object.comparison = message.comparison; + if (options.oneofs) + object.oneComparison = "comparison"; + } + return object; + }; + + /** + * Converts this Comparison to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Comparison + * @instance + * @returns {Object.} JSON object + */ + Comparison.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Comparison + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Comparison + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Comparison"; + }; + + return Comparison; + })(); + + v1beta.FilterExpression = (function() { + + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1beta + * @interface IFilterExpression + * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1beta.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1beta.IFilter|null} [filter] FilterExpression filter + */ + + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; + + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; + + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; + + /** + * FilterExpression filter. + * @member {google.analytics.data.v1beta.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; + + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1beta.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filter = $root.google.analytics.data.v1beta.Filter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1beta.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1beta.Filter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {google.analytics.data.v1beta.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1beta.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpression"; + }; + + return FilterExpression; + })(); + + v1beta.FilterExpressionList = (function() { + + /** + * Properties of a FilterExpressionList. + * @memberof google.analytics.data.v1beta + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions + */ + + /** + * Constructs a new FilterExpressionList. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList + * @constructor + * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set + */ + function FilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @instance + */ + FilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new FilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList instance + */ + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); + }; + + /** + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1beta.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList + */ + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.FilterExpressionList) + return object; + var message = new $root.google.analytics.data.v1beta.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {google.analytics.data.v1beta.FilterExpressionList} message FilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this FilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + FilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.FilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpressionList"; + }; + + return FilterExpressionList; + })(); + + v1beta.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.analytics.data.v1beta + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1beta.Filter.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1beta.Filter.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1beta.Filter.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1beta.Filter.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1beta.Filter.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + */ + + /** + * Constructs a new Filter. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1beta.Filter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1beta.Filter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1beta.Filter.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1beta.Filter.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1beta.Filter.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1beta.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1beta.Filter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1beta.Filter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1beta.Filter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1beta.Filter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1beta.Filter.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 3: { + message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1beta.Filter.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.fromObject(object.emptyFilter); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {google.analytics.data.v1beta.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter"; + }; + + Filter.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IStringFilter + * @property {google.analytics.data.v1beta.Filter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.data.v1beta.Filter.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.StringFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {google.analytics.data.v1beta.Filter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.data.v1beta.Filter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + Filter.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.InListFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1beta.Filter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {google.analytics.data.v1beta.Filter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.InListFilter"; + }; + + return InListFilter; + })(); + + Filter.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface INumericFilter + * @property {google.analytics.data.v1beta.Filter.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1beta.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.data.v1beta.Filter.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.NumericFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {google.analytics.data.v1beta.Filter.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1beta.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1beta.Filter.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + Filter.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IBetweenFilter + * @property {google.analytics.data.v1beta.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1beta.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1beta.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1beta.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {google.analytics.data.v1beta.Filter.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + Filter.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1beta.Filter + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1beta.Filter + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Filter.EmptyFilter) + return object; + return new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {google.analytics.data.v1beta.Filter.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Filter.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + return Filter; + })(); + + v1beta.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1beta + * @interface IOrderBy + * @property {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null} [pivot] OrderBy pivot + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1beta + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set + */ + function OrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy pivot. + * @member {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null|undefined} pivot + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.pivot = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|"pivot"|undefined} oneOrderBy + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension", "pivot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pivot != null && Object.hasOwnProperty.call(message, "pivot")) + $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.encode(message.pivot, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.pivot != null && message.hasOwnProperty("pivot")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify(message.pivot); + if (error) + return "pivot." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.pivot != null) { + if (typeof object.pivot !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.pivot: object expected"); + message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.fromObject(object.pivot); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.pivot != null && message.hasOwnProperty("pivot")) { + object.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.toObject(message.pivot, options); + if (options.oneofs) + object.oneOrderBy = "pivot"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + OrderBy.PivotOrderBy = (function() { + + /** + * Properties of a PivotOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @interface IPivotOrderBy + * @property {string|null} [metricName] PivotOrderBy metricName + * @property {Array.|null} [pivotSelections] PivotOrderBy pivotSelections + */ + + /** + * Constructs a new PivotOrderBy. + * @memberof google.analytics.data.v1beta.OrderBy + * @classdesc Represents a PivotOrderBy. + * @implements IPivotOrderBy + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set + */ + function PivotOrderBy(properties) { + this.pivotSelections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PivotOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + */ + PivotOrderBy.prototype.metricName = ""; + + /** + * PivotOrderBy pivotSelections. + * @member {Array.} pivotSelections + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + */ + PivotOrderBy.prototype.pivotSelections = $util.emptyArray; + + /** + * Creates a new PivotOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy instance + */ + PivotOrderBy.create = function create(properties) { + return new PivotOrderBy(properties); + }; + + /** + * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.pivotSelections != null && message.pivotSelections.length) + for (var i = 0; i < message.pivotSelections.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.encode(message.pivotSelections[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.pivotSelections && message.pivotSelections.length)) + message.pivotSelections = []; + message.pivotSelections.push($root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotOrderBy message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + if (message.pivotSelections != null && message.hasOwnProperty("pivotSelections")) { + if (!Array.isArray(message.pivotSelections)) + return "pivotSelections: array expected"; + for (var i = 0; i < message.pivotSelections.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify(message.pivotSelections[i]); + if (error) + return "pivotSelections." + error; + } + } + return null; + }; + + /** + * Creates a PivotOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy + */ + PivotOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.pivotSelections) { + if (!Array.isArray(object.pivotSelections)) + throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: array expected"); + message.pivotSelections = []; + for (var i = 0; i < object.pivotSelections.length; ++i) { + if (typeof object.pivotSelections[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: object expected"); + message.pivotSelections[i] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.fromObject(object.pivotSelections[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy} message PivotOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotSelections = []; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + if (message.pivotSelections && message.pivotSelections.length) { + object.pivotSelections = []; + for (var j = 0; j < message.pivotSelections.length; ++j) + object.pivotSelections[j] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.toObject(message.pivotSelections[j], options); + } + return object; + }; + + /** + * Converts this PivotOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @instance + * @returns {Object.} JSON object + */ + PivotOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy"; + }; + + PivotOrderBy.PivotSelection = (function() { + + /** + * Properties of a PivotSelection. + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @interface IPivotSelection + * @property {string|null} [dimensionName] PivotSelection dimensionName + * @property {string|null} [dimensionValue] PivotSelection dimensionValue + */ + + /** + * Constructs a new PivotSelection. + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy + * @classdesc Represents a PivotSelection. + * @implements IPivotSelection + * @constructor + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set + */ + function PivotSelection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PivotSelection dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + */ + PivotSelection.prototype.dimensionName = ""; + + /** + * PivotSelection dimensionValue. + * @member {string} dimensionValue + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + */ + PivotSelection.prototype.dimensionValue = ""; + + /** + * Creates a new PivotSelection instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection instance + */ + PivotSelection.create = function create(properties) { + return new PivotSelection(properties); + }; + + /** + * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotSelection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.dimensionValue != null && Object.hasOwnProperty.call(message, "dimensionValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimensionValue); + return writer; + }; + + /** + * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotSelection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotSelection message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotSelection.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.dimensionValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotSelection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotSelection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotSelection message. + * @function verify + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotSelection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) + if (!$util.isString(message.dimensionValue)) + return "dimensionValue: string expected"; + return null; + }; + + /** + * Creates a PivotSelection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection + */ + PivotSelection.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + return object; + var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + if (object.dimensionValue != null) + message.dimensionValue = String(object.dimensionValue); + return message; + }; + + /** + * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} message PivotSelection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotSelection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.dimensionValue = ""; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) + object.dimensionValue = message.dimensionValue; + return object; + }; + + /** + * Converts this PivotSelection to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @instance + * @returns {Object.} JSON object + */ + PivotSelection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotSelection + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotSelection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection"; + }; + + return PivotSelection; + })(); + + return PivotOrderBy; + })(); + + return OrderBy; + })(); + + v1beta.Pivot = (function() { + + /** + * Properties of a Pivot. + * @memberof google.analytics.data.v1beta + * @interface IPivot + * @property {Array.|null} [fieldNames] Pivot fieldNames + * @property {Array.|null} [orderBys] Pivot orderBys + * @property {number|Long|null} [offset] Pivot offset + * @property {number|Long|null} [limit] Pivot limit + * @property {Array.|null} [metricAggregations] Pivot metricAggregations + */ + + /** + * Constructs a new Pivot. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Pivot. + * @implements IPivot + * @constructor + * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set + */ + function Pivot(properties) { + this.fieldNames = []; + this.orderBys = []; + this.metricAggregations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pivot fieldNames. + * @member {Array.} fieldNames + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.fieldNames = $util.emptyArray; + + /** + * Pivot orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.orderBys = $util.emptyArray; + + /** + * Pivot offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Pivot limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Pivot metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1beta.Pivot + * @instance + */ + Pivot.prototype.metricAggregations = $util.emptyArray; + + /** + * Creates a new Pivot instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Pivot} Pivot instance + */ + Pivot.create = function create(properties) { + return new Pivot(properties); + }; + + /** + * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pivot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldNames != null && message.fieldNames.length) + for (var i = 0; i < message.fieldNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldNames[i]); + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pivot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pivot message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Pivot} Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pivot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Pivot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fieldNames && message.fieldNames.length)) + message.fieldNames = []; + message.fieldNames.push(reader.string()); + break; + } + case 2: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); + break; + } + case 3: { + message.offset = reader.int64(); + break; + } + case 4: { + message.limit = reader.int64(); + break; + } + case 5: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pivot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Pivot} Pivot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pivot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pivot message. + * @function verify + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pivot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldNames != null && message.hasOwnProperty("fieldNames")) { + if (!Array.isArray(message.fieldNames)) + return "fieldNames: array expected"; + for (var i = 0; i < message.fieldNames.length; ++i) + if (!$util.isString(message.fieldNames[i])) + return "fieldNames: string[] expected"; + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a Pivot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Pivot} Pivot + */ + Pivot.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Pivot) + return object; + var message = new $root.google.analytics.data.v1beta.Pivot(); + if (object.fieldNames) { + if (!Array.isArray(object.fieldNames)) + throw TypeError(".google.analytics.data.v1beta.Pivot.fieldNames: array expected"); + message.fieldNames = []; + for (var i = 0; i < object.fieldNames.length; ++i) + message.fieldNames[i] = String(object.fieldNames[i]); + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1beta.Pivot.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Pivot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {google.analytics.data.v1beta.Pivot} message Pivot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pivot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fieldNames = []; + object.orderBys = []; + object.metricAggregations = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.fieldNames && message.fieldNames.length) { + object.fieldNames = []; + for (var j = 0; j < message.fieldNames.length; ++j) + object.fieldNames[j] = message.fieldNames[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + return object; + }; + + /** + * Converts this Pivot to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Pivot + * @instance + * @returns {Object.} JSON object + */ + Pivot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Pivot + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Pivot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pivot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Pivot"; + }; + + return Pivot; + })(); + + v1beta.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1beta + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1beta.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1beta.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1beta.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1beta.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1beta.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1beta.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1beta.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1beta.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1beta.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1beta.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1beta.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1beta.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1beta.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {google.analytics.data.v1beta.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1beta.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1beta.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1beta + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1beta.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set + */ + function Cohort(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1beta.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1beta.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1beta.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Cohort) + return object; + var message = new $root.google.analytics.data.v1beta.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1beta.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {google.analytics.data.v1beta.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Cohort"; + }; + + return Cohort; + })(); + + v1beta.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1beta + * @interface ICohortsRange + * @property {google.analytics.data.v1beta.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1beta.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1beta.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {google.analytics.data.v1beta.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1beta.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1beta.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1beta + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1beta.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {google.analytics.data.v1beta.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + v1beta.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1beta + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1beta.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1beta.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1beta.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1beta.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) + object.dataLossFromOtherRow = false; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1beta.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1beta.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; + + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; + })(); + + v1beta.SamplingMetadata = (function() { + + /** + * Properties of a SamplingMetadata. + * @memberof google.analytics.data.v1beta + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + */ + + /** + * Constructs a new SamplingMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata + * @constructor + * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set + */ + function SamplingMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + */ + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SamplingMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata instance + */ + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); + }; + + /** + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + return writer; + }; + + /** + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.SamplingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.samplesReadCount = reader.int64(); + break; + } + case 2: { + message.samplingSpaceSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SamplingMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SamplingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; + return null; + }; + + /** + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata + */ + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.SamplingMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {google.analytics.data.v1beta.SamplingMetadata} message SamplingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SamplingMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; + } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + return object; + }; + + /** + * Converts this SamplingMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @instance + * @returns {Object.} JSON object + */ + SamplingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + v1beta.DimensionHeader = (function() { + + /** + * Properties of a DimensionHeader. + * @memberof google.analytics.data.v1beta + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name + */ + + /** + * Constructs a new DimensionHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader + * @constructor + * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set + */ + function DimensionHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1beta.DimensionHeader + * @instance + */ + DimensionHeader.prototype.name = ""; + + /** + * Creates a new DimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader instance + */ + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); + }; + + /** + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader + */ + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionHeader) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {google.analytics.data.v1beta.DimensionHeader} message DimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionHeader + * @instance + * @returns {Object.} JSON object + */ + DimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionHeader"; + }; + + return DimensionHeader; + })(); + + v1beta.MetricHeader = (function() { + + /** + * Properties of a MetricHeader. + * @memberof google.analytics.data.v1beta + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricHeader type + */ + + /** + * Constructs a new MetricHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader + * @constructor + * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set + */ + function MetricHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + */ + MetricHeader.prototype.name = ""; + + /** + * MetricHeader type. + * @member {google.analytics.data.v1beta.MetricType} type + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader instance + */ + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); + }; + + /** + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + return null; + }; + + /** + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader + */ + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricHeader) + return object; + var message = new $root.google.analytics.data.v1beta.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {google.analytics.data.v1beta.MetricHeader} message MetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; + return object; + }; + + /** + * Converts this MetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricHeader + * @instance + * @returns {Object.} JSON object + */ + MetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricHeader"; + }; + + return MetricHeader; + })(); + + v1beta.PivotHeader = (function() { + + /** + * Properties of a PivotHeader. + * @memberof google.analytics.data.v1beta + * @interface IPivotHeader + * @property {Array.|null} [pivotDimensionHeaders] PivotHeader pivotDimensionHeaders + * @property {number|null} [rowCount] PivotHeader rowCount + */ + + /** + * Constructs a new PivotHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PivotHeader. + * @implements IPivotHeader + * @constructor + * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set + */ + function PivotHeader(properties) { + this.pivotDimensionHeaders = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PivotHeader pivotDimensionHeaders. + * @member {Array.} pivotDimensionHeaders + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + */ + PivotHeader.prototype.pivotDimensionHeaders = $util.emptyArray; + + /** + * PivotHeader rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + */ + PivotHeader.prototype.rowCount = 0; + + /** + * Creates a new PivotHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader instance + */ + PivotHeader.create = function create(properties) { + return new PivotHeader(properties); + }; + + /** + * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pivotDimensionHeaders != null && message.pivotDimensionHeaders.length) + for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) + $root.google.analytics.data.v1beta.PivotDimensionHeader.encode(message.pivotDimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rowCount); + return writer; + }; + + /** + * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pivotDimensionHeaders && message.pivotDimensionHeaders.length)) + message.pivotDimensionHeaders = []; + message.pivotDimensionHeaders.push($root.google.analytics.data.v1beta.PivotDimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + message.rowCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pivotDimensionHeaders != null && message.hasOwnProperty("pivotDimensionHeaders")) { + if (!Array.isArray(message.pivotDimensionHeaders)) + return "pivotDimensionHeaders: array expected"; + for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1beta.PivotDimensionHeader.verify(message.pivotDimensionHeaders[i]); + if (error) + return "pivotDimensionHeaders." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + return null; + }; + + /** + * Creates a PivotHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader + */ + PivotHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PivotHeader) + return object; + var message = new $root.google.analytics.data.v1beta.PivotHeader(); + if (object.pivotDimensionHeaders) { + if (!Array.isArray(object.pivotDimensionHeaders)) + throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: array expected"); + message.pivotDimensionHeaders = []; + for (var i = 0; i < object.pivotDimensionHeaders.length; ++i) { + if (typeof object.pivotDimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: object expected"); + message.pivotDimensionHeaders[i] = $root.google.analytics.data.v1beta.PivotDimensionHeader.fromObject(object.pivotDimensionHeaders[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + return message; + }; + + /** + * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {google.analytics.data.v1beta.PivotHeader} message PivotHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pivotDimensionHeaders = []; + if (options.defaults) + object.rowCount = 0; + if (message.pivotDimensionHeaders && message.pivotDimensionHeaders.length) { + object.pivotDimensionHeaders = []; + for (var j = 0; j < message.pivotDimensionHeaders.length; ++j) + object.pivotDimensionHeaders[j] = $root.google.analytics.data.v1beta.PivotDimensionHeader.toObject(message.pivotDimensionHeaders[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + return object; + }; + + /** + * Converts this PivotHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PivotHeader + * @instance + * @returns {Object.} JSON object + */ + PivotHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PivotHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PivotHeader"; + }; + + return PivotHeader; + })(); + + v1beta.PivotDimensionHeader = (function() { + + /** + * Properties of a PivotDimensionHeader. + * @memberof google.analytics.data.v1beta + * @interface IPivotDimensionHeader + * @property {Array.|null} [dimensionValues] PivotDimensionHeader dimensionValues + */ + + /** + * Constructs a new PivotDimensionHeader. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PivotDimensionHeader. + * @implements IPivotDimensionHeader + * @constructor + * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set + */ + function PivotDimensionHeader(properties) { + this.dimensionValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PivotDimensionHeader dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @instance + */ + PivotDimensionHeader.prototype.dimensionValues = $util.emptyArray; + + /** + * Creates a new PivotDimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader instance + */ + PivotDimensionHeader.create = function create(properties) { + return new PivotDimensionHeader(properties); + }; + + /** + * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotDimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PivotDimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotDimensionHeader.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PivotDimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PivotDimensionHeader message. + * @function verify + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PivotDimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + return null; + }; + + /** + * Creates a PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader + */ + PivotDimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PivotDimensionHeader) + return object; + var message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {google.analytics.data.v1beta.PivotDimensionHeader} message PivotDimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PivotDimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); + } + return object; + }; + + /** + * Converts this PivotDimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @instance + * @returns {Object.} JSON object + */ + PivotDimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PivotDimensionHeader + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PivotDimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PivotDimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PivotDimensionHeader"; + }; + + return PivotDimensionHeader; + })(); + + v1beta.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.analytics.data.v1beta + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues + */ + + /** + * Constructs a new Row. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1beta.Row + * @instance + */ + Row.prototype.dimensionValues = $util.emptyArray; + + /** + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1beta.Row + * @instance + */ + Row.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1beta.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1beta.MetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1beta.MetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.Row) + return object; + var message = new $root.google.analytics.data.v1beta.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1beta.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1beta.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1beta.MetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {google.analytics.data.v1beta.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1beta.MetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.Row"; + }; + + return Row; + })(); + + v1beta.DimensionValue = (function() { + + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1beta + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ + + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; + + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {google.analytics.data.v1beta.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionValue"; + }; + + return DimensionValue; + })(); + + v1beta.MetricValue = (function() { + + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1beta + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ + + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set + */ + function MetricValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + */ + MetricValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; + + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; + + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricValue) + return object; + var message = new $root.google.analytics.data.v1beta.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {google.analytics.data.v1beta.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; + + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricValue"; + }; + + return MetricValue; + })(); + + v1beta.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1beta + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.NumericValue) + return object; + var message = new $root.google.analytics.data.v1beta.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {google.analytics.data.v1beta.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.NumericValue"; + }; + + return NumericValue; + })(); + + v1beta.PropertyQuota = (function() { + + /** + * Properties of a PropertyQuota. + * @memberof google.analytics.data.v1beta + * @interface IPropertyQuota + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new PropertyQuota. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota + * @constructor + * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set + */ + function PropertyQuota(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerDay = null; + + /** + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota instance + */ + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); + }; + + /** + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PropertyQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyQuota message. + * @function verify + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota + */ + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.PropertyQuota) + return object; + var message = new $root.google.analytics.data.v1beta.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {google.analytics.data.v1beta.PropertyQuota} message PropertyQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this PropertyQuota to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.PropertyQuota + * @instance + * @returns {Object.} JSON object + */ + PropertyQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyQuota + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.PropertyQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.PropertyQuota"; + }; + + return PropertyQuota; + })(); + + v1beta.QuotaStatus = (function() { + + /** + * Properties of a QuotaStatus. + * @memberof google.analytics.data.v1beta + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining + */ + + /** + * Constructs a new QuotaStatus. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus + * @constructor + * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set + */ + function QuotaStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuotaStatus consumed. + * @member {number|null|undefined} consumed + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + */ + QuotaStatus.prototype.consumed = null; + + /** + * QuotaStatus remaining. + * @member {number|null|undefined} remaining + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + */ + QuotaStatus.prototype.remaining = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuotaStatus.prototype, "_consumed", { + get: $util.oneOfGetter($oneOfFields = ["consumed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuotaStatus.prototype, "_remaining", { + get: $util.oneOfGetter($oneOfFields = ["remaining"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus instance + */ + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); + }; + + /** + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaStatus message. + * @function verify + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumed != null && message.hasOwnProperty("consumed")) { + properties._consumed = 1; + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + } + if (message.remaining != null && message.hasOwnProperty("remaining")) { + properties._remaining = 1; + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + } + return null; + }; + + /** + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus + */ + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.QuotaStatus) + return object; + var message = new $root.google.analytics.data.v1beta.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {google.analytics.data.v1beta.QuotaStatus} message QuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.consumed != null && message.hasOwnProperty("consumed")) { + object.consumed = message.consumed; + if (options.oneofs) + object._consumed = "consumed"; + } + if (message.remaining != null && message.hasOwnProperty("remaining")) { + object.remaining = message.remaining; + if (options.oneofs) + object._remaining = "remaining"; + } + return object; + }; + + /** + * Converts this QuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.QuotaStatus + * @instance + * @returns {Object.} JSON object + */ + QuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaStatus + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.QuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.QuotaStatus"; + }; + + return QuotaStatus; + })(); + + v1beta.DimensionMetadata = (function() { + + /** + * Properties of a DimensionMetadata. + * @memberof google.analytics.data.v1beta + * @interface IDimensionMetadata + * @property {string|null} [apiName] DimensionMetadata apiName + * @property {string|null} [uiName] DimensionMetadata uiName + * @property {string|null} [description] DimensionMetadata description + * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames + * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition + * @property {string|null} [category] DimensionMetadata category + */ + + /** + * Constructs a new DimensionMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionMetadata. + * @implements IDimensionMetadata + * @constructor + * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set + */ + function DimensionMetadata(properties) { + this.deprecatedApiNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.apiName = ""; + + /** + * DimensionMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.uiName = ""; + + /** + * DimensionMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.description = ""; + + /** + * DimensionMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * DimensionMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.customDefinition = false; + + /** + * DimensionMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.category = ""; + + /** + * Creates a new DimensionMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata instance + */ + DimensionMetadata.create = function create(properties) { + return new DimensionMetadata(properties); + }; + + /** + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.category); + return writer; + }; + + /** + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.customDefinition = reader.bool(); + break; + } + case 7: { + message.category = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + return null; + }; + + /** + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata + */ + DimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1beta.DimensionMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.category != null) + message.category = String(object.category); + return message; + }; + + /** + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {google.analytics.data.v1beta.DimensionMetadata} message DimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deprecatedApiNames = []; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + return object; + }; + + /** + * Converts this DimensionMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + DimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionMetadata"; + }; + + return DimensionMetadata; + })(); + + v1beta.MetricMetadata = (function() { + + /** + * Properties of a MetricMetadata. + * @memberof google.analytics.data.v1beta + * @interface IMetricMetadata + * @property {string|null} [apiName] MetricMetadata apiName + * @property {string|null} [uiName] MetricMetadata uiName + * @property {string|null} [description] MetricMetadata description + * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames + * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricMetadata type + * @property {string|null} [expression] MetricMetadata expression + * @property {boolean|null} [customDefinition] MetricMetadata customDefinition + * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons + * @property {string|null} [category] MetricMetadata category + */ + + /** + * Constructs a new MetricMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricMetadata. + * @implements IMetricMetadata + * @constructor + * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set + */ + function MetricMetadata(properties) { + this.deprecatedApiNames = []; + this.blockedReasons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.apiName = ""; + + /** + * MetricMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.uiName = ""; + + /** + * MetricMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.description = ""; + + /** + * MetricMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * MetricMetadata type. + * @member {google.analytics.data.v1beta.MetricType} type + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.type = 0; + + /** + * MetricMetadata expression. + * @member {string} expression + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.expression = ""; + + /** + * MetricMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.customDefinition = false; + + /** + * MetricMetadata blockedReasons. + * @member {Array.} blockedReasons + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.blockedReasons = $util.emptyArray; + + /** + * MetricMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + */ + MetricMetadata.prototype.category = ""; + + /** + * Creates a new MetricMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata instance + */ + MetricMetadata.create = function create(properties) { + return new MetricMetadata(properties); + }; + + /** + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); + if (message.blockedReasons != null && message.blockedReasons.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockedReasons.length; ++i) + writer.int32(message.blockedReasons[i]); + writer.ldelim(); + } + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.category); + return writer; + }; + + /** + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.expression = reader.string(); + break; + } + case 7: { + message.customDefinition = reader.bool(); + break; + } + case 8: { + if (!(message.blockedReasons && message.blockedReasons.length)) + message.blockedReasons = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockedReasons.push(reader.int32()); + } else + message.blockedReasons.push(reader.int32()); + break; + } + case 10: { + message.category = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { + if (!Array.isArray(message.blockedReasons)) + return "blockedReasons: array expected"; + for (var i = 0; i < message.blockedReasons.length; ++i) + switch (message.blockedReasons[i]) { + default: + return "blockedReasons: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + return null; + }; + + /** + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata + */ + MetricMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.MetricMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1beta.MetricMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } + if (object.expression != null) + message.expression = String(object.expression); + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.blockedReasons) { + if (!Array.isArray(object.blockedReasons)) + throw TypeError(".google.analytics.data.v1beta.MetricMetadata.blockedReasons: array expected"); + message.blockedReasons = []; + for (var i = 0; i < object.blockedReasons.length; ++i) + switch (object.blockedReasons[i]) { + default: + if (typeof object.blockedReasons[i] === "number") { + message.blockedReasons[i] = object.blockedReasons[i]; + break; + } + case "BLOCKED_REASON_UNSPECIFIED": + case 0: + message.blockedReasons[i] = 0; + break; + case "NO_REVENUE_METRICS": + case 1: + message.blockedReasons[i] = 1; + break; + case "NO_COST_METRICS": + case 2: + message.blockedReasons[i] = 2; + break; + } + } + if (object.category != null) + message.category = String(object.category); + return message; + }; + + /** + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {google.analytics.data.v1beta.MetricMetadata} message MetricMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.blockedReasons = []; + } + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + object.expression = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.blockedReasons && message.blockedReasons.length) { + object.blockedReasons = []; + for (var j = 0; j < message.blockedReasons.length; ++j) + object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + return object; + }; + + /** + * Converts this MetricMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricMetadata"; + }; + + /** + * BlockedReason enum. + * @name google.analytics.data.v1beta.MetricMetadata.BlockedReason + * @enum {number} + * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value + * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value + * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value + */ + MetricMetadata.BlockedReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; + values[valuesById[2] = "NO_COST_METRICS"] = 2; + return values; + })(); + + return MetricMetadata; + })(); + + v1beta.ComparisonMetadata = (function() { + + /** + * Properties of a ComparisonMetadata. + * @memberof google.analytics.data.v1beta + * @interface IComparisonMetadata + * @property {string|null} [apiName] ComparisonMetadata apiName + * @property {string|null} [uiName] ComparisonMetadata uiName + * @property {string|null} [description] ComparisonMetadata description + */ + + /** + * Constructs a new ComparisonMetadata. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a ComparisonMetadata. + * @implements IComparisonMetadata + * @constructor + * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set + */ + function ComparisonMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComparisonMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.apiName = ""; + + /** + * ComparisonMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.uiName = ""; + + /** + * ComparisonMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.description = ""; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata instance + */ + ComparisonMetadata.create = function create(properties) { + return new ComparisonMetadata(properties); + }; + + /** + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComparisonMetadata message. + * @function verify + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComparisonMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata + */ + ComparisonMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.ComparisonMetadata) + return object; + var message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {google.analytics.data.v1beta.ComparisonMetadata} message ComparisonMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComparisonMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ComparisonMetadata to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @instance + * @returns {Object.} JSON object + */ + ComparisonMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComparisonMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.ComparisonMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.ComparisonMetadata"; + }; + + return ComparisonMetadata; + })(); + + v1beta.DimensionCompatibility = (function() { + + /** + * Properties of a DimensionCompatibility. + * @memberof google.analytics.data.v1beta + * @interface IDimensionCompatibility + * @property {google.analytics.data.v1beta.IDimensionMetadata|null} [dimensionMetadata] DimensionCompatibility dimensionMetadata + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] DimensionCompatibility compatibility + */ + + /** + * Constructs a new DimensionCompatibility. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a DimensionCompatibility. + * @implements IDimensionCompatibility + * @constructor + * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set + */ + function DimensionCompatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionCompatibility dimensionMetadata. + * @member {google.analytics.data.v1beta.IDimensionMetadata|null|undefined} dimensionMetadata + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + */ + DimensionCompatibility.prototype.dimensionMetadata = null; + + /** + * DimensionCompatibility compatibility. + * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + */ + DimensionCompatibility.prototype.compatibility = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DimensionCompatibility.prototype, "_dimensionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["dimensionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DimensionCompatibility.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DimensionCompatibility instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility instance + */ + DimensionCompatibility.create = function create(properties) { + return new DimensionCompatibility(properties); + }; + + /** + * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionCompatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionMetadata != null && Object.hasOwnProperty.call(message, "dimensionMetadata")) + $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensionMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); + return writer; + }; + + /** + * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionCompatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionCompatibility.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.compatibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionCompatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionCompatibility message. + * @function verify + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionCompatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { + properties._dimensionMetadata = 1; + { + var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensionMetadata); + if (error) + return "dimensionMetadata." + error; + } + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a DimensionCompatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility + */ + DimensionCompatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.DimensionCompatibility) + return object; + var message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); + if (object.dimensionMetadata != null) { + if (typeof object.dimensionMetadata !== "object") + throw TypeError(".google.analytics.data.v1beta.DimensionCompatibility.dimensionMetadata: object expected"); + message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensionMetadata); + } + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibility = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibility = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {google.analytics.data.v1beta.DimensionCompatibility} message DimensionCompatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionCompatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { + object.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensionMetadata, options); + if (options.oneofs) + object._dimensionMetadata = "dimensionMetadata"; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + return object; + }; + + /** + * Converts this DimensionCompatibility to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @instance + * @returns {Object.} JSON object + */ + DimensionCompatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionCompatibility + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.DimensionCompatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionCompatibility"; + }; + + return DimensionCompatibility; + })(); + + v1beta.MetricCompatibility = (function() { + + /** + * Properties of a MetricCompatibility. + * @memberof google.analytics.data.v1beta + * @interface IMetricCompatibility + * @property {google.analytics.data.v1beta.IMetricMetadata|null} [metricMetadata] MetricCompatibility metricMetadata + * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] MetricCompatibility compatibility + */ + + /** + * Constructs a new MetricCompatibility. + * @memberof google.analytics.data.v1beta + * @classdesc Represents a MetricCompatibility. + * @implements IMetricCompatibility + * @constructor + * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set + */ + function MetricCompatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricCompatibility metricMetadata. + * @member {google.analytics.data.v1beta.IMetricMetadata|null|undefined} metricMetadata + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + */ + MetricCompatibility.prototype.metricMetadata = null; + + /** + * MetricCompatibility compatibility. + * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + */ + MetricCompatibility.prototype.compatibility = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MetricCompatibility.prototype, "_metricMetadata", { + get: $util.oneOfGetter($oneOfFields = ["metricMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MetricCompatibility.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetricCompatibility instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility instance + */ + MetricCompatibility.create = function create(properties) { + return new MetricCompatibility(properties); + }; + + /** + * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricCompatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricMetadata != null && Object.hasOwnProperty.call(message, "metricMetadata")) + $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metricMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); + return writer; + }; + + /** + * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricCompatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricCompatibility.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricCompatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.compatibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricCompatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricCompatibility message. + * @function verify + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricCompatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { + properties._metricMetadata = 1; + { + var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metricMetadata); + if (error) + return "metricMetadata." + error; + } + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a MetricCompatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility + */ + MetricCompatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1beta.MetricCompatibility) + return object; + var message = new $root.google.analytics.data.v1beta.MetricCompatibility(); + if (object.metricMetadata != null) { + if (typeof object.metricMetadata !== "object") + throw TypeError(".google.analytics.data.v1beta.MetricCompatibility.metricMetadata: object expected"); + message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metricMetadata); + } + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "COMPATIBILITY_UNSPECIFIED": + case 0: + message.compatibility = 0; + break; + case "COMPATIBLE": + case 1: + message.compatibility = 1; + break; + case "INCOMPATIBLE": + case 2: + message.compatibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {google.analytics.data.v1beta.MetricCompatibility} message MetricCompatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricCompatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { + object.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metricMetadata, options); + if (options.oneofs) + object._metricMetadata = "metricMetadata"; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + return object; + }; + + /** + * Converts this MetricCompatibility to JSON. + * @function toJSON + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @instance + * @returns {Object.} JSON object + */ + MetricCompatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricCompatibility + * @function getTypeUrl + * @memberof google.analytics.data.v1beta.MetricCompatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1beta.MetricCompatibility"; + }; + + return MetricCompatibility; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1beta.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1beta.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1beta.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1beta.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1beta.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1beta.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + /** + * Compatibility enum. + * @name google.analytics.data.v1beta.Compatibility + * @enum {number} + * @property {number} COMPATIBILITY_UNSPECIFIED=0 COMPATIBILITY_UNSPECIFIED value + * @property {number} COMPATIBLE=1 COMPATIBLE value + * @property {number} INCOMPATIBLE=2 INCOMPATIBLE value + */ + v1beta.Compatibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPATIBILITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPATIBLE"] = 1; + values[valuesById[2] = "INCOMPATIBLE"] = 2; + return values; + })(); + + return v1beta; + })(); + + return data; + })(); + + return analytics; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-analytics-data/protos/protos.json b/owl-bot-staging/google-analytics-data/protos/protos.json new file mode 100644 index 000000000000..1fbae0bb7ac9 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/protos/protos.json @@ -0,0 +1,7286 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "analytics": { + "nested": { + "data": { + "nested": { + "v1alpha": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data", + "java_multiple_files": true, + "java_outer_classname": "ReportingApiProto", + "java_package": "com.google.analytics.data.v1alpha", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource_definition).pattern": "properties/{property}" + }, + "nested": { + "AlphaAnalyticsData": { + "options": { + "(google.api.default_host)": "analyticsdata.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" + }, + "methods": { + "RunFunnelReport": { + "requestType": "RunFunnelReportRequest", + "responseType": "RunFunnelReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:runFunnelReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:runFunnelReport", + "body": "*" + } + } + ] + }, + "CreateAudienceList": { + "requestType": "CreateAudienceListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.http).body": "audience_list", + "(google.api.method_signature)": "parent,audience_list", + "(google.longrunning.operation_info).response_type": "AudienceList", + "(google.longrunning.operation_info).metadata_type": "AudienceListMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/audienceLists", + "body": "audience_list" + } + }, + { + "(google.api.method_signature)": "parent,audience_list" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AudienceList", + "metadata_type": "AudienceListMetadata" + } + } + ] + }, + "QueryAudienceList": { + "requestType": "QueryAudienceListRequest", + "responseType": "QueryAudienceListResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audienceLists/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudienceList": { + "requestType": "GetAudienceListRequest", + "responseType": "AudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/audienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/audienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudienceLists": { + "requestType": "ListAudienceListsRequest", + "responseType": "ListAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/audienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/audienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateRecurringAudienceList": { + "requestType": "CreateRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.http).body": "recurring_audience_list", + "(google.api.method_signature)": "parent,recurring_audience_list" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "body": "recurring_audience_list" + } + }, + { + "(google.api.method_signature)": "parent,recurring_audience_list" + } + ] + }, + "GetRecurringAudienceList": { + "requestType": "GetRecurringAudienceListRequest", + "responseType": "RecurringAudienceList", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListRecurringAudienceLists": { + "requestType": "ListRecurringAudienceListsRequest", + "responseType": "ListRecurringAudienceListsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/recurringAudienceLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/recurringAudienceLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPropertyQuotasSnapshot": { + "requestType": "GetPropertyQuotasSnapshotRequest", + "responseType": "PropertyQuotasSnapshot", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReportTask": { + "requestType": "CreateReportTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.http).body": "report_task", + "(google.api.method_signature)": "parent,report_task", + "(google.longrunning.operation_info).response_type": "ReportTask", + "(google.longrunning.operation_info).metadata_type": "ReportTaskMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/reportTasks", + "body": "report_task" + } + }, + { + "(google.api.method_signature)": "parent,report_task" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ReportTask", + "metadata_type": "ReportTaskMetadata" + } + } + ] + }, + "QueryReportTask": { + "requestType": "QueryReportTaskRequest", + "responseType": "QueryReportTaskResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/reportTasks/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetReportTask": { + "requestType": "GetReportTaskRequest", + "responseType": "ReportTask", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/reportTasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/reportTasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReportTasks": { + "requestType": "ListReportTasksRequest", + "responseType": "ListReportTasksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/reportTasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/reportTasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RunReport": { + "requestType": "RunReportRequest", + "responseType": "RunReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:runReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:runReport", + "body": "*" + } + } + ] + }, + "GetMetadata": { + "requestType": "GetMetadataRequest", + "responseType": "Metadata", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/metadata}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/metadata}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateRecurringAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "recurringAudienceList": { + "type": "RecurringAudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RecurringAudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/RecurringAudienceList", + "(google.api.resource).pattern": "properties/{property}/recurringAudienceLists/{recurring_audience_list}", + "(google.api.resource).plural": "recurringAudienceLists", + "(google.api.resource).singular": "recurringAudienceList" + }, + "oneofs": { + "_activeDaysRemaining": { + "oneof": [ + "activeDaysRemaining" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDaysRemaining": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "audienceLists": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "WebhookNotification": { + "oneofs": { + "_uri": { + "oneof": [ + "uri" + ] + }, + "_channelToken": { + "oneof": [ + "channelToken" + ] + } + }, + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "channelToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "GetRecurringAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + } + } + }, + "ListRecurringAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRecurringAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "recurringAudienceLists": { + "rule": "repeated", + "type": "RecurringAudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "GetPropertyQuotasSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" + } + } + } + }, + "PropertyQuotasSnapshot": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot", + "(google.api.resource).pattern": "properties/{property}/propertyQuotasSnapshot", + "(google.api.resource).plural": "propertyQuotasSnapshots", + "(google.api.resource).singular": "propertyQuotasSnapshot" + }, + "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "corePropertyQuota": { + "type": "PropertyQuota", + "id": 1 + }, + "realtimePropertyQuota": { + "type": "PropertyQuota", + "id": 2 + }, + "funnelPropertyQuota": { + "type": "PropertyQuota", + "id": 3 + } + } + }, + "GetAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" + } + } + } + }, + "ListAudienceListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAudienceListsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "audienceLists": { + "rule": "repeated", + "type": "AudienceList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateAudienceListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" + } + }, + "audienceList": { + "type": "AudienceList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceList": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceList", + "(google.api.resource).pattern": "properties/{property}/audienceLists/{audience_list}", + "(google.api.resource).plural": "audienceLists", + "(google.api.resource).singular": "audienceList" + }, + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_percentageCompleted": { + "oneof": [ + "percentageCompleted" + ] + }, + "_recurringAudienceList": { + "oneof": [ + "recurringAudienceList" + ] + }, + "_webhookNotification": { + "oneof": [ + "webhookNotification" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowCount": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "percentageCompleted": { + "type": "double", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recurringAudienceList": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "webhookNotification": { + "type": "WebhookNotification", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + }, + "AudienceListMetadata": { + "fields": {} + }, + "QueryAudienceListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryAudienceListResponse": { + "oneofs": { + "_audienceList": { + "oneof": [ + "audienceList" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + } + }, + "fields": { + "audienceList": { + "type": "AudienceList", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceRows": { + "rule": "repeated", + "type": "AudienceRow", + "id": 2 + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "AudienceRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AudienceDimensionValue", + "id": 1 + } + } + }, + "AudienceDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceDimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "RunFunnelReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnel": { + "type": "Funnel", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelBreakdown": { + "type": "FunnelBreakdown", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelNextAction": { + "type": "FunnelNextAction", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "funnelVisualizationType": { + "type": "FunnelVisualizationType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "segments": { + "rule": "repeated", + "type": "Segment", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnPropertyQuota": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "FunnelVisualizationType": { + "values": { + "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": 0, + "STANDARD_FUNNEL": 1, + "TRENDED_FUNNEL": 2 + } + } + } + }, + "RunFunnelReportResponse": { + "fields": { + "funnelTable": { + "type": "FunnelSubReport", + "id": 1 + }, + "funnelVisualization": { + "type": "FunnelSubReport", + "id": 2 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 3 + }, + "kind": { + "type": "string", + "id": 4 + } + } + }, + "ReportTask": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/ReportTask", + "(google.api.resource).pattern": "properties/{property}/reportTasks/{report_task}", + "(google.api.resource).plural": "reportTasks", + "(google.api.resource).singular": "reportTask" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportDefinition": { + "type": "ReportDefinition", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "reportMetadata": { + "type": "ReportMetadata", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ReportDefinition": { + "oneofs": { + "_samplingLevel": { + "oneof": [ + "samplingLevel" + ] + } + }, + "fields": { + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "keepEmptyRows": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "samplingLevel": { + "type": "SamplingLevel", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ReportMetadata": { + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_taskRowCount": { + "oneof": [ + "taskRowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_totalRowCount": { + "oneof": [ + "totalRowCount" + ] + } + }, + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "taskRowCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "totalRowCount": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + } + } + }, + "CreateReportTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "reportTask": { + "type": "ReportTask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReportTaskMetadata": { + "fields": {} + }, + "QueryReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryReportTaskResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + } + } + }, + "GetReportTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/ReportTask" + } + } + } + }, + "ListReportTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReportTasksResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "reportTasks": { + "rule": "repeated", + "type": "ReportTask", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "RunReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "keepEmptyRows": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnPropertyQuota": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversionSpec": { + "type": "ConversionSpec", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunReportResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 9 + }, + "kind": { + "type": "string", + "id": 10 + }, + "nextPageToken": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + } + } + }, + "GetMetadataRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" + } + } + } + }, + "Metadata": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", + "(google.api.resource).pattern": "properties/{property}/metadata" + }, + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "dimensions": { + "rule": "repeated", + "type": "DimensionMetadata", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "MetricMetadata", + "id": 2 + }, + "comparisons": { + "rule": "repeated", + "type": "ComparisonMetadata", + "id": 4 + }, + "conversions": { + "rule": "repeated", + "type": "ConversionMetadata", + "id": 5 + } + } + }, + "DateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "Dimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimensionExpression": { + "type": "DimensionExpression", + "id": 2 + } + } + }, + "DimensionExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "lowerCase", + "upperCase", + "concatenate" + ] + } + }, + "fields": { + "lowerCase": { + "type": "CaseExpression", + "id": 4 + }, + "upperCase": { + "type": "CaseExpression", + "id": 5 + }, + "concatenate": { + "type": "ConcatenateExpression", + "id": 6 + } + }, + "nested": { + "CaseExpression": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "ConcatenateExpression": { + "fields": { + "dimensionNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Metric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expression": { + "type": "string", + "id": 2 + }, + "invisible": { + "type": "bool", + "id": 3 + } + } + }, + "Comparison": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "oneComparison": { + "oneof": [ + "dimensionFilter", + "comparison" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 2 + }, + "comparison": { + "type": "string", + "id": 3 + } + } + }, + "FilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FilterExpression", + "id": 3 + }, + "filter": { + "type": "Filter", + "id": 4 + } + } + }, + "FilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FilterExpression", + "id": 1 + } + } + }, + "Filter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter", + "emptyFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 5 + }, + "emptyFilter": { + "type": "EmptyFilter", + "id": 6 + } + } + }, + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "OrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "desc": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "EmptyFilter": { + "fields": {} + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "CohortSpec": { + "fields": { + "cohorts": { + "rule": "repeated", + "type": "Cohort", + "id": 1 + }, + "cohortsRange": { + "type": "CohortsRange", + "id": 2 + }, + "cohortReportSettings": { + "type": "CohortReportSettings", + "id": 3 + } + } + }, + "Cohort": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimension": { + "type": "string", + "id": 2 + }, + "dateRange": { + "type": "DateRange", + "id": 3 + } + } + }, + "CohortsRange": { + "fields": { + "granularity": { + "type": "Granularity", + "id": 1 + }, + "startOffset": { + "type": "int32", + "id": 2 + }, + "endOffset": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Granularity": { + "values": { + "GRANULARITY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2, + "MONTHLY": 3 + } + } + } + }, + "CohortReportSettings": { + "fields": { + "accumulate": { + "type": "bool", + "id": 1 + } + } + }, + "Section": { + "values": { + "SECTION_UNSPECIFIED": 0, + "SECTION_REPORT": 1, + "SECTION_ADVERTISING": 2 + } + }, + "ResponseMetaData": { + "oneofs": { + "_schemaRestrictionResponse": { + "oneof": [ + "schemaRestrictionResponse" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_timeZone": { + "oneof": [ + "timeZone" + ] + }, + "_emptyReason": { + "oneof": [ + "emptyReason" + ] + }, + "_subjectToThresholding": { + "oneof": [ + "subjectToThresholding" + ] + } + }, + "fields": { + "dataLossFromOtherRow": { + "type": "bool", + "id": 3 + }, + "schemaRestrictionResponse": { + "type": "SchemaRestrictionResponse", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "timeZone": { + "type": "string", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "emptyReason": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "subjectToThresholding": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 9 + }, + "section": { + "type": "Section", + "id": 10 + } + }, + "nested": { + "SchemaRestrictionResponse": { + "fields": { + "activeMetricRestrictions": { + "rule": "repeated", + "type": "ActiveMetricRestriction", + "id": 1 + } + }, + "nested": { + "ActiveMetricRestriction": { + "oneofs": { + "_metricName": { + "oneof": [ + "metricName" + ] + } + }, + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "restrictedMetricTypes": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 2 + } + } + } + } + } + } + }, + "DimensionHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MetricType", + "id": 2 + } + } + }, + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "MetricValue", + "id": 2 + } + } + }, + "DimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "MetricValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 4 + } + } + }, + "PropertyQuota": { + "fields": { + "tokensPerDay": { + "type": "QuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "QuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "QuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "QuotaStatus", + "id": 4 + }, + "potentiallyThresholdedRequestsPerHour": { + "type": "QuotaStatus", + "id": 5 + }, + "tokensPerProjectPerHour": { + "type": "QuotaStatus", + "id": 6 + } + } + }, + "QuotaStatus": { + "fields": { + "consumed": { + "type": "int32", + "id": 1 + }, + "remaining": { + "type": "int32", + "id": 2 + } + } + }, + "FunnelBreakdown": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "breakdownDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelNextAction": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "nextActionDimension": { + "type": "Dimension", + "id": 1 + }, + "limit": { + "type": "int64", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "Funnel": { + "fields": { + "isOpenFunnel": { + "type": "bool", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "FunnelStep", + "id": 2 + } + } + }, + "FunnelStep": { + "oneofs": { + "_withinDurationFromPriorStep": { + "oneof": [ + "withinDurationFromPriorStep" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "isDirectlyFollowedBy": { + "type": "bool", + "id": 2 + }, + "withinDurationFromPriorStep": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "filterExpression": { + "type": "FunnelFilterExpression", + "id": 4 + } + } + }, + "FunnelSubReport": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "metadata": { + "type": "FunnelResponseMetadata", + "id": 4 + } + } + }, + "UserSegment": { + "fields": { + "userInclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "UserSegmentExclusion", + "id": 2 + } + } + }, + "UserSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "UserSegmentConditionGroup", + "id": 1 + }, + "andSequenceGroups": { + "rule": "repeated", + "type": "UserSegmentSequenceGroup", + "id": 2 + } + } + }, + "UserCriteriaScoping": { + "values": { + "USER_CRITERIA_SCOPING_UNSPECIFIED": 0, + "USER_CRITERIA_WITHIN_SAME_EVENT": 1, + "USER_CRITERIA_WITHIN_SAME_SESSION": 2, + "USER_CRITERIA_ACROSS_ALL_SESSIONS": 3 + } + }, + "UserSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "UserSegmentSequenceGroup": { + "fields": { + "sequenceScoping": { + "type": "UserCriteriaScoping", + "id": 1 + }, + "sequenceMaximumDuration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "userSequenceSteps": { + "rule": "repeated", + "type": "UserSequenceStep", + "id": 3 + } + } + }, + "UserSequenceStep": { + "fields": { + "isDirectlyFollowedBy": { + "type": "bool", + "id": 1 + }, + "stepScoping": { + "type": "UserCriteriaScoping", + "id": 2 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 3 + } + } + }, + "UserSegmentExclusion": { + "fields": { + "userExclusionDuration": { + "type": "UserExclusionDuration", + "id": 1 + }, + "userExclusionCriteria": { + "type": "UserSegmentCriteria", + "id": 2 + } + } + }, + "UserExclusionDuration": { + "values": { + "USER_EXCLUSION_DURATION_UNSPECIFIED": 0, + "USER_EXCLUSION_TEMPORARY": 1, + "USER_EXCLUSION_PERMANENT": 2 + } + }, + "SessionSegment": { + "fields": { + "sessionInclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "SessionSegmentExclusion", + "id": 2 + } + } + }, + "SessionSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "SessionSegmentConditionGroup", + "id": 1 + } + } + }, + "SessionCriteriaScoping": { + "values": { + "SESSION_CRITERIA_SCOPING_UNSPECIFIED": 0, + "SESSION_CRITERIA_WITHIN_SAME_EVENT": 1, + "SESSION_CRITERIA_WITHIN_SAME_SESSION": 2 + } + }, + "SessionSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "SessionCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "SessionSegmentExclusion": { + "fields": { + "sessionExclusionDuration": { + "type": "SessionExclusionDuration", + "id": 1 + }, + "sessionExclusionCriteria": { + "type": "SessionSegmentCriteria", + "id": 2 + } + } + }, + "SessionExclusionDuration": { + "values": { + "SESSION_EXCLUSION_DURATION_UNSPECIFIED": 0, + "SESSION_EXCLUSION_TEMPORARY": 1, + "SESSION_EXCLUSION_PERMANENT": 2 + } + }, + "EventSegment": { + "fields": { + "eventInclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 1 + }, + "exclusion": { + "type": "EventSegmentExclusion", + "id": 2 + } + } + }, + "EventSegmentCriteria": { + "fields": { + "andConditionGroups": { + "rule": "repeated", + "type": "EventSegmentConditionGroup", + "id": 1 + } + } + }, + "EventCriteriaScoping": { + "values": { + "EVENT_CRITERIA_SCOPING_UNSPECIFIED": 0, + "EVENT_CRITERIA_WITHIN_SAME_EVENT": 1 + } + }, + "EventSegmentConditionGroup": { + "fields": { + "conditionScoping": { + "type": "EventCriteriaScoping", + "id": 1 + }, + "segmentFilterExpression": { + "type": "SegmentFilterExpression", + "id": 2 + } + } + }, + "EventSegmentExclusion": { + "fields": { + "eventExclusionDuration": { + "type": "EventExclusionDuration", + "id": 1 + }, + "eventExclusionCriteria": { + "type": "EventSegmentCriteria", + "id": 2 + } + } + }, + "EventExclusionDuration": { + "values": { + "EVENT_EXCLUSION_DURATION_UNSPECIFIED": 0, + "EVENT_EXCLUSION_PERMANENT": 1 + } + }, + "Segment": { + "oneofs": { + "oneSegmentScope": { + "oneof": [ + "userSegment", + "sessionSegment", + "eventSegment" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "userSegment": { + "type": "UserSegment", + "id": 2 + }, + "sessionSegment": { + "type": "SessionSegment", + "id": 3 + }, + "eventSegment": { + "type": "EventSegment", + "id": 4 + } + } + }, + "SegmentFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentFilter", + "segmentEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentFilterExpression", + "id": 3 + }, + "segmentFilter": { + "type": "SegmentFilter", + "id": 4 + }, + "segmentEventFilter": { + "type": "SegmentEventFilter", + "id": 5 + } + } + }, + "SegmentFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentFilterExpression", + "id": 1 + } + } + }, + "SegmentFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentFilterScoping", + "id": 8 + } + } + }, + "SegmentFilterScoping": { + "oneofs": { + "_atAnyPointInTime": { + "oneof": [ + "atAnyPointInTime" + ] + } + }, + "fields": { + "atAnyPointInTime": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_segmentParameterFilterExpression": { + "oneof": [ + "segmentParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "segmentParameterFilterExpression": { + "type": "SegmentParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "SegmentParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "segmentParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "SegmentParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "SegmentParameterFilterExpression", + "id": 3 + }, + "segmentParameterFilter": { + "type": "SegmentParameterFilter", + "id": 4 + } + } + }, + "SegmentParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "SegmentParameterFilterExpression", + "id": 1 + } + } + }, + "SegmentParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + }, + "filterScoping": { + "type": "SegmentParameterFilterScoping", + "id": 8 + } + } + }, + "SegmentParameterFilterScoping": { + "oneofs": { + "_inAnyNDayPeriod": { + "oneof": [ + "inAnyNDayPeriod" + ] + } + }, + "fields": { + "inAnyNDayPeriod": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelFieldFilter", + "funnelEventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelFilterExpression", + "id": 3 + }, + "funnelFieldFilter": { + "type": "FunnelFieldFilter", + "id": 4 + }, + "funnelEventFilter": { + "type": "FunnelEventFilter", + "id": 5 + } + } + }, + "FunnelFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelFilterExpression", + "id": 1 + } + } + }, + "FunnelFieldFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelEventFilter": { + "oneofs": { + "_eventName": { + "oneof": [ + "eventName" + ] + }, + "_funnelParameterFilterExpression": { + "oneof": [ + "funnelParameterFilterExpression" + ] + } + }, + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "funnelParameterFilterExpression": { + "type": "FunnelParameterFilterExpression", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "FunnelParameterFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "funnelParameterFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FunnelParameterFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FunnelParameterFilterExpression", + "id": 3 + }, + "funnelParameterFilter": { + "type": "FunnelParameterFilter", + "id": 4 + } + } + }, + "FunnelParameterFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FunnelParameterFilterExpression", + "id": 1 + } + } + }, + "FunnelParameterFilter": { + "oneofs": { + "oneParameter": { + "oneof": [ + "eventParameterName", + "itemParameterName" + ] + }, + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "eventParameterName": { + "type": "string", + "id": 1 + }, + "itemParameterName": { + "type": "string", + "id": 2 + }, + "stringFilter": { + "type": "StringFilter", + "id": 4 + }, + "inListFilter": { + "type": "InListFilter", + "id": 5 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 6 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 7 + } + } + }, + "FunnelResponseMetadata": { + "fields": { + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 1 + } + } + }, + "SamplingMetadata": { + "fields": { + "samplesReadCount": { + "type": "int64", + "id": 1 + }, + "samplingSpaceSize": { + "type": "int64", + "id": 2 + } + } + }, + "MetricAggregation": { + "values": { + "METRIC_AGGREGATION_UNSPECIFIED": 0, + "TOTAL": 1, + "MINIMUM": 5, + "MAXIMUM": 6, + "COUNT": 4 + } + }, + "MetricType": { + "values": { + "METRIC_TYPE_UNSPECIFIED": 0, + "TYPE_INTEGER": 1, + "TYPE_FLOAT": 2, + "TYPE_SECONDS": 4, + "TYPE_MILLISECONDS": 5, + "TYPE_MINUTES": 6, + "TYPE_HOURS": 7, + "TYPE_STANDARD": 8, + "TYPE_CURRENCY": 9, + "TYPE_FEET": 10, + "TYPE_MILES": 11, + "TYPE_METERS": 12, + "TYPE_KILOMETERS": 13 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + }, + "SamplingLevel": { + "values": { + "SAMPLING_LEVEL_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "UNSAMPLED": 3 + } + }, + "ConversionSpec": { + "fields": { + "conversionActions": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "attributionModel": { + "type": "AttributionModel", + "id": 2 + } + }, + "nested": { + "AttributionModel": { + "values": { + "ATTRIBUTION_MODEL_UNSPECIFIED": 0, + "DATA_DRIVEN": 1, + "LAST_CLICK": 2 + } + } + } + }, + "DimensionMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customDefinition": { + "type": "bool", + "id": 5 + }, + "category": { + "type": "string", + "id": 6 + }, + "sections": { + "rule": "repeated", + "type": "Section", + "id": 7 + } + } + }, + "MetricMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "type": { + "type": "MetricType", + "id": 5 + }, + "expression": { + "type": "string", + "id": 6 + }, + "customDefinition": { + "type": "bool", + "id": 7 + }, + "blockedReasons": { + "rule": "repeated", + "type": "BlockedReason", + "id": 8 + }, + "category": { + "type": "string", + "id": 9 + }, + "sections": { + "rule": "repeated", + "type": "Section", + "id": 10 + } + }, + "nested": { + "BlockedReason": { + "values": { + "BLOCKED_REASON_UNSPECIFIED": 0, + "NO_REVENUE_METRICS": 1, + "NO_COST_METRICS": 2 + } + } + } + }, + "ComparisonMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + }, + "ConversionMetadata": { + "fields": { + "conversionAction": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + } + } + }, + "v1beta": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1beta;data", + "java_multiple_files": true, + "java_outer_classname": "ReportingApiProto", + "java_package": "com.google.analytics.data.v1beta", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource_definition).pattern": "properties/{property}" + }, + "nested": { + "BetaAnalyticsData": { + "options": { + "(google.api.default_host)": "analyticsdata.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" + }, + "methods": { + "RunReport": { + "requestType": "RunReportRequest", + "responseType": "RunReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runReport", + "body": "*" + } + } + ] + }, + "RunPivotReport": { + "requestType": "RunPivotReportRequest", + "responseType": "RunPivotReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runPivotReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runPivotReport", + "body": "*" + } + } + ] + }, + "BatchRunReports": { + "requestType": "BatchRunReportsRequest", + "responseType": "BatchRunReportsResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunReports", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:batchRunReports", + "body": "*" + } + } + ] + }, + "BatchRunPivotReports": { + "requestType": "BatchRunPivotReportsRequest", + "responseType": "BatchRunPivotReportsResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunPivotReports", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:batchRunPivotReports", + "body": "*" + } + } + ] + }, + "GetMetadata": { + "requestType": "GetMetadataRequest", + "responseType": "Metadata", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/metadata}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/metadata}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "RunRealtimeReport": { + "requestType": "RunRealtimeReportRequest", + "responseType": "RunRealtimeReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:runRealtimeReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:runRealtimeReport", + "body": "*" + } + } + ] + }, + "CheckCompatibility": { + "requestType": "CheckCompatibilityRequest", + "responseType": "CheckCompatibilityResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:checkCompatibility", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:checkCompatibility", + "body": "*" + } + } + ] + }, + "CreateAudienceExport": { + "requestType": "CreateAudienceExportRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/audienceExports", + "(google.api.http).body": "audience_export", + "(google.api.method_signature)": "parent,audience_export", + "(google.longrunning.operation_info).response_type": "AudienceExport", + "(google.longrunning.operation_info).metadata_type": "AudienceExportMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/audienceExports", + "body": "audience_export" + } + }, + { + "(google.api.method_signature)": "parent,audience_export" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AudienceExport", + "metadata_type": "AudienceExportMetadata" + } + } + ] + }, + "QueryAudienceExport": { + "requestType": "QueryAudienceExportRequest", + "responseType": "QueryAudienceExportResponse", + "options": { + "(google.api.http).post": "/v1beta/{name=properties/*/audienceExports/*}:query", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=properties/*/audienceExports/*}:query", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudienceExport": { + "requestType": "GetAudienceExportRequest", + "responseType": "AudienceExport", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/audienceExports/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/audienceExports/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudienceExports": { + "requestType": "ListAudienceExportsRequest", + "responseType": "ListAudienceExportsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/audienceExports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/audienceExports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CheckCompatibilityRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 4 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 5 + }, + "compatibilityFilter": { + "type": "Compatibility", + "id": 6 + } + } + }, + "CheckCompatibilityResponse": { + "fields": { + "dimensionCompatibilities": { + "rule": "repeated", + "type": "DimensionCompatibility", + "id": 1 + }, + "metricCompatibilities": { + "rule": "repeated", + "type": "MetricCompatibility", + "id": 2 + } + } + }, + "Metadata": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", + "(google.api.resource).pattern": "properties/{property}/metadata" + }, + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "dimensions": { + "rule": "repeated", + "type": "DimensionMetadata", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "MetricMetadata", + "id": 2 + }, + "comparisons": { + "rule": "repeated", + "type": "ComparisonMetadata", + "id": 4 + } + } + }, + "RunReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6 + }, + "offset": { + "type": "int64", + "id": 7 + }, + "limit": { + "type": "int64", + "id": 8 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10 + }, + "currencyCode": { + "type": "string", + "id": 11 + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12 + }, + "keepEmptyRows": { + "type": "bool", + "id": 13 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 14 + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 9 + }, + "kind": { + "type": "string", + "id": 10 + } + } + }, + "RunPivotReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4 + }, + "pivots": { + "rule": "repeated", + "type": "Pivot", + "id": 5 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 6 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 7 + }, + "currencyCode": { + "type": "string", + "id": 8 + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 9 + }, + "keepEmptyRows": { + "type": "bool", + "id": 10 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 11 + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunPivotReportResponse": { + "fields": { + "pivotHeaders": { + "rule": "repeated", + "type": "PivotHeader", + "id": 1 + }, + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 2 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 3 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "aggregates": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 6 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 7 + }, + "kind": { + "type": "string", + "id": 8 + } + } + }, + "BatchRunReportsRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "requests": { + "rule": "repeated", + "type": "RunReportRequest", + "id": 2 + } + } + }, + "BatchRunReportsResponse": { + "fields": { + "reports": { + "rule": "repeated", + "type": "RunReportResponse", + "id": 1 + }, + "kind": { + "type": "string", + "id": 2 + } + } + }, + "BatchRunPivotReportsRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "requests": { + "rule": "repeated", + "type": "RunPivotReportRequest", + "id": 2 + } + } + }, + "BatchRunPivotReportsResponse": { + "fields": { + "pivotReports": { + "rule": "repeated", + "type": "RunPivotReportResponse", + "id": 1 + }, + "kind": { + "type": "string", + "id": 2 + } + } + }, + "GetMetadataRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" + } + } + } + }, + "RunRealtimeReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3 + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 4 + }, + "metricFilter": { + "type": "FilterExpression", + "id": 5 + }, + "limit": { + "type": "int64", + "id": 6 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 7 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 8 + }, + "returnPropertyQuota": { + "type": "bool", + "id": 9 + }, + "minuteRanges": { + "rule": "repeated", + "type": "MinuteRange", + "id": 10 + } + } + }, + "RunRealtimeReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 8 + }, + "kind": { + "type": "string", + "id": 9 + } + } + }, + "GetAudienceExportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceExport" + } + } + } + }, + "ListAudienceExportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAudienceExportsResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "audienceExports": { + "rule": "repeated", + "type": "AudienceExport", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateAudienceExportRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" + } + }, + "audienceExport": { + "type": "AudienceExport", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceExport": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceExport", + "(google.api.resource).pattern": "properties/{property}/audienceExports/{audience_export}", + "(google.api.resource).plural": "audienceExports", + "(google.api.resource).singular": "audienceExport" + }, + "oneofs": { + "_state": { + "oneof": [ + "state" + ] + }, + "_beginCreatingTime": { + "oneof": [ + "beginCreatingTime" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + }, + "_errorMessage": { + "oneof": [ + "errorMessage" + ] + }, + "_percentageCompleted": { + "oneof": [ + "percentageCompleted" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "audienceDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dimensions": { + "rule": "repeated", + "type": "AudienceDimension", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "beginCreatingTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "creationQuotaTokensCharged": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rowCount": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "errorMessage": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "percentageCompleted": { + "type": "double", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "FAILED": 3 + } + } + } + }, + "AudienceExportMetadata": { + "fields": {} + }, + "QueryAudienceExportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "offset": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryAudienceExportResponse": { + "oneofs": { + "_audienceExport": { + "oneof": [ + "audienceExport" + ] + }, + "_rowCount": { + "oneof": [ + "rowCount" + ] + } + }, + "fields": { + "audienceExport": { + "type": "AudienceExport", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "audienceRows": { + "rule": "repeated", + "type": "AudienceRow", + "id": 2 + }, + "rowCount": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "AudienceRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AudienceDimensionValue", + "id": 1 + } + } + }, + "AudienceDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceDimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "DateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "MinuteRange": { + "oneofs": { + "_startMinutesAgo": { + "oneof": [ + "startMinutesAgo" + ] + }, + "_endMinutesAgo": { + "oneof": [ + "endMinutesAgo" + ] + } + }, + "fields": { + "startMinutesAgo": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "endMinutesAgo": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "Dimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimensionExpression": { + "type": "DimensionExpression", + "id": 2 + } + } + }, + "DimensionExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "lowerCase", + "upperCase", + "concatenate" + ] + } + }, + "fields": { + "lowerCase": { + "type": "CaseExpression", + "id": 4 + }, + "upperCase": { + "type": "CaseExpression", + "id": 5 + }, + "concatenate": { + "type": "ConcatenateExpression", + "id": 6 + } + }, + "nested": { + "CaseExpression": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "ConcatenateExpression": { + "fields": { + "dimensionNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Metric": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expression": { + "type": "string", + "id": 2 + }, + "invisible": { + "type": "bool", + "id": 3 + } + } + }, + "Comparison": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "oneComparison": { + "oneof": [ + "dimensionFilter", + "comparison" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 2 + }, + "comparison": { + "type": "string", + "id": 3 + } + } + }, + "FilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "FilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "FilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "FilterExpression", + "id": 3 + }, + "filter": { + "type": "Filter", + "id": 4 + } + } + }, + "FilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "FilterExpression", + "id": 1 + } + } + }, + "Filter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter", + "emptyFilter" + ] + } + }, + "fields": { + "fieldName": { + "type": "string", + "id": 1 + }, + "stringFilter": { + "type": "StringFilter", + "id": 3 + }, + "inListFilter": { + "type": "InListFilter", + "id": 4 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 5 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 6 + }, + "emptyFilter": { + "type": "EmptyFilter", + "id": 8 + } + }, + "nested": { + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "EmptyFilter": { + "fields": {} + } + } + }, + "OrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension", + "pivot" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "pivot": { + "type": "PivotOrderBy", + "id": 3 + }, + "desc": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + }, + "PivotOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + }, + "pivotSelections": { + "rule": "repeated", + "type": "PivotSelection", + "id": 2 + } + }, + "nested": { + "PivotSelection": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "dimensionValue": { + "type": "string", + "id": 2 + } + } + } + } + } + } + }, + "Pivot": { + "fields": { + "fieldNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 2 + }, + "offset": { + "type": "int64", + "id": 3 + }, + "limit": { + "type": "int64", + "id": 4 + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 5 + } + } + }, + "CohortSpec": { + "fields": { + "cohorts": { + "rule": "repeated", + "type": "Cohort", + "id": 1 + }, + "cohortsRange": { + "type": "CohortsRange", + "id": 2 + }, + "cohortReportSettings": { + "type": "CohortReportSettings", + "id": 3 + } + } + }, + "Cohort": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dimension": { + "type": "string", + "id": 2 + }, + "dateRange": { + "type": "DateRange", + "id": 3 + } + } + }, + "CohortsRange": { + "fields": { + "granularity": { + "type": "Granularity", + "id": 1 + }, + "startOffset": { + "type": "int32", + "id": 2 + }, + "endOffset": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Granularity": { + "values": { + "GRANULARITY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2, + "MONTHLY": 3 + } + } + } + }, + "CohortReportSettings": { + "fields": { + "accumulate": { + "type": "bool", + "id": 1 + } + } + }, + "ResponseMetaData": { + "oneofs": { + "_schemaRestrictionResponse": { + "oneof": [ + "schemaRestrictionResponse" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_timeZone": { + "oneof": [ + "timeZone" + ] + }, + "_emptyReason": { + "oneof": [ + "emptyReason" + ] + }, + "_subjectToThresholding": { + "oneof": [ + "subjectToThresholding" + ] + } + }, + "fields": { + "dataLossFromOtherRow": { + "type": "bool", + "id": 3 + }, + "schemaRestrictionResponse": { + "type": "SchemaRestrictionResponse", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "timeZone": { + "type": "string", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "emptyReason": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "subjectToThresholding": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "samplingMetadatas": { + "rule": "repeated", + "type": "SamplingMetadata", + "id": 9 + } + }, + "nested": { + "SchemaRestrictionResponse": { + "fields": { + "activeMetricRestrictions": { + "rule": "repeated", + "type": "ActiveMetricRestriction", + "id": 1 + } + }, + "nested": { + "ActiveMetricRestriction": { + "oneofs": { + "_metricName": { + "oneof": [ + "metricName" + ] + } + }, + "fields": { + "metricName": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "restrictedMetricTypes": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 2 + } + } + } + } + } + } + }, + "SamplingMetadata": { + "fields": { + "samplesReadCount": { + "type": "int64", + "id": 1 + }, + "samplingSpaceSize": { + "type": "int64", + "id": 2 + } + } + }, + "DimensionHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "MetricHeader": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MetricType", + "id": 2 + } + } + }, + "PivotHeader": { + "fields": { + "pivotDimensionHeaders": { + "rule": "repeated", + "type": "PivotDimensionHeader", + "id": 1 + }, + "rowCount": { + "type": "int32", + "id": 2 + } + } + }, + "PivotDimensionHeader": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + } + } + }, + "Row": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "DimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "MetricValue", + "id": 2 + } + } + }, + "DimensionValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "MetricValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 4 + } + } + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "PropertyQuota": { + "fields": { + "tokensPerDay": { + "type": "QuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "QuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "QuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "QuotaStatus", + "id": 4 + }, + "potentiallyThresholdedRequestsPerHour": { + "type": "QuotaStatus", + "id": 5 + }, + "tokensPerProjectPerHour": { + "type": "QuotaStatus", + "id": 6 + } + } + }, + "QuotaStatus": { + "oneofs": { + "_consumed": { + "oneof": [ + "consumed" + ] + }, + "_remaining": { + "oneof": [ + "remaining" + ] + } + }, + "fields": { + "consumed": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "remaining": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DimensionMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customDefinition": { + "type": "bool", + "id": 5 + }, + "category": { + "type": "string", + "id": 7 + } + } + }, + "MetricMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "type": { + "type": "MetricType", + "id": 5 + }, + "expression": { + "type": "string", + "id": 6 + }, + "customDefinition": { + "type": "bool", + "id": 7 + }, + "blockedReasons": { + "rule": "repeated", + "type": "BlockedReason", + "id": 8 + }, + "category": { + "type": "string", + "id": 10 + } + }, + "nested": { + "BlockedReason": { + "values": { + "BLOCKED_REASON_UNSPECIFIED": 0, + "NO_REVENUE_METRICS": 1, + "NO_COST_METRICS": 2 + } + } + } + }, + "ComparisonMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + }, + "DimensionCompatibility": { + "oneofs": { + "_dimensionMetadata": { + "oneof": [ + "dimensionMetadata" + ] + }, + "_compatibility": { + "oneof": [ + "compatibility" + ] + } + }, + "fields": { + "dimensionMetadata": { + "type": "DimensionMetadata", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "compatibility": { + "type": "Compatibility", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "MetricCompatibility": { + "oneofs": { + "_metricMetadata": { + "oneof": [ + "metricMetadata" + ] + }, + "_compatibility": { + "oneof": [ + "compatibility" + ] + } + }, + "fields": { + "metricMetadata": { + "type": "MetricMetadata", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "compatibility": { + "type": "Compatibility", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "MetricAggregation": { + "values": { + "METRIC_AGGREGATION_UNSPECIFIED": 0, + "TOTAL": 1, + "MINIMUM": 5, + "MAXIMUM": 6, + "COUNT": 4 + } + }, + "MetricType": { + "values": { + "METRIC_TYPE_UNSPECIFIED": 0, + "TYPE_INTEGER": 1, + "TYPE_FLOAT": 2, + "TYPE_SECONDS": 4, + "TYPE_MILLISECONDS": 5, + "TYPE_MINUTES": 6, + "TYPE_HOURS": 7, + "TYPE_STANDARD": 8, + "TYPE_CURRENCY": 9, + "TYPE_FEET": 10, + "TYPE_MILES": 11, + "TYPE_METERS": 12, + "TYPE_KILOMETERS": 13 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + }, + "Compatibility": { + "values": { + "COMPATIBILITY_UNSPECIFIED": 0, + "COMPATIBLE": 1, + "INCOMPATIBLE": 2 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js new file mode 100644 index 000000000000..15b16b3b3bd5 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, audienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience list to create. + */ + // const audienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateAudienceList() { + // Construct request + const request = { + parent, + audienceList, + }; + + // Run request + const [operation] = await dataClient.createAudienceList(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js new file mode 100644 index 000000000000..8f0191c9de12 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, recurringAudienceList) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The recurring audience list to create. + */ + // const recurringAudienceList = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateRecurringAudienceList() { + // Construct request + const request = { + parent, + recurringAudienceList, + }; + + // Run request + const response = await dataClient.createRecurringAudienceList(request); + console.log(response); + } + + callCreateRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js new file mode 100644 index 000000000000..857b8f2607e2 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, reportTask) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + */ + // const parent = 'abc123' + /** + * Required. The report task configuration to create. + */ + // const reportTask = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callCreateReportTask() { + // Construct request + const request = { + parent, + reportTask, + }; + + // Run request + const [operation] = await dataClient.createReportTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js new file mode 100644 index 000000000000..974c23f8c6dc --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceList(request); + console.log(response); + } + + callGetAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js new file mode 100644 index 000000000000..141b5dbb8310 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see where to find + * your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234/metadata + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetMetadata() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getMetadata(request); + console.log(response); + } + + callGetMetadata(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js new file mode 100644 index 000000000000..ab6868a024c9 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetPropertyQuotasSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getPropertyQuotasSnapshot(request); + console.log(response); + } + + callGetPropertyQuotasSnapshot(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js new file mode 100644 index 000000000000..0b76c80ddead --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetRecurringAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getRecurringAudienceList(request); + console.log(response); + } + + callGetRecurringAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js new file mode 100644 index 000000000000..2d12025959fa --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + */ + // const name = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callGetReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getReportTask(request); + console.log(response); + } + + callGetReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js new file mode 100644 index 000000000000..73f1aef4b81a --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js new file mode 100644 index 000000000000..c7eae4b5dba1 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js @@ -0,0 +1,80 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListRecurringAudienceLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listRecurringAudienceListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRecurringAudienceLists(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js new file mode 100644 index 000000000000..59859b310ab5 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of report tasks to return. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callListReportTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listReportTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportTasks(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js new file mode 100644 index 000000000000..a2258729106f --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js @@ -0,0 +1,83 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryAudienceList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceList(request); + console.log(response); + } + + callQueryAudienceList(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js new file mode 100644 index 000000000000..9a116b2f6c8d --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The report source name. + * Format: `properties/{property}/reportTasks/{report}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callQueryReportTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryReportTask(request); + console.log(response); + } + + callQueryReportTask(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js new file mode 100644 index 000000000000..5478fa26dee4 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js @@ -0,0 +1,132 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + */ + // const dateRanges = [1,2,3,4] + /** + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + */ + // const funnel = {} + /** + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + */ + // const funnelBreakdown = {} + /** + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + */ + // const funnelNextAction = {} + /** + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + */ + // const funnelVisualizationType = {} + /** + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * The segments parameter is optional. Requests are limited to 4 segments. + */ + // const segments = [1,2,3,4] + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + */ + // const limit = 1234 + /** + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see Creating a Report: Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callRunFunnelReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runFunnelReport(request); + console.log(response); + } + + callRunFunnelReport(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js new file mode 100644 index 000000000000..8f7ec38b2119 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js @@ -0,0 +1,172 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(property) { + // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Optional. The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * Optional. The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. In a cohort request, + * this `dateRanges` must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Optional. Dimension filters let you ask for only specific dimension values + * in the report. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Optional. The filter clause of metrics. Applied after aggregating the + * report's rows, similar to SQL having-clause. Dimensions cannot be used in + * this filter. + */ + // const metricFilter = {} + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The maximum number of rows to return. If unspecified, 10,000 rows + * are returned. The API returns a maximum of 250,000 rows per request, no + * matter how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * Optional. Aggregation of metrics. Aggregated metric values will be shown in + * rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + */ + // const metricAggregations = [1,2,3,4] + /** + * Optional. Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + */ + // const orderBys = [1,2,3,4] + /** + * Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Optional. Cohort group associated with this request. If there is a cohort + * group in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * Optional. If false or unspecified, each row with all metrics equal to 0 + * will not be returned. If true, these rows will be returned if they are not + * separately removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Optional. Toggles whether to return the current state of this Google + * Analytics property's quota. Quota is returned in + * PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + */ + // const comparisons = [1,2,3,4] + /** + * Optional. Controls conversion reporting. This field is optional. If this + * field is set or any conversion metrics are requested, the report will be a + * conversion report. + */ + // const conversionSpec = {} + + // Imports the Data library + const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; + + // Instantiates a client + const dataClient = new AlphaAnalyticsDataClient(); + + async function callRunReport() { + // Construct request + const request = { + property, + }; + + // Run request + const response = await dataClient.runReport(request); + console.log(response); + } + + callRunReport(); + // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json new file mode 100644 index 000000000000..b45ca265fd75 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -0,0 +1,763 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async", + "title": "AlphaAnalyticsData runFunnelReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see [GA4 Funnel Explorations](https://support.google.com/analytics/answer/9327974). This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Data API Funnel Reporting Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).", + "canonical": true, + "file": "alpha_analytics_data.run_funnel_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 124, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "funnel", + "type": ".google.analytics.data.v1alpha.Funnel" + }, + { + "name": "funnel_breakdown", + "type": ".google.analytics.data.v1alpha.FunnelBreakdown" + }, + { + "name": "funnel_next_action", + "type": ".google.analytics.data.v1alpha.FunnelNextAction" + }, + { + "name": "funnel_visualization_type", + "type": ".google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType" + }, + { + "name": "segments", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.data.v1alpha.RunFunnelReportResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "RunFunnelReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async", + "title": "AlphaAnalyticsData createAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience list for later retrieval. This method quickly returns the audience list's resource name and initiates a long running asynchronous request to form an audience list. To list the users in an audience list, first create the audience list through this method and then send the audience resource name to the `QueryAudienceList` method. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. An audience list is a snapshot of the users currently in the audience at the time of audience list creation. Creating audience lists for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience lists contain the users in each audience. This method is available at beta stability at [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_list", + "type": ".google.analytics.data.v1alpha.AudienceList" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async", + "title": "AlphaAnalyticsData queryAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience list of users. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to retrieve the users in the audience list. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is available at beta stability at [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.query_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryAudienceListResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async", + "title": "AlphaAnalyticsData getAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience list. This method can be used to understand an audience list after it has been created. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.AudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async", + "title": "AlphaAnalyticsData listAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience lists for a property. This method can be used for you to find and reuse existing audience lists rather than creating unnecessary new audience lists. The same audience can have multiple audience lists that represent the list of users that were in an audience on different days. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async", + "title": "AlphaAnalyticsData createRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Creates a recurring audience list. Recurring audience lists produces new audience lists each day. Audience lists are users in an audience at the time of the list's creation. A recurring audience list ensures that you have audience list based on the most recent data available for use each day. If you manually create audience list, you don't know when an audience list based on an additional day's data is available. This recurring audience list automates the creation of an audience list when an additional day's data is available. You will consume fewer quota tokens by using recurring audience list versus manually creating audience list at various times of day trying to guess when an additional day's data is ready. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.create_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "recurring_audience_list", + "type": ".google.analytics.data.v1alpha.RecurringAudienceList" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async", + "title": "AlphaAnalyticsData getRecurringAudienceList Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific recurring audience list. This method can be used to understand a recurring audience list's state after it has been created. For example, a recurring audience list resource will generate audience list instances for each day, and this method can be used to get the resource name of the most recent audience list instance. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.get_recurring_audience_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetRecurringAudienceList", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async", + "title": "AlphaAnalyticsData listRecurringAudienceLists Sample", + "origin": "API_DEFINITION", + "description": " Lists all recurring audience lists for a property. This method can be used for you to find and reuse existing recurring audience lists rather than creating unnecessary new recurring audience lists. The same audience can have multiple recurring audience lists that represent different dimension combinations; for example, just the dimension `deviceId` or both the dimensions `deviceId` and `userId`. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "alpha_analytics_data.list_recurring_audience_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListRecurringAudienceLists", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async", + "title": "AlphaAnalyticsData getPropertyQuotasSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Get all property quotas organized by quota category for a given property. This will charge 1 property quota from the category with the most quota.", + "canonical": true, + "file": "alpha_analytics_data.get_property_quotas_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.PropertyQuotasSnapshot", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetPropertyQuotasSnapshot", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async", + "title": "AlphaAnalyticsData createReportTask Sample", + "origin": "API_DEFINITION", + "description": " Initiates the creation of a report task. This method quickly returns a report task and initiates a long running asynchronous request to form a customized report of your Google Analytics event data. A report task will be retained and available for querying for 72 hours after it has been created. A report task created by one user can be listed and queried by all users who have access to the property.", + "canonical": true, + "file": "alpha_analytics_data.create_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "report_task", + "type": ".google.analytics.data.v1alpha.ReportTask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async", + "title": "AlphaAnalyticsData queryReportTask Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a report task's content. After requesting the `CreateReportTask`, you are able to retrieve the report content once the report is ACTIVE. This method will return an error if the report task's state is not `ACTIVE`. A query response will return the tabular row & column values of the report.", + "canonical": true, + "file": "alpha_analytics_data.query_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1alpha.QueryReportTaskResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async", + "title": "AlphaAnalyticsData getReportTask Sample", + "origin": "API_DEFINITION", + "description": " Gets report metadata about a specific report task. After creating a report task, use this method to check its processing state or inspect its report definition.", + "canonical": true, + "file": "alpha_analytics_data.get_report_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ReportTask", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetReportTask", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async", + "title": "AlphaAnalyticsData listReportTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists all report tasks for a property.", + "canonical": true, + "file": "alpha_analytics_data.list_report_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.ListReportTasksResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "ListReportTasks", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async", + "title": "AlphaAnalyticsData runReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.", + "canonical": true, + "file": "alpha_analytics_data.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 164, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1alpha.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "conversion_spec", + "type": ".google.analytics.data.v1alpha.ConversionSpec" + } + ], + "resultType": ".google.analytics.data.v1alpha.RunReportResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async", + "title": "AlphaAnalyticsData getMetadata Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "canonical": true, + "file": "alpha_analytics_data.get_metadata.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.Metadata", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js new file mode 100644 index 000000000000..406c9d00e72e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunPivotReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunPivotReports(request); + console.log(response); + } + + callBatchRunPivotReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js new file mode 100644 index 000000000000..34bd65dadbf7 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + */ + // const requests = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callBatchRunReports() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.batchRunReports(request); + console.log(response); + } + + callBatchRunReports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js new file mode 100644 index 000000000000..fe9622d5cb6e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js @@ -0,0 +1,90 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. To + * learn more, see where to find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + */ + // const metricFilter = {} + /** + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + */ + // const compatibilityFilter = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCheckCompatibility() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.checkCompatibility(request); + console.log(response); + } + + callCheckCompatibility(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js new file mode 100644 index 000000000000..ca3c867f4e4e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, audienceExport) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Required. The audience export to create. + */ + // const audienceExport = {} + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callCreateAudienceExport() { + // Construct request + const request = { + parent, + audienceExport, + }; + + // Run request + const [operation] = await dataClient.createAudienceExport(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js new file mode 100644 index 000000000000..7eb162b5ab80 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getAudienceExport(request); + console.log(response); + } + + callGetAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js new file mode 100644 index 000000000000..7b80b2ab8a36 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see where to find + * your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234/metadata + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + */ + // const name = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callGetMetadata() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.getMetadata(request); + console.log(response); + } + + callGetMetadata(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js new file mode 100644 index 000000000000..e6017e48c28b --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callListAudienceExports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataClient.listAudienceExportsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudienceExports(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js new file mode 100644 index 000000000000..cb08437fa5a8 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js @@ -0,0 +1,83 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + */ + // const name = 'abc123' + /** + * Optional. The row count of the start row. The first row is counted as row + * 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callQueryAudienceExport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataClient.queryAudienceExport(request); + console.log(response); + } + + callQueryAudienceExport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js new file mode 100644 index 000000000000..3b4d2cebd420 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js @@ -0,0 +1,135 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + */ + // const metrics = [1,2,3,4] + /** + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + */ + // const pivots = [1,2,3,4] + /** + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunPivotReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runPivotReport(request); + console.log(response); + } + + callRunPivotReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js new file mode 100644 index 000000000000..d8218ade7365 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js @@ -0,0 +1,115 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * The filter clause of dimensions. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + */ + // const orderBys = [1,2,3,4] + /** + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + */ + // const minuteRanges = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunRealtimeReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runRealtimeReport(request); + console.log(response); + } + + callRunRealtimeReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js new file mode 100644 index 000000000000..3429e8577fe9 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js @@ -0,0 +1,162 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see where to + * find your Property + * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * Example: properties/1234 + */ + // const property = 'abc123' + /** + * The dimensions requested and displayed. + */ + // const dimensions = [1,2,3,4] + /** + * The metrics requested and displayed. + */ + // const metrics = [1,2,3,4] + /** + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + */ + // const dateRanges = [1,2,3,4] + /** + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + */ + // const metricFilter = {} + /** + * The row count of the start row. The first row is counted as row 0. + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + */ + // const metricAggregations = [1,2,3,4] + /** + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + */ + // const orderBys = [1,2,3,4] + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + */ + // const currencyCode = 'abc123' + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + */ + // const cohortSpec = {} + /** + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + */ + // const keepEmptyRows = true + /** + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). + */ + // const returnPropertyQuota = true + /** + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + */ + // const comparisons = [1,2,3,4] + + // Imports the Data library + const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; + + // Instantiates a client + const dataClient = new BetaAnalyticsDataClient(); + + async function callRunReport() { + // Construct request + const request = { + }; + + // Run request + const response = await dataClient.runReport(request); + console.log(response); + } + + callRunReport(); + // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json new file mode 100644 index 000000000000..ba79913e3173 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json @@ -0,0 +1,639 @@ +{ + "clientLibrary": { + "name": "nodejs-data", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.data.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", + "title": "BetaAnalyticsData runReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).", + "canonical": true, + "file": "beta_analytics_data.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 154, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", + "title": "BetaAnalyticsData runPivotReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", + "canonical": true, + "file": "beta_analytics_data.run_pivot_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 127, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "pivots", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1beta.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunPivotReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunPivotReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async", + "title": "BetaAnalyticsData batchRunReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async", + "title": "BetaAnalyticsData batchRunPivotReports Sample", + "origin": "API_DEFINITION", + "description": " Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", + "canonical": true, + "file": "beta_analytics_data.batch_run_pivot_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.BatchRunPivotReportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "BatchRunPivotReports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", + "title": "BetaAnalyticsData getMetadata Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "canonical": true, + "file": "beta_analytics_data.get_metadata.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.Metadata", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", + "title": "BetaAnalyticsData runRealtimeReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).", + "canonical": true, + "file": "beta_analytics_data.run_realtime_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 107, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "minute_ranges", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.data.v1beta.RunRealtimeReportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "RunRealtimeReport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", + "title": "BetaAnalyticsData checkCompatibility Sample", + "origin": "API_DEFINITION", + "description": " This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.", + "canonical": true, + "file": "beta_analytics_data.check_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1beta.FilterExpression" + }, + { + "name": "compatibility_filter", + "type": ".google.analytics.data.v1beta.Compatibility" + } + ], + "resultType": ".google.analytics.data.v1beta.CheckCompatibilityResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CheckCompatibility", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async", + "title": "BetaAnalyticsData createAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.create_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience_export", + "type": ".google.analytics.data.v1beta.AudienceExport" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "CreateAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async", + "title": "BetaAnalyticsData queryAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.query_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.analytics.data.v1beta.QueryAudienceExportResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "QueryAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async", + "title": "BetaAnalyticsData getAudienceExport Sample", + "origin": "API_DEFINITION", + "description": " Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.get_audience_export.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.AudienceExport", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "GetAudienceExport", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async", + "title": "BetaAnalyticsData listAudienceExports Sample", + "origin": "API_DEFINITION", + "description": " Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "canonical": true, + "file": "beta_analytics_data.list_audience_exports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1beta.ListAudienceExportsResponse", + "client": { + "shortName": "BetaAnalyticsDataClient", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" + }, + "method": { + "shortName": "ListAudienceExports", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", + "service": { + "shortName": "BetaAnalyticsData", + "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-analytics-data/src/index.ts b/owl-bot-staging/google-analytics-data/src/index.ts new file mode 100644 index 000000000000..2d76b05e1e8e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; +type BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; + +export {v1alpha, v1beta, BetaAnalyticsDataClient}; +export default {v1alpha, v1beta, BetaAnalyticsDataClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts new file mode 100644 index 000000000000..b2010ffa7be5 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts @@ -0,0 +1,2972 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/alpha_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './alpha_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1alpha + */ +export class AlphaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + alphaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AlphaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AlphaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AlphaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceLists/{audience_list}' + ), + metadataPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/metadata' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/propertyQuotasSnapshot' + ), + recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/recurringAudienceLists/{recurring_audience_list}' + ), + reportTaskPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/reportTasks/{report_task}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'), + listRecurringAudienceLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'), + listReportTasks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceListResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceList') as gax.protobuf.Type; + const createAudienceListMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.AudienceListMetadata') as gax.protobuf.Type; + const createReportTaskResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTask') as gax.protobuf.Type; + const createReportTaskMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1alpha.ReportTaskMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceListResponse.decode.bind(createAudienceListResponse), + createAudienceListMetadata.decode.bind(createAudienceListMetadata)), + createReportTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReportTaskResponse.decode.bind(createReportTaskResponse), + createReportTaskMetadata.decode.bind(createReportTaskMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.alphaAnalyticsDataStub) { + return this.alphaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1alpha.AlphaAnalyticsData. + this.alphaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1alpha.AlphaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1alpha.AlphaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const alphaAnalyticsDataStubMethods = + ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks', 'runReport', 'getMetadata']; + for (const methodName of alphaAnalyticsDataStubMethods) { + const callPromise = this.alphaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.alphaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized funnel report of your Google Analytics event data. The + * data returned from the API is as a table with columns for the requested + * dimensions and metrics. + * + * Funnel exploration lets you visualize the steps your users take to complete + * a task and quickly see how well they are succeeding or failing at each + * step. For example, how do prospects become shoppers and then become buyers? + * How do one time buyers become repeat buyers? With this information, you can + * improve inefficient or abandoned customer journeys. To learn more, see [GA4 + * Funnel Explorations](https://support.google.com/analytics/answer/9327974). + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the [Google Analytics Data API Funnel + * Reporting + * Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.property] + * Optional. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} [request.dateRanges] + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. + * @param {google.analytics.data.v1alpha.Funnel} [request.funnel] + * Optional. The configuration of this request's funnel. This funnel + * configuration is required. + * @param {google.analytics.data.v1alpha.FunnelBreakdown} [request.funnelBreakdown] + * Optional. If specified, this breakdown adds a dimension to the funnel table + * sub report response. This breakdown dimension expands each funnel step to + * the unique values of the breakdown dimension. For example, a breakdown by + * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, + * `desktop`, and the total. + * @param {google.analytics.data.v1alpha.FunnelNextAction} [request.funnelNextAction] + * Optional. If specified, next action adds a dimension to the funnel + * visualization sub report response. This next action dimension expands each + * funnel step to the unique values of the next action. For example a next + * action of the `eventName` dimension will create rows for several events + * (for example `session_start` & `click`) and the total. + * + * Next action only supports `eventName` and most Page / Screen dimensions + * like `pageTitle` and `pagePath`. + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} [request.funnelVisualizationType] + * Optional. The funnel visualization type controls the dimensions present in + * the funnel visualization sub report response. If not specified, + * `STANDARD_FUNNEL` is used. + * @param {number[]} [request.segments] + * Optional. The configurations of segments. Segments are subsets of a + * property's data. In a funnel report with segments, the funnel is evaluated + * in each segment. + * + * Each segment specified in this request + * produces a separate row in the response; in the response, each segment + * identified by its name. + * + * The segments parameter is optional. Requests are limited to 4 segments. + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] + * Optional. Dimension filters allow you to ask for only specific dimension + * values in the report. To learn more, see [Creating a Report: Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {boolean} [request.returnPropertyQuota] + * Optional. Toggles whether to return the current state of this Analytics + * Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunFunnelReportResponse|RunFunnelReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async + */ + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined + ]>; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): void; + runFunnelReport( + request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runFunnelReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runFunnelReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runFunnelReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, + protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runFunnelReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience list of users. After creating an audience, the users + * are not immediately available for listing. First, a request to + * `CreateAudienceList` is necessary to create an audience list of users, and + * then second, this method is used to retrieve the users in the audience + * list. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * This method is available at beta stability at + * [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience list to retrieve users from. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.QueryAudienceListResponse|QueryAudienceListResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async + */ + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined + ]>; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceList( + request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('queryAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, + protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience list. This method + * can be used to understand an audience list after it has been created. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience list resource name. + * Format: `properties/{property}/audienceLists/{audience_list}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async + */ + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined + ]>; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IAudienceList, + protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a recurring audience list. Recurring audience lists produces new + * audience lists each day. Audience lists are users in an audience at the + * time of the list's creation. + * + * A recurring audience list ensures that you have audience list based on the + * most recent data available for use each day. If you manually create + * audience list, you don't know when an audience list based on an additional + * day's data is available. This recurring audience list automates the + * creation of an audience list when an additional day's data is available. + * You will consume fewer quota tokens by using recurring audience list versus + * manually creating audience list at various times of day trying to guess + * when an additional day's data is ready. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this recurring audience list will be + * created. Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.RecurringAudienceList} request.recurringAudienceList + * Required. The recurring audience list to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async + */ + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined + ]>; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + createRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('createRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific recurring audience list. This + * method can be used to understand a recurring audience list's state after it + * has been created. For example, a recurring audience list resource will + * generate audience list instances for each day, and this method can be used + * to get the resource name of the most recent audience list instance. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The recurring audience list resource name. + * Format: + * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async + */ + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined + ]>; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): void; + getRecurringAudienceList( + request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRecurringAudienceList request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRecurringAudienceList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRecurringAudienceList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList, + protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRecurringAudienceList response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get all property quotas organized by quota category for a given property. + * This will charge 1 property quota from the category with the most quota. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Quotas from this property will be listed in the response. + * Format: `properties/{property}/propertyQuotasSnapshot` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot|PropertyQuotasSnapshot}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async + */ + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined + ]>; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getPropertyQuotasSnapshot( + request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPropertyQuotasSnapshot request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPropertyQuotasSnapshot(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, + protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPropertyQuotasSnapshot response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves a report task's content. After requesting the `CreateReportTask`, + * you are able to retrieve the report content once the report is + * ACTIVE. This method will return an error if the report task's state is not + * `ACTIVE`. A query response will return the tabular row & column values of + * the report. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report source name. + * Format: `properties/{property}/reportTasks/{report}` + * @param {number} [request.offset] + * Optional. The row count of the start row in the report. The first row is + * counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return from the report. If unspecified, + * 10,000 rows are returned. The API returns a maximum of 250,000 rows per + * request, no matter how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. The number of rows + * available to a QueryReportTaskRequest is further limited by the limit of + * the associated ReportTask. A query can retrieve at most ReportTask.limit + * rows. For example, if the ReportTask has a limit of 1,000, then a + * QueryReportTask request with offset=900 and limit=500 will return at most + * 100 rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.QueryReportTaskResponse|QueryReportTaskResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.query_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async + */ + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined + ]>; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): void; + queryReportTask( + request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('queryReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, + protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets report metadata about a specific report task. After creating a report + * task, use this method to check its processing state or inspect its + * report definition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The report task resource name. + * Format: `properties/{property}/reportTasks/{report_task}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async + */ + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined + ]>; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): void; + getReportTask( + request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getReportTask request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getReportTask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getReportTask(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IReportTask, + protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, + {}|undefined + ]) => { + this._log.info('getReportTask response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized report of your Google Analytics event data. Reports + * contain statistics derived from data collected by the Google Analytics + * tracking code. The data returned from the API is as a table with columns + * for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or + * event count. Dimensions break down metrics across some common criteria, + * such as country or event name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} [request.dimensions] + * Optional. The dimensions requested and displayed. + * @param {number[]} [request.metrics] + * Optional. The metrics requested and displayed. + * @param {number[]} [request.dateRanges] + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. In a cohort request, + * this `dateRanges` must be unspecified. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] + * Optional. Dimension filters let you ask for only specific dimension values + * in the report. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.metricFilter] + * Optional. The filter clause of metrics. Applied after aggregating the + * report's rows, similar to SQL having-clause. Dimensions cannot be used in + * this filter. + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The maximum number of rows to return. If unspecified, 10,000 rows + * are returned. The API returns a maximum of 250,000 rows per request, no + * matter how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number[]} [request.metricAggregations] + * Optional. Aggregation of metrics. Aggregated metric values will be shown in + * rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + * @param {number[]} [request.orderBys] + * Optional. Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + * @param {string} [request.currencyCode] + * Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1alpha.CohortSpec} [request.cohortSpec] + * Optional. Cohort group associated with this request. If there is a cohort + * group in the request the 'cohort' dimension must be present. + * @param {boolean} [request.keepEmptyRows] + * Optional. If false or unspecified, each row with all metrics equal to 0 + * will not be returned. If true, these rows will be returned if they are not + * separately removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} [request.returnPropertyQuota] + * Optional. Toggles whether to return the current state of this Google + * Analytics property's quota. Quota is returned in + * [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + * @param {google.analytics.data.v1alpha.ConversionSpec} [request.conversionSpec] + * Optional. Controls conversion reporting. This field is optional. If this + * field is set or any conversion metrics are requested, the report will be a + * conversion report. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunReportResponse|RunReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.run_report.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async + */ + runReport( + request?: protos.google.analytics.data.v1alpha.IRunReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined + ]>; + runReport( + request: protos.google.analytics.data.v1alpha.IRunReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request: protos.google.analytics.data.v1alpha.IRunReportRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request?: protos.google.analytics.data.v1alpha.IRunReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns metadata for dimensions and metrics available in reporting methods. + * Used to explore the dimensions and metrics. In this method, a Google + * Analytics property identifier is specified in the request, and + * the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + * For example if a custom metric with parameter name `levels_unlocked` is + * registered to a property, the Metadata response will contain + * `customEvent:levels_unlocked`. Universal metadata are dimensions and + * metrics applicable to any property such as `country` and `totalUsers`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see [where to find + * your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234/metadata + * + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.Metadata|Metadata}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_metadata.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async + */ + getMetadata( + request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined + ]>; + getMetadata( + request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getMetadata request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMetadata response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMetadata(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMetadata response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience list for later retrieval. This method quickly returns + * the audience list's resource name and initiates a long running asynchronous + * request to form an audience list. To list the users in an audience list, + * first create the audience list through this method and then send the + * audience resource name to the `QueryAudienceList` method. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * An audience list is a snapshot of the users currently in the audience at + * the time of audience list creation. Creating audience lists for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience lists contain + * the users in each audience. + * + * This method is available at beta stability at + * [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). + * To give your feedback on this API, complete the [Google Analytics Audience + * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience list will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1alpha.AudienceList} request.audienceList + * Required. The audience list to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceList( + request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceList response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceList request %j', request); + return this.innerApiCalls.createAudienceList(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceList response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceList()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async + */ + async checkCreateAudienceListProgress(name: string): Promise>{ + this._log.info('createAudienceList long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceList, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Initiates the creation of a report task. This method quickly + * returns a report task and initiates a long running + * asynchronous request to form a customized report of your Google Analytics + * event data. + * + * A report task will be retained and available for querying for 72 hours + * after it has been created. + * + * A report task created by one user can be listed and queried by all users + * who have access to the property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this report task will be created. + * Format: `properties/{propertyId}` + * @param {google.analytics.data.v1alpha.ReportTask} request.reportTask + * Required. The report task configuration to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReportTask( + request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createReportTask response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createReportTask request %j', request); + return this.innerApiCalls.createReportTask(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createReportTask response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createReportTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async + */ + async checkCreateReportTaskProgress(name: string): Promise>{ + this._log.info('createReportTask long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createReportTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience lists for a property. This method can be used for you to + * find and reuse existing audience lists rather than creating unnecessary new + * audience lists. The same audience can have multiple audience lists that + * represent the list of users that were in an audience on different days. + * + * See [Creating an Audience + * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Lists with examples. + * + * This method is available at beta stability at + * [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). + * To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): void; + listAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceLists request %j', request); + return this.innerApiCalls + .listAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IAudienceList[], + protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListAudienceListsResponse + ]) => { + this._log.info('listAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists stream %j', request); + return this.descriptors.page.listAudienceLists.createStream( + this.innerApiCalls.listAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceLists`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience lists for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience lists to return. The service may + * return fewer than this value. If unspecified, at most 200 audience lists + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceLists` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async + */ + listAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceLists iterate %j', request); + return this.descriptors.page.listAudienceLists.asyncIterate( + this.innerApiCalls['listAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all recurring audience lists for a property. This method can be used + * for you to find and reuse existing recurring audience lists rather than + * creating unnecessary new recurring audience lists. The same audience can + * have multiple recurring audience lists that represent different dimension + * combinations; for example, just the dimension `deviceId` or both the + * dimensions `deviceId` and `userId`. + * + * This method is introduced at alpha stability with the intention of + * gathering feedback on syntax and capabilities before entering beta. To give + * your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; + listRecurringAudienceLists( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>): + Promise<[ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, + protos.google.analytics.data.v1alpha.IRecurringAudienceList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRecurringAudienceLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRecurringAudienceLists request %j', request); + return this.innerApiCalls + .listRecurringAudienceLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IRecurringAudienceList[], + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, + protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse + ]) => { + this._log.info('listRecurringAudienceLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRecurringAudienceLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRecurringAudienceListsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRecurringAudienceListsStream( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists stream %j', request); + return this.descriptors.page.listRecurringAudienceLists.createStream( + this.innerApiCalls.listRecurringAudienceLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRecurringAudienceLists`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All recurring audience lists for this property will be listed in + * the response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of recurring audience lists to return. The + * service may return fewer than this value. If unspecified, at most 200 + * recurring audience lists will be returned. The maximum value is 1000 + * (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListRecurringAudienceLists` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async + */ + listRecurringAudienceListsAsync( + request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRecurringAudienceLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRecurringAudienceLists iterate %j', request); + return this.descriptors.page.listRecurringAudienceLists.asyncIterate( + this.innerApiCalls['listRecurringAudienceLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all report tasks for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): void; + listReportTasks( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>, + callback?: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>): + Promise<[ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1alpha.IListReportTasksRequest, + protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, + protos.google.analytics.data.v1alpha.IReportTask>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listReportTasks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listReportTasks request %j', request); + return this.innerApiCalls + .listReportTasks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1alpha.IReportTask[], + protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, + protos.google.analytics.data.v1alpha.IListReportTasksResponse + ]) => { + this._log.info('listReportTasks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listReportTasks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listReportTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReportTasksStream( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks stream %j', request); + return this.descriptors.page.listReportTasks.createStream( + this.innerApiCalls.listReportTasks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listReportTasks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All report tasks for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of report tasks to return. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReportTasks` call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async + */ + listReportTasksAsync( + request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReportTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReportTasks iterate %j', request); + return this.descriptors.page.listReportTasks.asyncIterate( + this.innerApiCalls['listReportTasks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceList resource name string. + * + * @param {string} property + * @param {string} audience_list + * @returns {string} Resource name string. + */ + audienceListPath(property:string,audienceList:string) { + return this.pathTemplates.audienceListPathTemplate.render({ + property: property, + audience_list: audienceList, + }); + } + + /** + * Parse the property from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).property; + } + + /** + * Parse the audience_list from AudienceList resource. + * + * @param {string} audienceListName + * A fully-qualified path representing AudienceList resource. + * @returns {string} A string representing the audience_list. + */ + matchAudienceListFromAudienceListName(audienceListName: string) { + return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list; + } + + /** + * Return a fully-qualified metadata resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + metadataPath(property:string) { + return this.pathTemplates.metadataPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Metadata resource. + * + * @param {string} metadataName + * A fully-qualified path representing Metadata resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMetadataName(metadataName: string) { + return this.pathTemplates.metadataPathTemplate.match(metadataName).property; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Return a fully-qualified propertyQuotasSnapshot resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyQuotasSnapshotPath(property:string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from PropertyQuotasSnapshot resource. + * + * @param {string} propertyQuotasSnapshotName + * A fully-qualified path representing PropertyQuotasSnapshot resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName: string) { + return this.pathTemplates.propertyQuotasSnapshotPathTemplate.match(propertyQuotasSnapshotName).property; + } + + /** + * Return a fully-qualified recurringAudienceList resource name string. + * + * @param {string} property + * @param {string} recurring_audience_list + * @returns {string} Resource name string. + */ + recurringAudienceListPath(property:string,recurringAudienceList:string) { + return this.pathTemplates.recurringAudienceListPathTemplate.render({ + property: property, + recurring_audience_list: recurringAudienceList, + }); + } + + /** + * Parse the property from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).property; + } + + /** + * Parse the recurring_audience_list from RecurringAudienceList resource. + * + * @param {string} recurringAudienceListName + * A fully-qualified path representing RecurringAudienceList resource. + * @returns {string} A string representing the recurring_audience_list. + */ + matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string) { + return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).recurring_audience_list; + } + + /** + * Return a fully-qualified reportTask resource name string. + * + * @param {string} property + * @param {string} report_task + * @returns {string} Resource name string. + */ + reportTaskPath(property:string,reportTask:string) { + return this.pathTemplates.reportTaskPathTemplate.render({ + property: property, + report_task: reportTask, + }); + } + + /** + * Parse the property from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).property; + } + + /** + * Parse the report_task from ReportTask resource. + * + * @param {string} reportTaskName + * A fully-qualified path representing ReportTask resource. + * @returns {string} A string representing the report_task. + */ + matchReportTaskFromReportTaskName(reportTaskName: string) { + return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).report_task; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.alphaAnalyticsDataStub && !this._terminated) { + return this.alphaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json new file mode 100644 index 000000000000..56d47db54383 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json @@ -0,0 +1,113 @@ +{ + "interfaces": { + "google.analytics.data.v1alpha.AlphaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunFunnelReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRecurringAudienceList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListRecurringAudienceLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetPropertyQuotasSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetReportTask": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListReportTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetMetadata": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json new file mode 100644 index 000000000000..5047e31ed5c6 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1alpha/analytics_data_api.proto", + "../../protos/google/analytics/data/v1alpha/data.proto" +] diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json b/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..d0689e4e3b83 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json @@ -0,0 +1,185 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1alpha", + "libraryPackage": "@google-analytics/data", + "services": { + "AlphaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "RunReport": { + "methods": [ + "runReport" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AlphaAnalyticsDataClient", + "rpcs": { + "RunFunnelReport": { + "methods": [ + "runFunnelReport" + ] + }, + "QueryAudienceList": { + "methods": [ + "queryAudienceList" + ] + }, + "GetAudienceList": { + "methods": [ + "getAudienceList" + ] + }, + "CreateRecurringAudienceList": { + "methods": [ + "createRecurringAudienceList" + ] + }, + "GetRecurringAudienceList": { + "methods": [ + "getRecurringAudienceList" + ] + }, + "GetPropertyQuotasSnapshot": { + "methods": [ + "getPropertyQuotasSnapshot" + ] + }, + "QueryReportTask": { + "methods": [ + "queryReportTask" + ] + }, + "GetReportTask": { + "methods": [ + "getReportTask" + ] + }, + "RunReport": { + "methods": [ + "runReport" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "CreateAudienceList": { + "methods": [ + "createAudienceList" + ] + }, + "CreateReportTask": { + "methods": [ + "createReportTask" + ] + }, + "ListAudienceLists": { + "methods": [ + "listAudienceLists", + "listAudienceListsStream", + "listAudienceListsAsync" + ] + }, + "ListRecurringAudienceLists": { + "methods": [ + "listRecurringAudienceLists", + "listRecurringAudienceListsStream", + "listRecurringAudienceListsAsync" + ] + }, + "ListReportTasks": { + "methods": [ + "listReportTasks", + "listReportTasksStream", + "listReportTasksAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts b/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts new file mode 100644 index 000000000000..ad8f01f138b3 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {AlphaAnalyticsDataClient} from './alpha_analytics_data_client'; diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts new file mode 100644 index 000000000000..64d219c3e6bc --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts @@ -0,0 +1,2233 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/beta_analytics_data_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './beta_analytics_data_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Google Analytics reporting data service. + * @class + * @memberof v1beta + */ +export class BetaAnalyticsDataClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('data'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + betaAnalyticsDataStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BetaAnalyticsDataClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BetaAnalyticsDataClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BetaAnalyticsDataClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'analyticsdata.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + audienceExportPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audienceExports/{audience_export}' + ), + metadataPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/metadata' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAudienceExports: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createAudienceExportResponse = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExport') as gax.protobuf.Type; + const createAudienceExportMetadata = protoFilesRoot.lookup( + '.google.analytics.data.v1beta.AudienceExportMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAudienceExport: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAudienceExportResponse.decode.bind(createAudienceExportResponse), + createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.betaAnalyticsDataStub) { + return this.betaAnalyticsDataStub; + } + + // Put together the "service stub" for + // google.analytics.data.v1beta.BetaAnalyticsData. + this.betaAnalyticsDataStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.analytics.data.v1beta.BetaAnalyticsData') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.data.v1beta.BetaAnalyticsData, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const betaAnalyticsDataStubMethods = + ['runReport', 'runPivotReport', 'batchRunReports', 'batchRunPivotReports', 'getMetadata', 'runRealtimeReport', 'checkCompatibility', 'createAudienceExport', 'queryAudienceExport', 'getAudienceExport', 'listAudienceExports']; + for (const methodName of betaAnalyticsDataStubMethods) { + const callPromise = this.betaAnalyticsDataStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.betaAnalyticsDataStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'analyticsdata.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics', + 'https://www.googleapis.com/auth/analytics.readonly' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Returns a customized report of your Google Analytics event data. Reports + * contain statistics derived from data collected by the Google Analytics + * tracking code. The data returned from the API is as a table with columns + * for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or + * event count. Dimensions break down metrics across some common criteria, + * such as country or event name. + * + * For a guide to constructing requests & understanding responses, see + * [Creating a + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {number[]} request.dateRanges + * Date ranges of data to read. If multiple date ranges are requested, each + * response row will contain a zero based date range index. If two date + * ranges overlap, the event data for the overlapping days is included in the + * response rows for both date ranges. In a cohort request, this `dateRanges` + * must be unspecified. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * Dimension filters let you ask for only specific dimension values in + * the report. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied after aggregating the report's rows, + * similar to SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.offset + * The row count of the start row. The first row is counted as row 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunReportResponse|RunReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async + */ + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined + ]>; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request: protos.google.analytics.data.v1beta.IRunReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request?: protos.google.analytics.data.v1beta.IRunReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunReportResponse, + protos.google.analytics.data.v1beta.IRunReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized pivot report of your Google Analytics event data. + * Pivot reports are more advanced and expressive formats than regular + * reports. In a pivot report, dimensions are only visible if they are + * included in a pivot. Multiple pivots can be specified to further dissect + * your data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested. All defined dimensions must be used by one of the + * following: dimension_expression, dimension_filter, pivots, order_bys. + * @param {number[]} request.metrics + * The metrics requested, at least one metric needs to be specified. All + * defined metrics must be used by one of the following: metric_expression, + * metric_filter, order_bys. + * @param {number[]} request.dateRanges + * The date range to retrieve event data for the report. If multiple date + * ranges are specified, event data from each date range is used in the + * report. A special dimension with field name "dateRange" can be included in + * a Pivot's field names; if included, the report compares between date + * ranges. In a cohort request, this `dateRanges` must be unspecified. + * @param {number[]} request.pivots + * Describes the visual format of the report's dimensions in columns or rows. + * The union of the fieldNames (dimension names) in all pivots must be a + * subset of dimension names defined in Dimensions. No two pivots can share a + * dimension. A dimension is only visible if it appears in a pivot. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Dimensions must be requested to be used in + * this filter. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Metrics must be requested to be used in this filter. + * Dimensions cannot be used in this filter. + * @param {string} request.currencyCode + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec + * Cohort group associated with this request. If there is a cohort group + * in the request the 'cohort' dimension must be present. + * @param {boolean} request.keepEmptyRows + * If false or unspecified, each row with all metrics equal to 0 will not be + * returned. If true, these rows will be returned if they are not separately + * removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request requires both a comparisons field and a comparisons dimension to + * receive a comparison column in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunPivotReportResponse|RunPivotReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async + */ + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined + ]>; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): void; + runPivotReport( + request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runPivotReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runPivotReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runPivotReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunPivotReportResponse, + protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runPivotReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate report response. Each + * batch request is allowed up to 5 requests. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunReportsResponse|BatchRunReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async + */ + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined + ]>; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunReports( + request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns multiple pivot reports in a batch. All reports must be for the same + * Google Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * This property must be specified for the batch. The property within + * RunPivotReportRequest may either be unspecified or consistent with this + * property. + * + * Example: properties/1234 + * @param {number[]} request.requests + * Individual requests. Each request has a separate pivot report response. + * Each batch request is allowed up to 5 requests. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async + */ + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined + ]>; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): void; + batchRunPivotReports( + request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('batchRunPivotReports request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('batchRunPivotReports response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.batchRunPivotReports(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, + protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, + {}|undefined + ]) => { + this._log.info('batchRunPivotReports response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns metadata for dimensions and metrics available in reporting methods. + * Used to explore the dimensions and metrics. In this method, a Google + * Analytics property identifier is specified in the request, and + * the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + * For example if a custom metric with parameter name `levels_unlocked` is + * registered to a property, the Metadata response will contain + * `customEvent:levels_unlocked`. Universal metadata are dimensions and + * metrics applicable to any property such as `country` and `totalUsers`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see [where to find + * your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234/metadata + * + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.Metadata|Metadata}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_metadata.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async + */ + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined + ]>; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request: protos.google.analytics.data.v1beta.IGetMetadataRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getMetadata request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMetadata response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMetadata(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IMetadata, + protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMetadata response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns a customized report of realtime event data for your property. + * Events appear in realtime reports seconds after they have been sent to + * the Google Analytics. Realtime reports show events and usage data for the + * periods of time ranging from the present moment to 30 minutes ago (up to + * 60 minutes for Google Analytics 360 properties). + * + * For a guide to constructing realtime requests & understanding responses, + * see [Creating a Realtime + * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions requested and displayed. + * @param {number[]} request.metrics + * The metrics requested and displayed. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. Applied at post aggregation phase, similar to + * SQL having-clause. Dimensions cannot be used in this filter. + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 250,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * @param {number[]} request.metricAggregations + * Aggregation of metrics. Aggregated metric values will be shown in rows + * where the dimension_values are set to "RESERVED_(MetricAggregation)". + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * @param {boolean} request.returnPropertyQuota + * Toggles whether to return the current state of this Google Analytics + * property's Realtime quota. Quota is returned in + * [PropertyQuota](#PropertyQuota). + * @param {number[]} request.minuteRanges + * The minute ranges of event data to read. If unspecified, one minute range + * for the last 30 minutes will be used. If multiple minute ranges are + * requested, each response row will contain a zero based minute range index. + * If two minute ranges overlap, the event data for the overlapping minutes is + * included in the response rows for both minute ranges. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunRealtimeReportResponse|RunRealtimeReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async + */ + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined + ]>; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): void; + runRealtimeReport( + request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runRealtimeReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runRealtimeReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runRealtimeReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, + protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runRealtimeReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * This compatibility method lists dimensions and metrics that can be added to + * a report request and maintain compatibility. This method fails if the + * request's dimensions and metrics are incompatible. + * + * In Google Analytics, reports fail if they request incompatible dimensions + * and/or metrics; in that case, you will need to remove dimensions and/or + * metrics from the incompatible report until the report is compatible. + * + * The Realtime and Core reports have different compatibility rules. This + * method checks compatibility for Core reports. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * A Google Analytics property identifier whose events are tracked. To + * learn more, see [where to find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * `property` should be the same value as in your `runReport` request. + * + * Example: properties/1234 + * @param {number[]} request.dimensions + * The dimensions in this report. `dimensions` should be the same value as in + * your `runReport` request. + * @param {number[]} request.metrics + * The metrics in this report. `metrics` should be the same value as in your + * `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter + * The filter clause of dimensions. `dimensionFilter` should be the same value + * as in your `runReport` request. + * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter + * The filter clause of metrics. `metricFilter` should be the same value as in + * your `runReport` request + * @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter + * Filters the dimensions and metrics in the response to just this + * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` + * to only return compatible dimensions & metrics. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.CheckCompatibilityResponse|CheckCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async + */ + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined + ]>; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + callback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('checkCompatibility request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkCompatibility response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.checkCompatibility(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, + protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, + {}|undefined + ]) => { + this._log.info('checkCompatibility response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves an audience export of users. After creating an audience, the + * users are not immediately available for exporting. First, a request to + * `CreateAudienceExport` is necessary to create an audience export of users, + * and then second, this method is used to retrieve the users in the audience + * export. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the audience export to retrieve users from. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The number of rows to return. If unspecified, 10,000 rows are + * returned. The API returns a maximum of 250,000 rows per request, no matter + * how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.QueryAudienceExportResponse|QueryAudienceExportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async + */ + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined + ]>; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + queryAudienceExport( + request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('queryAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, + protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets configuration metadata about a specific audience export. This method + * can be used to understand an audience export after it has been created. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The audience export resource name. + * Format: `properties/{property}/audienceExports/{audience_export}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async + */ + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined + ]>; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + callback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): void; + getAudienceExport( + request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getAudienceExport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAudienceExport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAudienceExport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1beta.IAudienceExport, + protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAudienceExport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audience export for later retrieval. This method quickly returns + * the audience export's resource name and initiates a long running + * asynchronous request to form an audience export. To export the users in an + * audience export, first create the audience export through this method and + * then send the audience resource name to the `QueryAudienceExport` method. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * An audience export is a snapshot of the users currently in the audience at + * the time of audience export creation. Creating audience exports for one + * audience on different days will return different results as users enter and + * exit the audience. + * + * Audiences in Google Analytics 4 allow you to segment your users in the ways + * that are important to your business. To learn more, see + * https://support.google.com/analytics/answer/9267572. Audience exports + * contain the users in each audience. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this audience export will be created. + * Format: `properties/{property}` + * @param {google.analytics.data.v1beta.AudienceExport} request.audienceExport + * Required. The audience export to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAudienceExport( + request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAudienceExport response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAudienceExport request %j', request); + return this.innerApiCalls.createAudienceExport(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createAudienceExport response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createAudienceExport()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async + */ + async checkCreateAudienceExportProgress(name: string): Promise>{ + this._log.info('createAudienceExport long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceExport, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all audience exports for a property. This method can be used for you + * to find and reuse existing audience exports rather than creating + * unnecessary new audience exports. The same audience can have multiple + * audience exports that represent the export of users that were in an + * audience on different days. + * + * See [Creating an Audience + * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) + * for an introduction to Audience Exports with examples. + * + * Audience Export APIs have some methods at alpha and other methods at beta + * stability. The intention is to advance methods to beta stability after some + * feedback and adoption. To give your feedback on this API, complete the + * [Google Analytics Audience Export API + * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + callback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): void; + listAudienceExports( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>, + callback?: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>): + Promise<[ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, + protos.google.analytics.data.v1beta.IAudienceExport>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAudienceExports values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAudienceExports request %j', request); + return this.innerApiCalls + .listAudienceExports(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.analytics.data.v1beta.IAudienceExport[], + protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, + protos.google.analytics.data.v1beta.IListAudienceExportsResponse + ]) => { + this._log.info('listAudienceExports values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAudienceExports`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAudienceExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAudienceExportsStream( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports stream %j', request); + return this.descriptors.page.listAudienceExports.createStream( + this.innerApiCalls.listAudienceExports as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAudienceExports`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. All audience exports for this property will be listed in the + * response. Format: `properties/{property}` + * @param {number} [request.pageSize] + * Optional. The maximum number of audience exports to return. The service may + * return fewer than this value. If unspecified, at most 200 audience exports + * will be returned. The maximum value is 1000 (higher values will be coerced + * to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAudienceExports` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudienceExports` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js + * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async + */ + listAudienceExportsAsync( + request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAudienceExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAudienceExports iterate %j', request); + return this.descriptors.page.listAudienceExports.asyncIterate( + this.innerApiCalls['listAudienceExports'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified audienceExport resource name string. + * + * @param {string} property + * @param {string} audience_export + * @returns {string} Resource name string. + */ + audienceExportPath(property:string,audienceExport:string) { + return this.pathTemplates.audienceExportPathTemplate.render({ + property: property, + audience_export: audienceExport, + }); + } + + /** + * Parse the property from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property; + } + + /** + * Parse the audience_export from AudienceExport resource. + * + * @param {string} audienceExportName + * A fully-qualified path representing AudienceExport resource. + * @returns {string} A string representing the audience_export. + */ + matchAudienceExportFromAudienceExportName(audienceExportName: string) { + return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export; + } + + /** + * Return a fully-qualified metadata resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + metadataPath(property:string) { + return this.pathTemplates.metadataPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Metadata resource. + * + * @param {string} metadataName + * A fully-qualified path representing Metadata resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMetadataName(metadataName: string) { + return this.pathTemplates.metadataPathTemplate.match(metadataName).property; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property:string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.betaAnalyticsDataStub && !this._terminated) { + return this.betaAnalyticsDataStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json new file mode 100644 index 000000000000..271a9f86be46 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json @@ -0,0 +1,93 @@ +{ + "interfaces": { + "google.analytics.data.v1beta.BetaAnalyticsData": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown": [ + "UNKNOWN" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunPivotReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchRunPivotReports": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMetadata": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunRealtimeReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckCompatibility": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "QueryAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudienceExport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudienceExports": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json new file mode 100644 index 000000000000..89471a4231ae --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/data/v1beta/analytics_data_api.proto", + "../../protos/google/analytics/data/v1beta/data.proto" +] diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json b/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..e4f8c132470a --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json @@ -0,0 +1,137 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.data.v1beta", + "libraryPackage": "@google-analytics/data", + "services": { + "BetaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "RunReport": { + "methods": [ + "runReport" + ] + }, + "RunPivotReport": { + "methods": [ + "runPivotReport" + ] + }, + "BatchRunReports": { + "methods": [ + "batchRunReports" + ] + }, + "BatchRunPivotReports": { + "methods": [ + "batchRunPivotReports" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, + "RunRealtimeReport": { + "methods": [ + "runRealtimeReport" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "QueryAudienceExport": { + "methods": [ + "queryAudienceExport" + ] + }, + "GetAudienceExport": { + "methods": [ + "getAudienceExport" + ] + }, + "CreateAudienceExport": { + "methods": [ + "createAudienceExport" + ] + }, + "ListAudienceExports": { + "methods": [ + "listAudienceExports", + "listAudienceExportsStream", + "listAudienceExportsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/index.ts b/owl-bot-staging/google-analytics-data/src/v1beta/index.ts new file mode 100644 index 000000000000..baac0092ffc3 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/src/v1beta/index.ts @@ -0,0 +1,19 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {BetaAnalyticsDataClient} from './beta_analytics_data_client'; diff --git a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..5fb77a3aef4e --- /dev/null +++ b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const data = require('@google-analytics/data'); + +function main() { + const betaAnalyticsDataClient = new data.BetaAnalyticsDataClient(); +} + +main(); diff --git a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..079657c400b5 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {BetaAnalyticsDataClient} from '@google-analytics/data'; + +// check that the client class type name can be used +function doStuffWithBetaAnalyticsDataClient(client: BetaAnalyticsDataClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const betaAnalyticsDataClient = new BetaAnalyticsDataClient(); + doStuffWithBetaAnalyticsDataClient(betaAnalyticsDataClient); +} + +main(); diff --git a/owl-bot-staging/google-analytics-data/system-test/install.ts b/owl-bot-staging/google-analytics-data/system-test/install.ts new file mode 100644 index 000000000000..f66069aa3940 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts b/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts new file mode 100644 index 000000000000..13e7fac4efb8 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts @@ -0,0 +1,2862 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as alphaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.AlphaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.alphaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.alphaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alphaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runFunnelReport', () => { + it('invokes runFunnelReport without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCall(expectedResponse); + const [response] = await client.runFunnelReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() + ); + client.innerApiCalls.runFunnelReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runFunnelReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunFunnelReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runFunnelReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runFunnelReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runFunnelReport with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runFunnelReport(request), expectedError); + }); + }); + + describe('queryAudienceList', () => { + it('invokes queryAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() + ); + client.innerApiCalls.queryAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryAudienceListResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceList(request), expectedError); + }); + }); + + describe('getAudienceList', () => { + it('invokes getAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.AudienceList() + ); + client.innerApiCalls.getAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceList(request), expectedError); + }); + }); + + describe('createRecurringAudienceList', () => { + it('invokes createRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.createRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createRecurringAudienceList(request), expectedError); + }); + }); + + describe('getRecurringAudienceList', () => { + it('invokes getRecurringAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(expectedResponse); + const [response] = await client.getRecurringAudienceList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RecurringAudienceList() + ); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRecurringAudienceList( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRecurringAudienceList with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRecurringAudienceList(request), expectedError); + }); + }); + + describe('getPropertyQuotasSnapshot', () => { + it('invokes getPropertyQuotasSnapshot without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getPropertyQuotasSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() + ); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPropertyQuotasSnapshot( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPropertyQuotasSnapshot with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); + }); + }); + + describe('queryReportTask', () => { + it('invokes queryReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.queryReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() + ); + client.innerApiCalls.queryReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryReportTaskResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryReportTask(request), expectedError); + }); + }); + + describe('getReportTask', () => { + it('invokes getReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCall(expectedResponse); + const [response] = await client.getReportTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ReportTask() + ); + client.innerApiCalls.getReportTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReportTask( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReportTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportTask with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getReportTask(request), expectedError); + }); + }); + + describe('runReport', () => { + it('invokes runReport without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); + const [response] = await client.runReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runReport(request), expectedError); + }); + }); + + describe('getMetadata', () => { + it('invokes getMetadata without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadata(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadata( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IMetadata|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadata(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMetadata(request), expectedError); + }); + }); + + describe('createAudienceList', () => { + it('invokes createAudienceList without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceList = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceList( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceList(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceList with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceList(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceListProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAudienceListProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceListProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceListProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createReportTask', () => { + it('invokes createReportTask without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createReportTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReportTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReportTask( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with call error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createReportTask(request), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportTask with LRO error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createReportTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReportTaskProgress without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateReportTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReportTaskProgress with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateReportTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceLists', () => { + it('invokes listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.innerApiCalls.listAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); + assert( + (client.descriptors.page.listAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), + ]; + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + const iterable = client.listAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRecurringAudienceLists', () => { + it('invokes listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(expectedResponse); + const [response] = await client.listRecurringAudienceLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRecurringAudienceLists( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRecurringAudienceLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRecurringAudienceListsStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRecurringAudienceListsStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRecurringAudienceListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); + assert( + (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), + ]; + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + const iterable = client.listRecurringAudienceListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRecurringAudienceLists with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRecurringAudienceListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReportTasks', () => { + it('invokes listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listReportTasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.innerApiCalls.listReportTasks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReportTasks( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReportTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReportTasks(request), expectedError); + const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportTasksStream without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReportTasksStream with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listReportTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; + stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); + assert( + (client.descriptors.page.listReportTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), + ]; + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + const iterable = client.listReportTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportTasks with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.ListReportTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReportTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceList', async () => { + const fakePath = "/rendered/path/audienceList"; + const expectedParameters = { + property: "propertyValue", + audience_list: "audienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceListPath', () => { + const result = client.audienceListPath("propertyValue", "audienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceListName', () => { + const result = client.matchPropertyFromAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceListFromAudienceListName', () => { + const result = client.matchAudienceListFromAudienceListName(fakePath); + assert.strictEqual(result, "audienceListValue"); + assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadata', async () => { + const fakePath = "/rendered/path/metadata"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.metadataPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataPath', () => { + const result = client.metadataPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromMetadataName', () => { + const result = client.matchPropertyFromMetadataName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('propertyQuotasSnapshot', async () => { + const fakePath = "/rendered/path/propertyQuotasSnapshot"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyQuotasSnapshotPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyQuotasSnapshotPath', () => { + const result = client.propertyQuotasSnapshotPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyQuotasSnapshotName', () => { + const result = client.matchPropertyFromPropertyQuotasSnapshotName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('recurringAudienceList', async () => { + const fakePath = "/rendered/path/recurringAudienceList"; + const expectedParameters = { + property: "propertyValue", + recurring_audience_list: "recurringAudienceListValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.recurringAudienceListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.recurringAudienceListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('recurringAudienceListPath', () => { + const result = client.recurringAudienceListPath("propertyValue", "recurringAudienceListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.recurringAudienceListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromRecurringAudienceListName', () => { + const result = client.matchPropertyFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRecurringAudienceListFromRecurringAudienceListName', () => { + const result = client.matchRecurringAudienceListFromRecurringAudienceListName(fakePath); + assert.strictEqual(result, "recurringAudienceListValue"); + assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('reportTask', async () => { + const fakePath = "/rendered/path/reportTask"; + const expectedParameters = { + property: "propertyValue", + report_task: "reportTaskValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.reportTaskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reportTaskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reportTaskPath', () => { + const result = client.reportTaskPath("propertyValue", "reportTaskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reportTaskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromReportTaskName', () => { + const result = client.matchPropertyFromReportTaskName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReportTaskFromReportTaskName', () => { + const result = client.matchReportTaskFromReportTaskName(fakePath); + assert.strictEqual(result, "reportTaskValue"); + assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts b/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts new file mode 100644 index 000000000000..3c15d128123a --- /dev/null +++ b/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts @@ -0,0 +1,2004 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as betaanalyticsdataModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.BetaAnalyticsDataClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.servicePath; + assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + await client.initialize(); + assert(client.betaAnalyticsDataStub); + }); + + it('has close method for the initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.betaAnalyticsDataStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.betaAnalyticsDataStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('runReport', () => { + it('invokes runReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); + const [response] = await client.runReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runReport(request), expectedError); + }); + }); + + describe('runPivotReport', () => { + it('invokes runPivotReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCall(expectedResponse); + const [response] = await client.runPivotReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportResponse() + ); + client.innerApiCalls.runPivotReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runPivotReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunPivotReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runPivotReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runPivotReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runPivotReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunPivotReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runPivotReport(request), expectedError); + }); + }); + + describe('batchRunReports', () => { + it('invokes batchRunReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsResponse() + ); + client.innerApiCalls.batchRunReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunReports(request), expectedError); + }); + }); + + describe('batchRunPivotReports', () => { + it('invokes batchRunPivotReports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(expectedResponse); + const [response] = await client.batchRunPivotReports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() + ); + client.innerApiCalls.batchRunPivotReports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchRunPivotReports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchRunPivotReports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchRunPivotReports with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.batchRunPivotReports(request), expectedError); + }); + }); + + describe('getMetadata', () => { + it('invokes getMetadata without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadata(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadata( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IMetadata|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadata(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMetadata(request), expectedError); + }); + }); + + describe('runRealtimeReport', () => { + it('invokes runRealtimeReport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(expectedResponse); + const [response] = await client.runRealtimeReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() + ); + client.innerApiCalls.runRealtimeReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runRealtimeReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunRealtimeReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runRealtimeReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runRealtimeReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runRealtimeReport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runRealtimeReport(request), expectedError); + }); + }); + + describe('checkCompatibility', () => { + it('invokes checkCompatibility without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkCompatibility( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.ICheckCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.checkCompatibility(request), expectedError); + }); + }); + + describe('queryAudienceExport', () => { + it('invokes queryAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.queryAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() + ); + client.innerApiCalls.queryAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IQueryAudienceExportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryAudienceExport(request), expectedError); + }); + }); + + describe('getAudienceExport', () => { + it('invokes getAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCall(expectedResponse); + const [response] = await client.getAudienceExport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1beta.AudienceExport() + ); + client.innerApiCalls.getAudienceExport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudienceExport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudienceExport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudienceExport with closed client', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.GetAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAudienceExport(request), expectedError); + }); + }); + + describe('createAudienceExport', () => { + it('invokes createAudienceExport without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAudienceExport(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAudienceExport = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudienceExport( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with call error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAudienceExport(request), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudienceExport with LRO error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAudienceExport(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAudienceExportProgress without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAudienceExportProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAudienceExportProgress with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateAudienceExportProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAudienceExports', () => { + it('invokes listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCall(expectedResponse); + const [response] = await client.listAudienceExports(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.innerApiCalls.listAudienceExports = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudienceExports( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudienceExports = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAudienceExports(request), expectedError); + const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudienceExportsStream without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudienceExportsStream with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudienceExportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; + stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); + assert( + (client.descriptors.page.listAudienceExports.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), + ]; + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + const iterable = client.listAudienceExportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudienceExports with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudienceExportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('audienceExport', async () => { + const fakePath = "/rendered/path/audienceExport"; + const expectedParameters = { + property: "propertyValue", + audience_export: "audienceExportValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.audienceExportPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.audienceExportPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('audienceExportPath', () => { + const result = client.audienceExportPath("propertyValue", "audienceExportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.audienceExportPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromAudienceExportName', () => { + const result = client.matchPropertyFromAudienceExportName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAudienceExportFromAudienceExportName', () => { + const result = client.matchAudienceExportFromAudienceExportName(fakePath); + assert.strictEqual(result, "audienceExportValue"); + assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadata', async () => { + const fakePath = "/rendered/path/metadata"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.metadataPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataPath', () => { + const result = client.metadataPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromMetadataName', () => { + const result = client.matchPropertyFromMetadataName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('property', async () => { + const fakePath = "/rendered/path/property"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.propertyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-analytics-data/tsconfig.json b/owl-bot-staging/google-analytics-data/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-analytics-data/webpack.config.js b/owl-bot-staging/google-analytics-data/webpack.config.js new file mode 100644 index 000000000000..f5f52a892738 --- /dev/null +++ b/owl-bot-staging/google-analytics-data/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'AlphaAnalyticsData', + filename: './alpha-analytics-data.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From a622ea0e0cd0057e22123e81dd9490a014b12d5d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 28 Apr 2026 22:24:05 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-analytics-data/.eslintignore | 7 - .../google-analytics-data/.eslintrc.json | 4 - .../google-analytics-data/.gitignore | 14 - .../google-analytics-data/.jsdoc.js | 55 - .../google-analytics-data/.mocharc.js | 33 - owl-bot-staging/google-analytics-data/.nycrc | 24 - .../google-analytics-data/README.md | 140 - .../data/v1alpha/analytics_data_api.proto | 1444 - .../google/analytics/data/v1alpha/data.proto | 1814 - .../data/v1beta/analytics_data_api.proto | 1001 - .../google/analytics/data/v1beta/data.proto | 1082 - .../google-analytics-data/protos/protos.d.ts | 28701 ------ .../google-analytics-data/protos/protos.js | 75986 ---------------- .../google-analytics-data/protos/protos.json | 7286 -- ...pha_analytics_data.create_audience_list.js | 68 - ...ics_data.create_recurring_audience_list.js | 67 - ...alpha_analytics_data.create_report_task.js | 68 - .../alpha_analytics_data.get_audience_list.js | 62 - ...ytics_data.get_property_quotas_snapshot.js | 62 - ...lytics_data.get_recurring_audience_list.js | 63 - .../alpha_analytics_data.get_report_task.js | 62 - ...lpha_analytics_data.list_audience_lists.js | 78 - ...tics_data.list_recurring_audience_lists.js | 80 - .../alpha_analytics_data.list_report_tasks.js | 73 - ...lpha_analytics_data.query_audience_list.js | 83 - .../alpha_analytics_data.query_report_task.js | 88 - .../alpha_analytics_data.run_funnel_report.js | 132 - ...etadata_google.analytics.data.v1alpha.json | 763 - ..._analytics_data.batch_run_pivot_reports.js | 72 - .../beta_analytics_data.batch_run_reports.js | 72 - ...beta_analytics_data.check_compatibility.js | 90 - ...a_analytics_data.create_audience_export.js | 68 - ...beta_analytics_data.get_audience_export.js | 62 - .../beta_analytics_data.get_metadata.js | 69 - ...ta_analytics_data.list_audience_exports.js | 78 - ...ta_analytics_data.query_audience_export.js | 83 - .../beta_analytics_data.run_pivot_report.js | 135 - ...beta_analytics_data.run_realtime_report.js | 115 - .../v1beta/beta_analytics_data.run_report.js | 162 - ...metadata_google.analytics.data.v1beta.json | 639 - .../google-analytics-data/src/index.ts | 28 - .../v1alpha/alpha_analytics_data_client.ts | 2972 - .../alpha_analytics_data_client_config.json | 113 - .../alpha_analytics_data_proto_list.json | 4 - .../src/v1alpha/gapic_metadata.json | 185 - .../src/v1alpha/index.ts | 19 - .../src/v1beta/beta_analytics_data_client.ts | 2233 - .../beta_analytics_data_client_config.json | 93 - .../beta_analytics_data_proto_list.json | 4 - .../src/v1beta/gapic_metadata.json | 137 - .../google-analytics-data/src/v1beta/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../system-test/install.ts | 49 - .../gapic_alpha_analytics_data_v1alpha.ts | 2862 - .../test/gapic_beta_analytics_data_v1beta.ts | 2004 - .../google-analytics-data/tsconfig.json | 22 - .../google-analytics-data/webpack.config.js | 64 - packages/google-analytics-data/.eslintrc.json | 3 +- .../google-analytics-data/.gitattributes | 0 .../google-analytics-data/.prettierignore | 0 .../google-analytics-data/.prettierrc.js | 0 .../google-analytics-data/CODE_OF_CONDUCT.md | 0 .../google-analytics-data/CONTRIBUTING.md | 0 .../google-analytics-data/LICENSE | 0 packages/google-analytics-data/README.md | 3 +- .../data/v1alpha/analytics_data_api.proto | 332 +- .../google/analytics/data/v1alpha/data.proto | 215 +- .../google-analytics-data/protos/protos.d.ts | 8513 +- .../google-analytics-data/protos/protos.js | 26866 +++--- .../google-analytics-data/protos/protos.json | 549 +- .../alpha_analytics_data.get_metadata.js | 0 .../alpha_analytics_data.run_report.js | 0 ...etadata_google.analytics.data.v1alpha.json | 188 +- packages/google-analytics-data/src/index.ts | 2 +- .../v1alpha/alpha_analytics_data_client.ts | 468 +- .../alpha_analytics_data_client_config.json | 15 +- .../src/v1alpha/gapic_metadata.json | 30 +- .../system-test/install.ts | 2 +- .../gapic_alpha_analytics_data_v1alpha.ts | 354 +- .../google-analytics-data/webpack.config.js | 2 +- 81 files changed, 21645 insertions(+), 147749 deletions(-) delete mode 100644 owl-bot-staging/google-analytics-data/.eslintignore delete mode 100644 owl-bot-staging/google-analytics-data/.eslintrc.json delete mode 100644 owl-bot-staging/google-analytics-data/.gitignore delete mode 100644 owl-bot-staging/google-analytics-data/.jsdoc.js delete mode 100644 owl-bot-staging/google-analytics-data/.mocharc.js delete mode 100644 owl-bot-staging/google-analytics-data/.nycrc delete mode 100644 owl-bot-staging/google-analytics-data/README.md delete mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto delete mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto delete mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto delete mode 100644 owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto delete mode 100644 owl-bot-staging/google-analytics-data/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-analytics-data/protos/protos.js delete mode 100644 owl-bot-staging/google-analytics-data/protos/protos.json delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js delete mode 100644 owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json delete mode 100644 owl-bot-staging/google-analytics-data/src/index.ts delete mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts delete mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1alpha/index.ts delete mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts delete mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-analytics-data/src/v1beta/index.ts delete mode 100644 owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-analytics-data/system-test/install.ts delete mode 100644 owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts delete mode 100644 owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts delete mode 100644 owl-bot-staging/google-analytics-data/tsconfig.json delete mode 100644 owl-bot-staging/google-analytics-data/webpack.config.js rename {owl-bot-staging => packages}/google-analytics-data/.gitattributes (100%) rename {owl-bot-staging => packages}/google-analytics-data/.prettierignore (100%) rename {owl-bot-staging => packages}/google-analytics-data/.prettierrc.js (100%) rename {owl-bot-staging => packages}/google-analytics-data/CODE_OF_CONDUCT.md (100%) rename {owl-bot-staging => packages}/google-analytics-data/CONTRIBUTING.md (100%) rename {owl-bot-staging => packages}/google-analytics-data/LICENSE (100%) rename {owl-bot-staging => packages}/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js (100%) rename {owl-bot-staging => packages}/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js (100%) diff --git a/owl-bot-staging/google-analytics-data/.eslintignore b/owl-bot-staging/google-analytics-data/.eslintignore deleted file mode 100644 index cfc348ec4d11..000000000000 --- a/owl-bot-staging/google-analytics-data/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-analytics-data/.eslintrc.json b/owl-bot-staging/google-analytics-data/.eslintrc.json deleted file mode 100644 index 3e8d97ccb390..000000000000 --- a/owl-bot-staging/google-analytics-data/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./node_modules/gts", - "root": true -} diff --git a/owl-bot-staging/google-analytics-data/.gitignore b/owl-bot-staging/google-analytics-data/.gitignore deleted file mode 100644 index d4f03a0df2e8..000000000000 --- a/owl-bot-staging/google-analytics-data/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-analytics-data/.jsdoc.js b/owl-bot-staging/google-analytics-data/.jsdoc.js deleted file mode 100644 index 224079c6f26b..000000000000 --- a/owl-bot-staging/google-analytics-data/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-analytics/data', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-analytics-data/.mocharc.js b/owl-bot-staging/google-analytics-data/.mocharc.js deleted file mode 100644 index 5eb34e86c874..000000000000 --- a/owl-bot-staging/google-analytics-data/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-analytics-data/.nycrc b/owl-bot-staging/google-analytics-data/.nycrc deleted file mode 100644 index 81a95fc94b00..000000000000 --- a/owl-bot-staging/google-analytics-data/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "report-dir": "./.coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/.coverage", - "**/apis", - "**/benchmark", - "**/conformance", - "**/docs", - "**/samples", - "**/scripts", - "**/protos", - "**/test", - "**/*.d.ts", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ], - "exclude-after-remap": false, - "all": true -} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/README.md b/owl-bot-staging/google-analytics-data/README.md deleted file mode 100644 index 281ad5361204..000000000000 --- a/owl-bot-staging/google-analytics-data/README.md +++ /dev/null @@ -1,140 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [Google Analytics Data API: Nodejs Client][homepage] - -This library is considered to be in **preview**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. - -[![npm version](https://img.shields.io/npm/v/@google-analytics/data.svg)](https://www.npmjs.org/package/@google-analytics/data) - -Google Analytics Data API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [Google Analytics Data API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/data/latest) - - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - -**Table of contents:** - -* [Quickstart](#quickstart) - * [Before you begin](#before-you-begin) - * [Installing the client library](#installing-the-client-library) - -* [Versioning](#versioning) -* [Contributing](#contributing) -* [License](#license) - -## Quickstart -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Google Analytics Data API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-analytics/data -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| create audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js) | -| create recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) | -| create report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) | -| get audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) | -| get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js) | -| get property quotas snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js) | -| get recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) | -| get report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) | -| list audience lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js) | -| list recurring audience lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js) | -| list report tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js) | -| query audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js) | -| query report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js) | -| run funnel report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js) | -| run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js) | -| analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json) | -| batch run pivot reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js) | -| batch run reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js) | -| check compatibility | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js) | -| create audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js) | -| get audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js) | -| get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js) | -| list audience exports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js) | -| query audience export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js) | -| run pivot report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js) | -| run realtime report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js) | -| run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js) | -| analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-analytics/data@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/LICENSE) - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsdata.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto deleted file mode 100644 index c936b2d0ee6a..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto +++ /dev/null @@ -1,1444 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.analytics.data.v1alpha; - -import "google/analytics/data/v1alpha/data.proto"; -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; -option java_multiple_files = true; -option java_outer_classname = "AnalyticsDataApiProto"; -option java_package = "com.google.analytics.data.v1alpha"; -option (google.api.resource_definition) = { - type: "analyticsadmin.googleapis.com/Property" - pattern: "properties/{property}" -}; - -// Google Analytics reporting data service. -service AlphaAnalyticsData { - option (google.api.default_host) = "analyticsdata.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/analytics," - "https://www.googleapis.com/auth/analytics.readonly"; - - // Returns a customized funnel report of your Google Analytics event data. The - // data returned from the API is as a table with columns for the requested - // dimensions and metrics. - // - // Funnel exploration lets you visualize the steps your users take to complete - // a task and quickly see how well they are succeeding or failing at each - // step. For example, how do prospects become shoppers and then become buyers? - // How do one time buyers become repeat buyers? With this information, you can - // improve inefficient or abandoned customer journeys. To learn more, see [GA4 - // Funnel Explorations](https://support.google.com/analytics/answer/9327974). - // - // This method is introduced at alpha stability with the intention of - // gathering feedback on syntax and capabilities before entering beta. To give - // your feedback on this API, complete the [Google Analytics Data API Funnel - // Reporting - // Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). - rpc RunFunnelReport(RunFunnelReportRequest) - returns (RunFunnelReportResponse) { - option (google.api.http) = { - post: "/v1alpha/{property=properties/*}:runFunnelReport" - body: "*" - }; - } - - // Creates an audience list for later retrieval. This method quickly returns - // the audience list's resource name and initiates a long running asynchronous - // request to form an audience list. To list the users in an audience list, - // first create the audience list through this method and then send the - // audience resource name to the `QueryAudienceList` method. - // - // See [Creating an Audience - // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Lists with examples. - // - // An audience list is a snapshot of the users currently in the audience at - // the time of audience list creation. Creating audience lists for one - // audience on different days will return different results as users enter and - // exit the audience. - // - // Audiences in Google Analytics 4 allow you to segment your users in the ways - // that are important to your business. To learn more, see - // https://support.google.com/analytics/answer/9267572. Audience lists contain - // the users in each audience. - // - // This method is available at beta stability at - // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). - // To give your feedback on this API, complete the [Google Analytics Audience - // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc CreateAudienceList(CreateAudienceListRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=properties/*}/audienceLists" - body: "audience_list" - }; - option (google.api.method_signature) = "parent,audience_list"; - option (google.longrunning.operation_info) = { - response_type: "AudienceList" - metadata_type: "AudienceListMetadata" - }; - } - - // Retrieves an audience list of users. After creating an audience, the users - // are not immediately available for listing. First, a request to - // `CreateAudienceList` is necessary to create an audience list of users, and - // then second, this method is used to retrieve the users in the audience - // list. - // - // See [Creating an Audience - // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Lists with examples. - // - // Audiences in Google Analytics 4 allow you to segment your users in the ways - // that are important to your business. To learn more, see - // https://support.google.com/analytics/answer/9267572. - // - // This method is available at beta stability at - // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). - // To give your feedback on this API, complete the [Google Analytics Audience - // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc QueryAudienceList(QueryAudienceListRequest) - returns (QueryAudienceListResponse) { - option (google.api.http) = { - post: "/v1alpha/{name=properties/*/audienceLists/*}:query" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets configuration metadata about a specific audience list. This method - // can be used to understand an audience list after it has been created. - // - // See [Creating an Audience - // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Lists with examples. - // - // This method is available at beta stability at - // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). - // To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) { - option (google.api.http) = { - get: "/v1alpha/{name=properties/*/audienceLists/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all audience lists for a property. This method can be used for you to - // find and reuse existing audience lists rather than creating unnecessary new - // audience lists. The same audience can have multiple audience lists that - // represent the list of users that were in an audience on different days. - // - // See [Creating an Audience - // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Lists with examples. - // - // This method is available at beta stability at - // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). - // To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc ListAudienceLists(ListAudienceListsRequest) - returns (ListAudienceListsResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=properties/*}/audienceLists" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a recurring audience list. Recurring audience lists produces new - // audience lists each day. Audience lists are users in an audience at the - // time of the list's creation. - // - // A recurring audience list ensures that you have audience list based on the - // most recent data available for use each day. If you manually create - // audience list, you don't know when an audience list based on an additional - // day's data is available. This recurring audience list automates the - // creation of an audience list when an additional day's data is available. - // You will consume fewer quota tokens by using recurring audience list versus - // manually creating audience list at various times of day trying to guess - // when an additional day's data is ready. - // - // This method is introduced at alpha stability with the intention of - // gathering feedback on syntax and capabilities before entering beta. To give - // your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc CreateRecurringAudienceList(CreateRecurringAudienceListRequest) - returns (RecurringAudienceList) { - option (google.api.http) = { - post: "/v1alpha/{parent=properties/*}/recurringAudienceLists" - body: "recurring_audience_list" - }; - option (google.api.method_signature) = "parent,recurring_audience_list"; - } - - // Gets configuration metadata about a specific recurring audience list. This - // method can be used to understand a recurring audience list's state after it - // has been created. For example, a recurring audience list resource will - // generate audience list instances for each day, and this method can be used - // to get the resource name of the most recent audience list instance. - // - // This method is introduced at alpha stability with the intention of - // gathering feedback on syntax and capabilities before entering beta. To give - // your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc GetRecurringAudienceList(GetRecurringAudienceListRequest) - returns (RecurringAudienceList) { - option (google.api.http) = { - get: "/v1alpha/{name=properties/*/recurringAudienceLists/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all recurring audience lists for a property. This method can be used - // for you to find and reuse existing recurring audience lists rather than - // creating unnecessary new recurring audience lists. The same audience can - // have multiple recurring audience lists that represent different dimension - // combinations; for example, just the dimension `deviceId` or both the - // dimensions `deviceId` and `userId`. - // - // This method is introduced at alpha stability with the intention of - // gathering feedback on syntax and capabilities before entering beta. To give - // your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc ListRecurringAudienceLists(ListRecurringAudienceListsRequest) - returns (ListRecurringAudienceListsResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=properties/*}/recurringAudienceLists" - }; - option (google.api.method_signature) = "parent"; - } - - // Get all property quotas organized by quota category for a given property. - // This will charge 1 property quota from the category with the most quota. - rpc GetPropertyQuotasSnapshot(GetPropertyQuotasSnapshotRequest) - returns (PropertyQuotasSnapshot) { - option (google.api.http) = { - get: "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" - }; - option (google.api.method_signature) = "name"; - } - - // Initiates the creation of a report task. This method quickly - // returns a report task and initiates a long running - // asynchronous request to form a customized report of your Google Analytics - // event data. - // - // A report task will be retained and available for querying for 72 hours - // after it has been created. - // - // A report task created by one user can be listed and queried by all users - // who have access to the property. - rpc CreateReportTask(CreateReportTaskRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=properties/*}/reportTasks" - body: "report_task" - }; - option (google.api.method_signature) = "parent,report_task"; - option (google.longrunning.operation_info) = { - response_type: "ReportTask" - metadata_type: "ReportTaskMetadata" - }; - } - - // Retrieves a report task's content. After requesting the `CreateReportTask`, - // you are able to retrieve the report content once the report is - // ACTIVE. This method will return an error if the report task's state is not - // `ACTIVE`. A query response will return the tabular row & column values of - // the report. - rpc QueryReportTask(QueryReportTaskRequest) - returns (QueryReportTaskResponse) { - option (google.api.http) = { - post: "/v1alpha/{name=properties/*/reportTasks/*}:query" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets report metadata about a specific report task. After creating a report - // task, use this method to check its processing state or inspect its - // report definition. - rpc GetReportTask(GetReportTaskRequest) returns (ReportTask) { - option (google.api.http) = { - get: "/v1alpha/{name=properties/*/reportTasks/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all report tasks for a property. - rpc ListReportTasks(ListReportTasksRequest) - returns (ListReportTasksResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=properties/*}/reportTasks" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a customized report of your Google Analytics event data. Reports - // contain statistics derived from data collected by the Google Analytics - // tracking code. The data returned from the API is as a table with columns - // for the requested dimensions and metrics. Metrics are individual - // measurements of user activity on your property, such as active users or - // event count. Dimensions break down metrics across some common criteria, - // such as country or event name. - rpc RunReport(RunReportRequest) returns (RunReportResponse) { - option (google.api.http) = { - post: "/v1alpha/{property=properties/*}:runReport" - body: "*" - }; - } - - // Returns metadata for dimensions and metrics available in reporting methods. - // Used to explore the dimensions and metrics. In this method, a Google - // Analytics property identifier is specified in the request, and - // the metadata response includes Custom dimensions and metrics as well as - // Universal metadata. - // - // For example if a custom metric with parameter name `levels_unlocked` is - // registered to a property, the Metadata response will contain - // `customEvent:levels_unlocked`. Universal metadata are dimensions and - // metrics applicable to any property such as `country` and `totalUsers`. - rpc GetMetadata(GetMetadataRequest) returns (Metadata) { - option (google.api.http) = { - get: "/v1alpha/{name=properties/*/metadata}" - }; - option (google.api.method_signature) = "name"; - } -} - -// A request to create a new recurring audience list. -message CreateRecurringAudienceListRequest { - // Required. The parent resource where this recurring audience list will be - // created. Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/RecurringAudienceList" - } - ]; - - // Required. The recurring audience list to create. - RecurringAudienceList recurring_audience_list = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// A recurring audience list produces new audience lists each day. Audience -// lists are users in an audience at the time of the list's creation. A -// recurring audience list ensures that you have audience list based on the most -// recent data available for use each day. -message RecurringAudienceList { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/RecurringAudienceList" - pattern: "properties/{property}/recurringAudienceLists/{recurring_audience_list}" - plural: "recurringAudienceLists" - singular: "recurringAudienceList" - }; - - // Output only. Identifier. The recurring audience list resource name assigned - // during creation. This resource name identifies this - // `RecurringAudienceList`. - // - // Format: - // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Required. The audience resource name. This resource name identifies the - // audience being listed and is shared between the Analytics Data & Admin - // APIs. - // - // Format: `properties/{property}/audiences/{audience}` - string audience = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The descriptive display name for this audience. For example, - // "Purchasers". - string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The dimensions requested and displayed in the audience list - // response. - repeated AudienceDimension dimensions = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The number of remaining days that a recurring audience export - // will produce an audience list instance. This counter decreases by one each - // day, and when it reaches zero, no new audience lists will be created. - // - // Recurring audience list request for Analytics 360 properties default to 180 - // days and have a maximum of 365 days. Requests for standard Analytics - // properties default to 14 days and have a maximum of 30 days. - // - // The minimum value allowed during creation is 1. Requests above their - // respective maximum will be coerced to their maximum. - optional int32 active_days_remaining = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Audience list resource names for audience list instances - // created for this recurring audience list. One audience list is created for - // each day, and the audience list will be listed here. - // - // This list is ordered with the most recently created audience list first. - repeated string audience_lists = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Configures webhook notifications to be sent from the Google - // Analytics Data API to your webhook server. Use of webhooks is optional. If - // unused, you'll need to poll this API to determine when a recurring audience - // list creates new audience lists. Webhooks allow a notification to be sent - // to your servers & avoid the need for polling. - // - // Two POST requests will be sent each time a recurring audience list creates - // an audience list. This happens once per day until a recurring audience list - // reaches 0 active days remaining. The first request will be sent showing a - // newly created audience list in its CREATING state. The second request will - // be sent after the audience list completes creation (either the ACTIVE or - // FAILED state). - optional WebhookNotification webhook_notification = 8 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configures a long-running operation resource to send a webhook notification -// from the Google Analytics Data API to your webhook server when the resource -// updates. -// -// Notification configurations contain private values & are only visible to your -// GCP project. Different GCP projects may attach different webhook -// notifications to the same long-running operation resource. -message WebhookNotification { - // Optional. The web address that will receive the webhook notification. This - // address will receive POST requests as the state of the long running - // operation resource changes. The POST request will contain both a JSON - // version of the long running operation resource in the body and a - // `sentTimestamp` field. The sent timestamp will specify the unix - // microseconds since the epoch that the request was sent; this lets you - // identify replayed notifications. - // - // An example URI is - // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`. - // - // The URI must use HTTPS and point to a site with a valid SSL certificate on - // the web server. The URI must have a maximum string length of 128 characters - // & use only the allowlisted characters from [RFC - // 1738](https://www.rfc-editor.org/rfc/rfc1738). - // - // When your webhook server receives a notification, it is expected to reply - // with an HTTP response status code of 200 within 5 seconds. - // - // A URI is required to use webhook notifications. - // - // Requests to this webhook server will contain an ID token authenticating the - // service account - // `google-analytics-audience-export@system.gserviceaccount.com`. To learn - // more about ID tokens, see - // https://cloud.google.com/docs/authentication/token-types#id. For Google - // Cloud Functions, this lets you configure your function to require - // authentication. In Cloud IAM, you will need to grant the service account - // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud - // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook - // post request to pass Google Cloud Functions authentication. This API can - // send webhook notifications to arbitrary URIs; for webhook servers other - // than Google Cloud Functions, this ID token in the authorization bearer - // header should be ignored if it is not needed. - optional string uri = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The channel token is an arbitrary string value and must have a - // maximum string length of 64 characters. Channel tokens allow you to verify - // the source of a webhook notification. This guards against the message being - // spoofed. The channel token will be specified in the `X-Goog-Channel-Token` - // HTTP header of the webhook POST request. - // - // A channel token is not required to use webhook notifications. - optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to retrieve configuration metadata about a specific recurring -// audience list. -message GetRecurringAudienceListRequest { - // Required. The recurring audience list resource name. - // Format: - // `properties/{property}/recurringAudienceLists/{recurring_audience_list}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/RecurringAudienceList" - } - ]; -} - -// A request to list all recurring audience lists for a property. -message ListRecurringAudienceListsRequest { - // Required. All recurring audience lists for this property will be listed in - // the response. Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/RecurringAudienceList" - } - ]; - - // Optional. The maximum number of recurring audience lists to return. The - // service may return fewer than this value. If unspecified, at most 200 - // recurring audience lists will be returned. The maximum value is 1000 - // (higher values will be coerced to the maximum). - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent - // page. - // - // When paginating, all other parameters provided to - // `ListRecurringAudienceLists` must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of all recurring audience lists for a property. -message ListRecurringAudienceListsResponse { - // Each recurring audience list for a property. - repeated RecurringAudienceList recurring_audience_lists = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - optional string next_page_token = 2; -} - -// A request to return the PropertyQuotasSnapshot for a given category. -message GetPropertyQuotasSnapshotRequest { - // Required. Quotas from this property will be listed in the response. - // Format: `properties/{property}/propertyQuotasSnapshot` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" - } - ]; -} - -// Current state of all Property Quotas organized by quota category. -message PropertyQuotasSnapshot { - option (google.api.resource) = { - type: "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" - pattern: "properties/{property}/propertyQuotasSnapshot" - plural: "propertyQuotasSnapshots" - singular: "propertyQuotasSnapshot" - }; - - // Identifier. The property quota snapshot resource name. - string name = 4 [(google.api.field_behavior) = IDENTIFIER]; - - // Property Quota for core property tokens - PropertyQuota core_property_quota = 1; - - // Property Quota for realtime property tokens - PropertyQuota realtime_property_quota = 2; - - // Property Quota for funnel property tokens - PropertyQuota funnel_property_quota = 3; -} - -// A request to retrieve configuration metadata about a specific audience list. -message GetAudienceListRequest { - // Required. The audience list resource name. - // Format: `properties/{property}/audienceLists/{audience_list}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/AudienceList" - } - ]; -} - -// A request to list all audience lists for a property. -message ListAudienceListsRequest { - // Required. All audience lists for this property will be listed in the - // response. Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/AudienceList" - } - ]; - - // Optional. The maximum number of audience lists to return. The service may - // return fewer than this value. If unspecified, at most 200 audience lists - // will be returned. The maximum value is 1000 (higher values will be coerced - // to the maximum). - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListAudienceLists` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListAudienceLists` must - // match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of all audience lists for a property. -message ListAudienceListsResponse { - // Each audience list for a property. - repeated AudienceList audience_lists = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - optional string next_page_token = 2; -} - -// A request to create a new audience list. -message CreateAudienceListRequest { - // Required. The parent resource where this audience list will be created. - // Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/AudienceList" - } - ]; - - // Required. The audience list to create. - AudienceList audience_list = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// An audience list is a list of users in an audience at the time of the list's -// creation. One audience may have multiple audience lists created for different -// days. -message AudienceList { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/AudienceList" - pattern: "properties/{property}/audienceLists/{audience_list}" - plural: "audienceLists" - singular: "audienceList" - }; - - // The AudienceList currently exists in this state. - enum State { - // Unspecified state will never be used. - STATE_UNSPECIFIED = 0; - - // The AudienceList is currently creating and will be available in the - // future. Creating occurs immediately after the CreateAudienceList call. - CREATING = 1; - - // The AudienceList is fully created and ready for querying. An AudienceList - // is updated to active asynchronously from a request; this occurs some - // time (for example 15 minutes) after the initial create call. - ACTIVE = 2; - - // The AudienceList failed to be created. It is possible that re-requesting - // this audience list will succeed. - FAILED = 3; - } - - // Output only. Identifier. The audience list resource name assigned during - // creation. This resource name identifies this `AudienceList`. - // - // Format: `properties/{property}/audienceLists/{audience_list}` - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Required. The audience resource name. This resource name identifies the - // audience being listed and is shared between the Analytics Data & Admin - // APIs. - // - // Format: `properties/{property}/audiences/{audience}` - string audience = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The descriptive display name for this audience. For example, - // "Purchasers". - string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The dimensions requested and displayed in the query response. - repeated AudienceDimension dimensions = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The current state for this AudienceList. - optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when CreateAudienceList was called and the - // AudienceList began the `CREATING` state. - optional google.protobuf.Timestamp begin_creating_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total quota tokens charged during creation of the - // AudienceList. Because this token count is based on activity from the - // `CREATING` state, this tokens charged will be fixed once an AudienceList - // enters the `ACTIVE` or `FAILED` states. - int32 creation_quota_tokens_charged = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of rows in the AudienceList result. - optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error message is populated when an audience list fails during - // creation. A common reason for such a failure is quota exhaustion. - optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The percentage completed for this audience export ranging - // between 0 to 100. - optional double percentage_completed = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The recurring audience list that created this audience list. - // Recurring audience lists create audience lists daily. - // - // If audience lists are created directly, they will have no associated - // recurring audience list, and this field will be blank. - optional string recurring_audience_list = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Configures webhook notifications to be sent from the Google - // Analytics Data API to your webhook server. Use of webhooks is optional. If - // unused, you'll need to poll this API to determine when an audience list is - // ready to be used. Webhooks allow a notification to be sent to your servers - // & avoid the need for polling. - // - // Either one or two POST requests will be sent to the webhook. The first POST - // request will be sent immediately showing the newly created audience list in - // its CREATING state. The second POST request will be sent after the audience - // list completes creation (either the ACTIVE or FAILED state). - // - // If identical audience lists are requested in quick succession, the second & - // subsequent audience lists can be served from cache. In that case, the - // audience list create method can return an audience list is already ACTIVE. - // In this scenario, only one POST request will be sent to the webhook. - optional WebhookNotification webhook_notification = 13 - [(google.api.field_behavior) = OPTIONAL]; -} - -// This metadata is currently blank. -message AudienceListMetadata {} - -// A request to list users in an audience list. -message QueryAudienceListRequest { - // Required. The name of the audience list to retrieve users from. - // Format: `properties/{property}/audienceLists/{audience_list}` - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The row count of the start row. The first row is counted as row - // 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return. If unspecified, 10,000 rows are - // returned. The API returns a maximum of 250,000 rows per request, no matter - // how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of users in an audience list. -message QueryAudienceListResponse { - // Configuration data about AudienceList being queried. Returned to help - // interpret the audience rows in this response. For example, the dimensions - // in this AudienceList correspond to the columns in the AudienceRows. - optional AudienceList audience_list = 1; - - // Rows for each user in an audience list. The number of rows in this - // response will be less than or equal to request's page size. - repeated AudienceRow audience_rows = 2; - - // The total number of rows in the AudienceList result. `rowCount` is - // independent of the number of rows returned in the response, the `limit` - // request parameter, and the `offset` request parameter. For example if a - // query returns 175 rows and includes `limit` of 50 in the API request, the - // response will contain `rowCount` of 175 but only 50 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - optional int32 row_count = 3; -} - -// Dimension value attributes for the audience user row. -message AudienceRow { - // Each dimension value attribute for an audience user. One dimension value - // will be added for each dimension column requested. - repeated AudienceDimensionValue dimension_values = 1; -} - -// An audience dimension is a user attribute. Specific user attributed are -// requested and then later returned in the `QueryAudienceListResponse`. -message AudienceDimension { - // Optional. The API name of the dimension. See the [API - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) - // for the list of dimension names. - string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The value of a dimension. -message AudienceDimensionValue { - // One kind of dimension value. - oneof one_value { - // Value as a string if the dimension type is a string. - string value = 1; - } -} - -// The request for a funnel report. -message RunFunnelReportRequest { - // Controls the dimensions present in the funnel visualization sub report - // response. - enum FunnelVisualizationType { - // Unspecified type. - FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0; - - // A standard (stepped) funnel. The funnel visualization sub report in the - // response will not contain date. - STANDARD_FUNNEL = 1; - - // A trended (line chart) funnel. The funnel visualization sub report in the - // response will contain the date dimension. - TRENDED_FUNNEL = 2; - } - - // Optional. A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // Within a batch request, this property should either be unspecified or - // consistent with the batch-level property. - // - // Example: properties/1234 - string property = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Date ranges of data to read. If multiple date ranges are - // requested, each response row will contain a zero based date range index. If - // two date ranges overlap, the event data for the overlapping days is - // included in the response rows for both date ranges. - repeated DateRange date_ranges = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration of this request's funnel. This funnel - // configuration is required. - Funnel funnel = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If specified, this breakdown adds a dimension to the funnel table - // sub report response. This breakdown dimension expands each funnel step to - // the unique values of the breakdown dimension. For example, a breakdown by - // the `deviceCategory` dimension will create rows for `mobile`, `tablet`, - // `desktop`, and the total. - FunnelBreakdown funnel_breakdown = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If specified, next action adds a dimension to the funnel - // visualization sub report response. This next action dimension expands each - // funnel step to the unique values of the next action. For example a next - // action of the `eventName` dimension will create rows for several events - // (for example `session_start` & `click`) and the total. - // - // Next action only supports `eventName` and most Page / Screen dimensions - // like `pageTitle` and `pagePath`. - FunnelNextAction funnel_next_action = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The funnel visualization type controls the dimensions present in - // the funnel visualization sub report response. If not specified, - // `STANDARD_FUNNEL` is used. - FunnelVisualizationType funnel_visualization_type = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configurations of segments. Segments are subsets of a - // property's data. In a funnel report with segments, the funnel is evaluated - // in each segment. - // - // Each segment specified in this request - // produces a separate row in the response; in the response, each segment - // identified by its name. - // - // The segments parameter is optional. Requests are limited to 4 segments. - repeated Segment segments = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return. If unspecified, 10,000 rows are - // returned. The API returns a maximum of 250,000 rows per request, no matter - // how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. - int64 limit = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Dimension filters allow you to ask for only specific dimension - // values in the report. To learn more, see [Creating a Report: Dimension - // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - // for examples. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Toggles whether to return the current state of this Analytics - // Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - bool return_property_quota = 12 [(google.api.field_behavior) = OPTIONAL]; -} - -// The funnel report response contains two sub reports. The two sub reports are -// different combinations of dimensions and metrics. -message RunFunnelReportResponse { - // The funnel table is a report with the funnel step, segment, breakdown - // dimension, active users, completion rate, abandonments, and abandonments - // rate. - // - // The segment dimension is only present in this response if a segment was - // requested. The breakdown dimension is only present in this response if it - // was requested. - FunnelSubReport funnel_table = 1; - - // The funnel visualization is a report with the funnel step, segment, date, - // next action dimension, and active users. - // - // The segment dimension is only present in this response if a segment was - // requested. The date dimension is only present in this response if it was - // requested through the `TRENDED_FUNNEL` funnel type. The next action - // dimension is only present in the response if it was requested. - FunnelSubReport funnel_visualization = 2; - - // This Analytics Property's quota state including this request. - PropertyQuota property_quota = 3; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#runFunnelReport". Useful to distinguish between - // response types in JSON. - string kind = 4; -} - -// A specific report task configuration. -message ReportTask { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/ReportTask" - pattern: "properties/{property}/reportTasks/{report_task}" - plural: "reportTasks" - singular: "reportTask" - }; - - // The definition of how a report should be run. - message ReportDefinition { - // Optional. The dimensions requested and displayed. - repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The metrics requested and displayed. - repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Date ranges of data to read. If multiple date ranges are - // requested, each response row will contain a zero based date range index. - // If two date ranges overlap, the event data for the overlapping days is - // included in the response rows for both date ranges. In a cohort request, - // this `dateRanges` must be unspecified. - repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Dimension filters let you ask for only specific dimension - // values in the report. To learn more, see [Fundamentals of Dimension - // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - // for examples. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter clause of metrics. Applied after aggregating the - // report's rows, similar to SQL having-clause. Dimensions cannot be used in - // this filter. - FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The row count of the start row from Google Analytics Storage. - // The first row is counted as row 0. - // - // When creating a report task, the `offset` and `limit` parameters define - // the subset of data rows from Google Analytics storage to be included in - // the generated report. For example, if there are a total of 300,000 rows - // in Google Analytics storage, the initial report task may have the - // first 10,000 rows with a limit of 10,000 and an offset of 0. - // Subsequently, another report task could cover the next 10,000 rows with a - // limit of 10,000 and an offset of 10,000. - int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return in the Report. If unspecified, - // 10,000 rows are returned. The API returns a maximum of 250,000 rows per - // request, no matter how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. For instance, there are - // fewer than 300 possible values for the dimension `country`, so when - // reporting on only `country`, you can't get more than 300 rows, even if - // you set `limit` to a higher value. - int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Aggregation of metrics. Aggregated metric values will be shown - // in rows where the dimension_values are set to - // "RESERVED_(MetricAggregation)". - repeated MetricAggregation metric_aggregations = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies how rows are ordered in the response. - repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". - // If the field is empty, the report uses the property's default currency. - string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cohort group associated with this request. If there is a cohort - // group in the request the 'cohort' dimension must be present. - CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If false or unspecified, each row with all metrics equal to 0 - // will not be returned. If true, these rows will be returned if they are - // not separately removed by a filter. - // - // Regardless of this `keep_empty_rows` setting, only data recorded by the - // Google Analytics property can be displayed in a report. - // - // For example if a property never logs a `purchase` event, then a query for - // the `eventName` dimension and `eventCount` metric will not have a row - // containing eventName: "purchase" and eventCount: 0. - bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The report's sampling level. - optional SamplingLevel sampling_level = 14 - [(google.api.field_behavior) = OPTIONAL]; - } - - // The report metadata for a specific report task. - message ReportMetadata { - // The processing state. - enum State { - // Unspecified state will never be used. - STATE_UNSPECIFIED = 0; - - // The report is currently creating and will be available in the - // future. Creating occurs immediately after the CreateReport call. - CREATING = 1; - - // The report is fully created and ready for querying. - ACTIVE = 2; - - // The report failed to be created. - FAILED = 3; - } - - // Output only. The current state for this report task. - optional State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when `CreateReportTask` was called and the report - // began the `CREATING` state. - optional google.protobuf.Timestamp begin_creating_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total quota tokens charged during creation of the - // report. Because this token count is based on activity from the `CREATING` - // state, this tokens charge will be fixed once a report task enters the - // `ACTIVE` or `FAILED` state. - int32 creation_quota_tokens_charged = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of rows in the report result. This field - // will be populated when the state is active. You can utilize - // `task_row_count` for pagination within the confines of their existing - // report. - optional int32 task_row_count = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error message is populated if a report task fails during - // creation. - optional string error_message = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of rows in Google Analytics storage. If you - // want to query additional data rows beyond the current report, they can - // initiate a new report task based on the `total_row_count`. - // - // The `task_row_count` represents the number of rows specifically - // pertaining to the current report, whereas `total_row_count` encompasses - // the total count of rows across all data retrieved from Google - // Analytics storage. - // - // For example, suppose the current report's `task_row_count` is 20, - // displaying the data from the first 20 rows. Simultaneously, the - // `total_row_count` is 30, indicating the presence of data for all 30 rows. - // The `task_row_count` can be utilizated to paginate through the initial 20 - // rows. To expand the report and include data from all 30 rows, a new - // report task can be created using the total_row_count to access the full - // set of 30 rows' worth of data. - optional int32 total_row_count = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Identifier. The report task resource name assigned during - // creation. Format: "properties/{property}/reportTasks/{report_task}" - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. A report definition to fetch report data, which describes the - // structure of a report. It typically includes the fields that will be - // included in the report and the criteria that will be used to filter the - // data. - ReportDefinition report_definition = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The report metadata for a specific report task, which provides - // information about a report. It typically includes the following - // information: the resource name of the report, the state of the report, the - // timestamp the report was created, etc, - ReportMetadata report_metadata = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to create a report task. -message CreateReportTaskRequest { - // Required. The parent resource where this report task will be created. - // Format: `properties/{propertyId}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/ReportTask" - } - ]; - - // Required. The report task configuration to create. - ReportTask report_task = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Represents the metadata of a long-running operation. Currently, this metadata -// is blank. -message ReportTaskMetadata {} - -// A request to fetch the report content for a report task. -message QueryReportTaskRequest { - // Required. The report source name. - // Format: `properties/{property}/reportTasks/{report}` - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The row count of the start row in the report. The first row is - // counted as row 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return from the report. If unspecified, - // 10,000 rows are returned. The API returns a maximum of 250,000 rows per - // request, no matter how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. The number of rows - // available to a QueryReportTaskRequest is further limited by the limit of - // the associated ReportTask. A query can retrieve at most ReportTask.limit - // rows. For example, if the ReportTask has a limit of 1,000, then a - // QueryReportTask request with offset=900 and limit=500 will return at most - // 100 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The report content corresponding to a report task. -message QueryReportTaskResponse { - // Describes dimension columns. The number of DimensionHeaders and ordering of - // DimensionHeaders matches the dimensions present in rows. - repeated DimensionHeader dimension_headers = 1; - - // Describes metric columns. The number of MetricHeaders and ordering of - // MetricHeaders matches the metrics present in rows. - repeated MetricHeader metric_headers = 2; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 3; - - // If requested, the totaled values of metrics. - repeated Row totals = 4; - - // If requested, the maximum values of metrics. - repeated Row maximums = 5; - - // If requested, the minimum values of metrics. - repeated Row minimums = 6; - - // The total number of rows in the query result. - int32 row_count = 7; - - // Metadata for the report. - ResponseMetaData metadata = 8; -} - -// A request to retrieve configuration metadata about a specific report task. -message GetReportTaskRequest { - // Required. The report task resource name. - // Format: `properties/{property}/reportTasks/{report_task}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/ReportTask" - } - ]; -} - -// A request to list all report tasks for a property. -message ListReportTasksRequest { - // Required. All report tasks for this property will be listed in the - // response. Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/ReportTask" - } - ]; - - // Optional. The maximum number of report tasks to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListReportTasks` call. - // Provide this to retrieve the subsequent page. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of all report tasks for a property. -message ListReportTasksResponse { - // Each report task for a property. - repeated ReportTask report_tasks = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - optional string next_page_token = 2; -} - -// The request to generate a report. -message RunReportRequest { - // Required. A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // Within a batch request, this property should either be unspecified or - // consistent with the batch-level property. - // - // Example: properties/1234 - string property = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The dimensions requested and displayed. - repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The metrics requested and displayed. - repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Date ranges of data to read. If multiple date ranges are - // requested, each response row will contain a zero based date range index. If - // two date ranges overlap, the event data for the overlapping days is - // included in the response rows for both date ranges. In a cohort request, - // this `dateRanges` must be unspecified. - repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Dimension filters let you ask for only specific dimension values - // in the report. To learn more, see [Fundamentals of Dimension - // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - // for examples. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter clause of metrics. Applied after aggregating the - // report's rows, similar to SQL having-clause. Dimensions cannot be used in - // this filter. - FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The row count of the start row. The first row is counted as row - // 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of rows to return. If unspecified, 10,000 rows - // are returned. The API returns a maximum of 250,000 rows per request, no - // matter how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. For instance, there are - // fewer than 300 possible values for the dimension `country`, so when - // reporting on only `country`, you can't get more than 300 rows, even if you - // set `limit` to a higher value. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Aggregation of metrics. Aggregated metric values will be shown in - // rows where the dimension_values are set to "RESERVED_(MetricAggregation)". - // Aggregates including both comparisons and multiple date ranges will - // be aggregated based on the date ranges. - repeated MetricAggregation metric_aggregations = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies how rows are ordered in the response. - // Requests including both comparisons and multiple date ranges will - // have order bys applied on the comparisons. - repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". - // If the field is empty, the report uses the property's default currency. - string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cohort group associated with this request. If there is a cohort - // group in the request the 'cohort' dimension must be present. - CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If false or unspecified, each row with all metrics equal to 0 - // will not be returned. If true, these rows will be returned if they are not - // separately removed by a filter. - // - // Regardless of this `keep_empty_rows` setting, only data recorded by the - // Google Analytics property can be displayed in a report. - // - // For example if a property never logs a `purchase` event, then a query for - // the `eventName` dimension and `eventCount` metric will not have a row - // eventName: "purchase" and eventCount: 0. - bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Toggles whether to return the current state of this Google - // Analytics property's quota. Quota is returned in - // [PropertyQuota](#PropertyQuota). - bool return_property_quota = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration of comparisons requested and displayed. The - // request only requires a comparisons field in order to receive a comparison - // column in the response. - repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Controls conversion reporting. This field is optional. If this - // field is set or any conversion metrics are requested, the report will be a - // conversion report. - ConversionSpec conversion_spec = 16 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response report table corresponding to a request. -message RunReportResponse { - // Describes dimension columns. The number of DimensionHeaders and ordering of - // DimensionHeaders matches the dimensions present in rows. - repeated DimensionHeader dimension_headers = 1; - - // Describes metric columns. The number of MetricHeaders and ordering of - // MetricHeaders matches the metrics present in rows. - repeated MetricHeader metric_headers = 2; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 3; - - // If requested, the totaled values of metrics. - repeated Row totals = 4; - - // If requested, the maximum values of metrics. - repeated Row maximums = 5; - - // If requested, the minimum values of metrics. - repeated Row minimums = 6; - - // The total number of rows in the query result, regardless of the number of - // rows returned in the response. For example if a query returns 175 rows and - // includes limit = 50 in the API request, the response will contain row_count - // = 175 but only 50 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int32 row_count = 7; - - // Metadata for the report. - ResponseMetaData metadata = 8; - - // This Analytics Property's quota state including this request. - PropertyQuota property_quota = 9; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#runReport". Useful to distinguish between - // response types in JSON. - string kind = 10; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - optional string next_page_token = 11; -} - -// Request for a property's dimension and metric metadata. -message GetMetadataRequest { - // Required. The resource name of the metadata to retrieve. This name field is - // specified in the URL path and not URL parameters. Property is a numeric - // Google Analytics property identifier. To learn more, see [where to find - // your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // - // Example: properties/1234/metadata - // - // Set the Property ID to 0 for dimensions and metrics common to all - // properties. In this special mode, this method will not return custom - // dimensions and metrics. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/Metadata" - } - ]; -} - -// The dimensions, metrics and comparisons currently accepted in reporting -// methods. -message Metadata { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/Metadata" - pattern: "properties/{property}/metadata" - }; - - // Resource name of this metadata. - string name = 3; - - // The dimension descriptions. - repeated DimensionMetadata dimensions = 1; - - // The metric descriptions. - repeated MetricMetadata metrics = 2; - - // The comparison descriptions. - repeated ComparisonMetadata comparisons = 4; - - // The conversion descriptions. - repeated ConversionMetadata conversions = 5; -} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto deleted file mode 100644 index 629c34ca7f1a..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto +++ /dev/null @@ -1,1814 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.analytics.data.v1alpha; - -import "google/protobuf/duration.proto"; - -option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; -option java_multiple_files = true; -option java_outer_classname = "ReportingApiProto"; -option java_package = "com.google.analytics.data.v1alpha"; - -// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. -// Requests are allowed up to 4 date ranges. -message DateRange { - // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot - // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also - // accepted, and in that case, the date is inferred based on the property's - // reporting time zone. - string start_date = 1; - - // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot - // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is - // also accepted, and in that case, the date is inferred based on the - // property's reporting time zone. - string end_date = 2; - - // Assigns a name to this date range. The dimension `dateRange` is valued to - // this name in a report response. If set, cannot begin with `date_range_` or - // `RESERVED_`. If not set, date ranges are named by their zero based index in - // the request: `date_range_0`, `date_range_1`, etc. - string name = 3; -} - -// Dimensions are attributes of your data. For example, the dimension city -// indicates the city from which an event originates. Dimension values in report -// responses are strings; for example, the city could be "Paris" or "New York". -message Dimension { - // The name of the dimension. See the [API - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) - // for the list of dimension names supported by core reporting methods such - // as `runReport` and `batchRunReports`. See - // [Realtime - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) - // for the list of dimension names supported by the `runRealtimeReport` - // method. See - // [Funnel - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) - // for the list of dimension names supported by the `runFunnelReport` - // method. - // - // If `dimensionExpression` is specified, `name` can be any string that you - // would like within the allowed character set. For example if a - // `dimensionExpression` concatenates `country` and `city`, you could call - // that dimension `countryAndCity`. Dimension names that you choose must match - // the regular expression `^[a-zA-Z0-9_]$`. - // - // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, - // `dimensionExpression`, and `pivots`. - string name = 1; - - // One dimension can be the result of an expression of multiple dimensions. - // For example, dimension "country, city": concatenate(country, ", ", city). - DimensionExpression dimension_expression = 2; -} - -// Used to express a dimension which is the result of a formula of multiple -// dimensions. Example usages: -// 1) lower_case(dimension) -// 2) concatenate(dimension1, symbol, dimension2). -message DimensionExpression { - // Used to convert a dimension value to a single case. - message CaseExpression { - // Name of a dimension. The name must refer back to a name in dimensions - // field of the request. - string dimension_name = 1; - } - - // Used to combine dimension values to a single dimension. - message ConcatenateExpression { - // Names of dimensions. The names must refer back to names in the dimensions - // field of the request. - repeated string dimension_names = 1; - - // The delimiter placed between dimension names. - // - // Delimiters are often single characters such as "|" or "," but can be - // longer strings. If a dimension value contains the delimiter, both will be - // present in response with no distinction. For example if dimension 1 value - // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the - // response will contain "US,FR,JP". - string delimiter = 2; - } - - // Specify one type of dimension expression for `DimensionExpression`. - oneof one_expression { - // Used to convert a dimension value to lower case. - CaseExpression lower_case = 4; - - // Used to convert a dimension value to upper case. - CaseExpression upper_case = 5; - - // Used to combine dimension values to a single dimension. - // For example, dimension "country, city": concatenate(country, ", ", city). - ConcatenateExpression concatenate = 6; - } -} - -// The quantitative measurements of a report. For example, the metric -// `eventCount` is the total number of events. Requests are allowed up to 10 -// metrics. -message Metric { - // The name of the metric. See the [API - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) - // for the list of metric names supported by core reporting methods such - // as `runReport` and `batchRunReports`. See - // [Realtime - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) - // for the list of metric names supported by the `runRealtimeReport` - // method. See - // [Funnel - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) - // for the list of metric names supported by the `runFunnelReport` - // method. - // - // If `expression` is specified, `name` can be any string that you would like - // within the allowed character set. For example if `expression` is - // `screenPageViews/sessions`, you could call that metric's name = - // `viewsPerSession`. Metric names that you choose must match the regular - // expression `^[a-zA-Z0-9_]$`. - // - // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric - // `expression`. - string name = 1; - - // A mathematical expression for derived metrics. For example, the metric - // Event count per user is `eventCount/totalUsers`. - string expression = 2; - - // Indicates if a metric is invisible in the report response. If a metric is - // invisible, the metric will not produce a column in the response, but can be - // used in `metricFilter`, `orderBys`, or a metric `expression`. - bool invisible = 3; -} - -// Defines an individual comparison. Most requests will include multiple -// comparisons so that the report compares between the comparisons. -message Comparison { - // Each comparison produces separate rows in the response. In the response, - // this comparison is identified by this name. If name is unspecified, we will - // use the saved comparisons display name. - optional string name = 1; - - oneof one_comparison { - // A basic comparison. - FilterExpression dimension_filter = 2; - - // A saved comparison identified by the comparison's resource name. - // For example, 'comparisons/1234'. - string comparison = 3; - } -} - -// To express dimension or metric filters. The fields in the same -// FilterExpression need to be either all dimensions or all metrics. -message FilterExpression { - // Specify one type of filter expression for `FilterExpression`. - oneof expr { - // The FilterExpressions in and_group have an AND relationship. - FilterExpressionList and_group = 1; - - // The FilterExpressions in or_group have an OR relationship. - FilterExpressionList or_group = 2; - - // The FilterExpression is NOT of not_expression. - FilterExpression not_expression = 3; - - // A primitive filter. In the same FilterExpression, all of the filter's - // field names need to be either all dimensions or all metrics. - Filter filter = 4; - } -} - -// A list of filter expressions. -message FilterExpressionList { - // A list of filter expressions. - repeated FilterExpression expressions = 1; -} - -// An expression to filter dimension or metric values. -message Filter { - // The dimension name or metric name. Must be a name defined in dimensions - // or metrics. - string field_name = 1; - - // Specify one type of filter for `Filter`. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 2; - - // A filter for in list values. - InListFilter in_list_filter = 3; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 4; - - // A filter for between two values. - BetweenFilter between_filter = 5; - - // A filter for empty values such as "(not set)" and "" values. - EmptyFilter empty_filter = 6; - } -} - -// The filter for string -message StringFilter { - // The match type of a string filter - enum MatchType { - // Unspecified - MATCH_TYPE_UNSPECIFIED = 0; - - // Exact match of the string value. - EXACT = 1; - - // Begins with the string value. - BEGINS_WITH = 2; - - // Ends with the string value. - ENDS_WITH = 3; - - // Contains the string value. - CONTAINS = 4; - - // Full match for the regular expression with the string value. - FULL_REGEXP = 5; - - // Partial match for the regular expression with the string value. - PARTIAL_REGEXP = 6; - } - - // The match type for this filter. - MatchType match_type = 1; - - // The string value used for the matching. - string value = 2; - - // If true, the string value is case sensitive. - bool case_sensitive = 3; -} - -// The result needs to be in a list of string values. -message InListFilter { - // The list of string values. - // Must be non-empty. - repeated string values = 1; - - // If true, the string value is case sensitive. - bool case_sensitive = 2; -} - -// Filters for numeric or date values. -message NumericFilter { - // The operation applied to a numeric filter - enum Operation { - // Unspecified. - OPERATION_UNSPECIFIED = 0; - - // Equal - EQUAL = 1; - - // Less than - LESS_THAN = 2; - - // Less than or equal - LESS_THAN_OR_EQUAL = 3; - - // Greater than - GREATER_THAN = 4; - - // Greater than or equal - GREATER_THAN_OR_EQUAL = 5; - } - - // The operation type for this filter. - Operation operation = 1; - - // A numeric value or a date value. - NumericValue value = 2; -} - -// Order bys define how rows will be sorted in the response. For example, -// ordering rows by descending event count is one ordering, and ordering rows by -// the event name string is a different ordering. -message OrderBy { - // Sorts by metric values. - message MetricOrderBy { - // A metric name in the request to order by. - string metric_name = 1; - } - - // Sorts by dimension values. - message DimensionOrderBy { - // Rule to order the string dimension values by. - enum OrderType { - // Unspecified. - ORDER_TYPE_UNSPECIFIED = 0; - - // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < - // "b" < "z". - ALPHANUMERIC = 1; - - // Case insensitive alphanumeric sort by lower case Unicode code point. - // For example, "2" < "A" < "b" < "X" < "z". - CASE_INSENSITIVE_ALPHANUMERIC = 2; - - // Dimension values are converted to numbers before sorting. For example - // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < - // "25". Non-numeric dimension values all have equal ordering value below - // all numeric values. - NUMERIC = 3; - } - - // A dimension name in the request to order by. - string dimension_name = 1; - - // Controls the rule for dimension value ordering. - OrderType order_type = 2; - } - - // Specify one type of order by for `OrderBy`. - oneof one_order_by { - // Sorts results by a metric's values. - MetricOrderBy metric = 1; - - // Sorts results by a dimension's values. - DimensionOrderBy dimension = 2; - } - - // If true, sorts by descending order. - bool desc = 4; -} - -// To express that the result needs to be between two numbers (inclusive). -message BetweenFilter { - // Begins with this number. - NumericValue from_value = 1; - - // Ends with this number. - NumericValue to_value = 2; -} - -// Filter for empty values. -message EmptyFilter {} - -// To represent a number. -message NumericValue { - // One of a numeric value - oneof one_value { - // Integer value - int64 int64_value = 1; - - // Double value - double double_value = 2; - } -} - -// The specification of cohorts for a cohort report. -// -// Cohort reports create a time series of user retention for the cohort. For -// example, you could select the cohort of users that were acquired in the first -// week of September and follow that cohort for the next six weeks. Selecting -// the users acquired in the first week of September cohort is specified in the -// `cohort` object. Following that cohort for the next six weeks is specified in -// the `cohortsRange` object. -// -// For examples, see [Cohort Report -// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). -// -// The report response could show a weekly time series where say your app has -// retained 60% of this cohort after three weeks and 25% of this cohort after -// six weeks. These two percentages can be calculated by the metric -// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. -message CohortSpec { - // Defines the selection criteria to group users into cohorts. - // - // Most cohort reports define only a single cohort. If multiple cohorts are - // specified, each cohort can be recognized in the report by their name. - repeated Cohort cohorts = 1; - - // Cohort reports follow cohorts over an extended reporting date range. This - // range specifies an offset duration to follow the cohorts over. - CohortsRange cohorts_range = 2; - - // Optional settings for a cohort report. - CohortReportSettings cohort_report_settings = 3; -} - -// Defines a cohort selection criteria. A cohort is a group of users who share -// a common characteristic. For example, users with the same `firstSessionDate` -// belong to the same cohort. -message Cohort { - // Assigns a name to this cohort. The dimension `cohort` is valued to this - // name in a report response. If set, cannot begin with `cohort_` or - // `RESERVED_`. If not set, cohorts are named by their zero based index - // `cohort_0`, `cohort_1`, etc. - string name = 1; - - // Dimension used by the cohort. Required and only supports - // `firstSessionDate`. - string dimension = 2; - - // The cohort selects users whose first touch date is between start date and - // end date defined in the `dateRange`. This `dateRange` does not specify the - // full date range of event data that is present in a cohort report. In a - // cohort report, this `dateRange` is extended by the granularity and offset - // present in the `cohortsRange`; event data for the extended reporting date - // range is present in a cohort report. - // - // In a cohort request, this `dateRange` is required and the `dateRanges` in - // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. - // - // This `dateRange` should generally be aligned with the cohort's granularity. - // If `CohortsRange` uses daily granularity, this `dateRange` can be a single - // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be - // aligned to a week boundary, starting at Sunday and ending Saturday. If - // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to - // a month, starting at the first and ending on the last day of the month. - DateRange date_range = 3; -} - -// Configures the extended reporting date range for a cohort report. Specifies -// an offset duration to follow the cohorts over. -message CohortsRange { - // The granularity used to interpret the `startOffset` and `endOffset` for the - // extended reporting date range for a cohort report. - enum Granularity { - // Should never be specified. - GRANULARITY_UNSPECIFIED = 0; - - // Daily granularity. Commonly used if the cohort's `dateRange` is a single - // day and the request contains `cohortNthDay`. - DAILY = 1; - - // Weekly granularity. Commonly used if the cohort's `dateRange` is a week - // in duration (starting on Sunday and ending on Saturday) and the request - // contains `cohortNthWeek`. - WEEKLY = 2; - - // Monthly granularity. Commonly used if the cohort's `dateRange` is a month - // in duration and the request contains `cohortNthMonth`. - MONTHLY = 3; - } - - // Required. The granularity used to interpret the `startOffset` and - // `endOffset` for the extended reporting date range for a cohort report. - Granularity granularity = 1; - - // `startOffset` specifies the start date of the extended reporting date range - // for a cohort report. `startOffset` is commonly set to 0 so that reports - // contain data from the acquisition of the cohort forward. - // - // If `granularity` is `DAILY`, the `startDate` of the extended reporting date - // range is `startDate` of the cohort plus `startOffset` days. - // - // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting - // date range is `startDate` of the cohort plus `startOffset * 7` days. - // - // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting - // date range is `startDate` of the cohort plus `startOffset * 30` days. - int32 start_offset = 2; - - // Required. `endOffset` specifies the end date of the extended reporting date - // range for a cohort report. `endOffset` can be any positive integer but is - // commonly set to 5 to 10 so that reports contain data on the cohort for the - // next several granularity time periods. - // - // If `granularity` is `DAILY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset` days. - // - // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset * 7` days. - // - // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset * 30` days. - int32 end_offset = 3; -} - -// Optional settings of a cohort report. -message CohortReportSettings { - // If true, accumulates the result from first touch day to the end day. Not - // supported in `RunReportRequest`. - bool accumulate = 1; -} - -// Identifies if the report data is from the standard report data or -// conversion data -enum Section { - // Should never be specified. - SECTION_UNSPECIFIED = 0; - - // The report data is from the standard report data. Google Analytics reports - // include acquisition, engagement, and user behavior reports. Reports use - // dimensions like session source & landing page; reports use metrics like - // sessions, views, and engagement time. - SECTION_REPORT = 1; - - // The report data is from the conversion data. The Google Analytics - // Advertising section reports on conversion performance. Advertising reports - // use dimensions like source & medium; advertising reports use metrics like - // all conversions and ads cost. - SECTION_ADVERTISING = 2; -} - -// Response's metadata carrying additional information about the report content. -message ResponseMetaData { - // The schema restrictions actively enforced in creating this report. To learn - // more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - message SchemaRestrictionResponse { - // A metric actively restricted in creating the report. - message ActiveMetricRestriction { - // The name of the restricted metric. - optional string metric_name = 1; - - // The reason for this metric's restriction. - repeated RestrictedMetricType restricted_metric_types = 2; - } - - // All restrictions actively enforced in creating the report. For example, - // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. - // However, this active response restriction is only populated if the user's - // custom role disallows access to `REVENUE_DATA`. - repeated ActiveMetricRestriction active_metric_restrictions = 1; - } - - // If true, indicates some buckets of dimension combinations are rolled into - // "(other)" row. This can happen for high cardinality reports. - // - // The metadata parameter dataLossFromOtherRow is populated based on the - // aggregated data table used in the report. The parameter will be accurately - // populated regardless of the filters and limits in the report. - // - // For example, the (other) row could be dropped from the report because the - // request contains a filter on sessionSource = google. This parameter will - // still be populated if data loss from other row was present in the input - // aggregate data used to generate this report. - // - // To learn more, see [About the (other) row and data - // sampling](https://support.google.com/analytics/answer/13208658#reports). - bool data_loss_from_other_row = 3; - - // Describes the schema restrictions actively enforced in creating this - // report. To learn more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - optional SchemaRestrictionResponse schema_restriction_response = 4; - - // The currency code used in this report. Intended to be used in formatting - // currency metrics like `purchaseRevenue` for visualization. If currency_code - // was specified in the request, this response parameter will echo the request - // parameter; otherwise, this response parameter is the property's current - // currency_code. - // - // Currency codes are string encodings of currency types from the ISO 4217 - // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", - // "EUR", "JPY". To learn more, see - // https://support.google.com/analytics/answer/9796179. - optional string currency_code = 5; - - // The property's current timezone. Intended to be used to interpret - // time-based dimensions like `hour` and `minute`. Formatted as strings from - // the IANA Time Zone database (https://www.iana.org/time-zones); for example - // "America/New_York" or "Asia/Tokyo". - optional string time_zone = 6; - - // If empty reason is specified, the report is empty for this reason. - optional string empty_reason = 7; - - // If `subjectToThresholding` is true, this report is subject to thresholding - // and only returns data that meets the minimum aggregation thresholds. It is - // possible for a request to be subject to thresholding thresholding and no - // data is absent from the report, and this happens when all data is above the - // thresholds. To learn more, see [Data - // thresholds](https://support.google.com/analytics/answer/9383630) and [About - // Demographics and - // Interests](https://support.google.com/analytics/answer/2799357). - optional bool subject_to_thresholding = 8; - - // If this report results is - // [sampled](https://support.google.com/analytics/answer/13331292), this - // describes the percentage of events used in this report. One - // `samplingMetadatas` is populated for each date range. Each - // `samplingMetadatas` corresponds to a date range in order that date ranges - // were specified in the request. - // - // However if the results are not sampled, this field will not be defined. - repeated SamplingMetadata sampling_metadatas = 9; - - // Identifies the type of data in the report. - Section section = 10; -} - -// Describes a dimension column in the report. Dimensions requested in a report -// produce column entries within rows and DimensionHeaders. However, dimensions -// used exclusively within filters or expressions do not produce columns in a -// report; correspondingly, those dimensions do not produce headers. -message DimensionHeader { - // The dimension's name. - string name = 1; -} - -// Describes a metric column in the report. Visible metrics requested in a -// report produce column entries within rows and MetricHeaders. However, -// metrics used exclusively within filters or expressions do not produce columns -// in a report; correspondingly, those metrics do not produce headers. -message MetricHeader { - // The metric's name. - string name = 1; - - // The metric's data type. - MetricType type = 2; -} - -// Report data for each row. -// For example if RunReportRequest contains: -// -// ```none -// "dimensions": [ -// { -// "name": "eventName" -// }, -// { -// "name": "countryId" -// } -// ], -// "metrics": [ -// { -// "name": "eventCount" -// } -// ] -// ``` -// -// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and -// 15 as the eventCount, would be: -// -// ```none -// "dimensionValues": [ -// { -// "value": "in_app_purchase" -// }, -// { -// "value": "JP" -// } -// ], -// "metricValues": [ -// { -// "value": "15" -// } -// ] -// ``` -message Row { - // List of requested dimension values. In a PivotReport, dimension_values - // are only listed for dimensions included in a pivot. - repeated DimensionValue dimension_values = 1; - - // List of requested visible metric values. - repeated MetricValue metric_values = 2; -} - -// The value of a dimension. -message DimensionValue { - // One kind of dimension value - oneof one_value { - // Value as a string if the dimension type is a string. - string value = 1; - } -} - -// The value of a metric. -message MetricValue { - // One of metric value - oneof one_value { - // Measurement value. See MetricHeader for type. - string value = 4; - } -} - -// Current state of all quotas for this Analytics Property. If any quota for a -// property is exhausted, all requests to that property will return Resource -// Exhausted errors. -message PropertyQuota { - // Standard Analytics Properties can use up to 200,000 tokens per day; - // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests - // consume fewer than 10 tokens. - QuotaStatus tokens_per_day = 1; - - // Standard Analytics Properties can use up to 40,000 tokens per hour; - // Analytics 360 Properties can use 400,000 tokens per hour. An API request - // consumes a single number of tokens, and that number is deducted from all of - // the hourly, daily, and per project hourly quotas. - QuotaStatus tokens_per_hour = 2; - - // Standard Analytics Properties can send up to 10 concurrent requests; - // Analytics 360 Properties can use up to 50 concurrent requests. - QuotaStatus concurrent_requests = 3; - - // Standard Analytics Properties and cloud project pairs can have up to 10 - // server errors per hour; Analytics 360 Properties and cloud project pairs - // can have up to 50 server errors per hour. - QuotaStatus server_errors_per_project_per_hour = 4; - - // Analytics Properties can send up to 120 requests with potentially - // thresholded dimensions per hour. In a batch request, each report request - // is individually counted for this quota if the request contains potentially - // thresholded dimensions. - QuotaStatus potentially_thresholded_requests_per_hour = 5; - - // Analytics Properties can use up to 35% of their tokens per project per - // hour. This amounts to standard Analytics Properties can use up to 14,000 - // tokens per project per hour, and Analytics 360 Properties can use 140,000 - // tokens per project per hour. An API request consumes a single number of - // tokens, and that number is deducted from all of the hourly, daily, and per - // project hourly quotas. - QuotaStatus tokens_per_project_per_hour = 6; -} - -// Current state for a particular quota group. -message QuotaStatus { - // Quota consumed by this request. - int32 consumed = 1; - - // Quota remaining after this request. - int32 remaining = 2; -} - -// Breakdowns add a dimension to the funnel table sub report response. -message FunnelBreakdown { - // The dimension column added to the funnel table sub report response. The - // breakdown dimension breaks down each funnel step. A valid - // `breakdownDimension` is required if `funnelBreakdown` is specified. - Dimension breakdown_dimension = 1; - - // The maximum number of distinct values of the breakdown dimension to return - // in the response. A `limit` of `5` is used if limit is not specified. Limit - // must exceed zero and cannot exceed 15. - optional int64 limit = 2; -} - -// Next actions state the value for a dimension after the user has achieved -// a step but before the same user has achieved the next step. For example if -// the `nextActionDimension` is `eventName`, then `nextActionDimension` in the -// `i`th funnel step row will return first event after the event that qualified -// the user into the `i`th funnel step but before the user achieved the `i+1`th -// funnel step. -message FunnelNextAction { - // The dimension column added to the funnel visualization sub report response. - // The next action dimension returns the next dimension value of this - // dimension after the user has attained the `i`th funnel step. - // - // `nextActionDimension` currently only supports `eventName` and most Page / - // Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` - // cannot be a dimension expression. - Dimension next_action_dimension = 1; - - // The maximum number of distinct values of the breakdown dimension to return - // in the response. A `limit` of `5` is used if limit is not specified. Limit - // must exceed zero and cannot exceed 5. - optional int64 limit = 2; -} - -// Configures the funnel in a funnel report request. A funnel reports on users -// as they pass through a sequence of steps. -// -// Funnel exploration lets you visualize the steps your users take to complete a -// task and quickly see how well they are succeeding or failing at each step. -// For example, how do prospects become shoppers and then become buyers? How do -// one time buyers become repeat buyers? With this information, you can improve -// inefficient or abandoned customer journeys. -message Funnel { - // In an open funnel, users can enter the funnel in any step, and in a closed - // funnel, users must enter the funnel in the first step. Optional. If - // unspecified, a closed funnel is used. - bool is_open_funnel = 1; - - // The sequential steps of this funnel. - repeated FunnelStep steps = 2; -} - -// Steps define the user journey you want to measure. Steps contain one or -// more conditions that your users must meet to be included in that step of -// the funnel journey. -message FunnelStep { - // The distinctive name for this step. If unspecified, steps will be named - // by a 1 based indexed name (for example "0. ", "1. ", etc.). This name - // defines string value returned by the `funnelStepName` dimension. For - // example, specifying `name = Purchase` in the request's third funnel step - // will produce `3. Purchase` in the funnel report response. - string name = 1; - - // If true, this step must directly follow the previous step. If false, - // there can be events between the previous step and this step. If - // unspecified, `isDirectlyFollowedBy` is treated as false. - bool is_directly_followed_by = 2; - - // If specified, this step must complete within this duration of the - // completion of the prior step. `withinDurationFromPriorStep` is inclusive - // of the endpoint at the microsecond granularity. For example a duration of - // 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 - // microsecond. - // - // `withinDurationFromPriorStep` is optional, and if unspecified, steps may - // be separated by any time duration. - optional google.protobuf.Duration within_duration_from_prior_step = 3; - - // The condition that your users must meet to be included in this step of - // the funnel journey. - FunnelFilterExpression filter_expression = 4; -} - -// Funnel sub reports contain the dimension and metric data values. For example, -// 12 users reached the second step of the funnel. -message FunnelSubReport { - // Describes dimension columns. Funnel reports always include the funnel step - // dimension in sub report responses. Additional dimensions like breakdowns, - // dates, and next actions may be present in the response if requested. - repeated DimensionHeader dimension_headers = 1; - - // Describes metric columns. Funnel reports always include active users in sub - // report responses. The funnel table includes additional metrics like - // completion rate, abandonments, and abandonments rate. - repeated MetricHeader metric_headers = 2; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 3; - - // Metadata for the funnel report. - FunnelResponseMetadata metadata = 4; -} - -// User segments are subsets of users who engaged with your site or app. For -// example, users who have previously purchased; users who added items to their -// shopping carts, but didn’t complete a purchase. -message UserSegment { - // Defines which users are included in this segment. Optional. - UserSegmentCriteria user_inclusion_criteria = 1; - - // Defines which users are excluded in this segment. Optional. - UserSegmentExclusion exclusion = 2; -} - -// A user matches a criteria if the user's events meet the conditions in the -// criteria. -message UserSegmentCriteria { - // A user matches this criteria if the user matches each of these - // `andConditionGroups` and each of the `andSequenceGroups`. - // `andConditionGroups` may be empty if `andSequenceGroups` are specified. - repeated UserSegmentConditionGroup and_condition_groups = 1; - - // A user matches this criteria if the user matches each of these - // `andSequenceGroups` and each of the `andConditionGroups`. - // `andSequenceGroups` may be empty if `andConditionGroups` are specified. - repeated UserSegmentSequenceGroup and_sequence_groups = 2; -} - -// Scoping specifies which events are considered when evaluating if a user -// meets a criteria. -enum UserCriteriaScoping { - // Unspecified criteria scoping. Do not specify. - USER_CRITERIA_SCOPING_UNSPECIFIED = 0; - - // If the criteria is satisfied within one event, the user matches the - // criteria. - USER_CRITERIA_WITHIN_SAME_EVENT = 1; - - // If the criteria is satisfied within one session, the user matches the - // criteria. - USER_CRITERIA_WITHIN_SAME_SESSION = 2; - - // If the criteria is satisfied by any events for the user, the user - // matches the criteria. - USER_CRITERIA_ACROSS_ALL_SESSIONS = 3; -} - -// Conditions tell Analytics what data to include in or exclude from the -// segment. -message UserSegmentConditionGroup { - // Data is included or excluded from the segment based on if it matches - // the condition group. This scoping defines how many events the - // `segmentFilterExpression` is evaluated on before the condition group - // is determined to be matched or not. For example if `conditionScoping = - // USER_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all - // events in a session, and then, the condition group is determined to be - // matched or not for this user. For example if `conditionScoping = - // USER_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a single - // event, and then, the condition group is determined to be matched or not for - // this user. - // - // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is - // used. - UserCriteriaScoping condition_scoping = 1; - - // Data is included or excluded from the segment based on if it matches - // this expression. Expressions express criteria on dimension, metrics, - // and/or parameters. - SegmentFilterExpression segment_filter_expression = 2; -} - -// Define conditions that must occur in a specific order for the user to be -// a member of the segment. -message UserSegmentSequenceGroup { - // All sequence steps must be satisfied in the scoping for the user to - // match the sequence. For example if `sequenceScoping = - // USER_CRITERIA_WITHIN_SAME_SESSION`, all sequence steps must complete within - // one session for the user to match the sequence. `sequenceScoping = - // USER_CRITERIA_WITHIN_SAME_EVENT` is not supported. - // - // Optional. If unspecified, `conditionScoping = ACROSS_ALL_SESSIONS` is - // used. - UserCriteriaScoping sequence_scoping = 1; - - // Defines the time period in which the whole sequence must occur; for - // example, 30 Minutes. `sequenceMaximumDuration` is inclusive - // of the endpoint at the microsecond granularity. For example a sequence - // with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 - // seconds, but not 5 seconds and 1 microsecond. - // - // `sequenceMaximumDuration` is optional, and if unspecified, sequences can - // be completed in any time duration. - google.protobuf.Duration sequence_maximum_duration = 2; - - // An ordered sequence of condition steps. A user's events must complete - // each step in order for the user to match the - // `UserSegmentSequenceGroup`. - repeated UserSequenceStep user_sequence_steps = 3; -} - -// A condition that must occur in the specified step order for this user -// to match the sequence. -message UserSequenceStep { - // If true, the event satisfying this step must be the very next event - // after the event satifying the last step. If false, this step indirectly - // follows the prior step; for example, there may be events between the - // prior step and this step. `isDirectlyFollowedBy` must be false for - // the first step. - bool is_directly_followed_by = 1; - - // This sequence step must be satisfied in the scoping for the user to - // match the sequence. For example if `sequenceScoping = - // WITHIN_SAME_SESSION`, this sequence steps must complete within one - // session for the user to match the sequence. `stepScoping = - // ACROSS_ALL_SESSIONS` is only allowed if the `sequenceScoping = - // ACROSS_ALL_SESSIONS`. - // - // Optional. If unspecified, `stepScoping` uses the same - // `UserCriteriaScoping` as the `sequenceScoping`. - UserCriteriaScoping step_scoping = 2; - - // A user matches this sequence step if their events match this - // expression. Expressions express criteria on dimension, metrics, - // and/or parameters. - SegmentFilterExpression segment_filter_expression = 3; -} - -// Specifies which users are excluded in this segment. -message UserSegmentExclusion { - // Specifies how long an exclusion will last if a user matches the - // `userExclusionCriteria`. - // - // Optional. If unspecified, `userExclusionDuration` of - // `USER_EXCLUSION_TEMPORARY` is used. - UserExclusionDuration user_exclusion_duration = 1; - - // If a user meets this condition, the user is excluded from membership in - // the segment for the `userExclusionDuration`. - UserSegmentCriteria user_exclusion_criteria = 2; -} - -// Enumerates options for how long an exclusion will last if a user matches -// the `userExclusionCriteria`. -enum UserExclusionDuration { - // Unspecified exclusion duration. Do not specify. - USER_EXCLUSION_DURATION_UNSPECIFIED = 0; - - // Temporarily exclude users from the segment during periods when the - // user meets the `userExclusionCriteria` condition. - USER_EXCLUSION_TEMPORARY = 1; - - // Permanently exclude users from the segment if the user ever meets the - // `userExclusionCriteria` condition. - USER_EXCLUSION_PERMANENT = 2; -} - -// Session segments are subsets of the sessions that occurred on your site or -// app: for example, all the sessions that originated from a particular -// advertising campaign. -message SessionSegment { - // Defines which sessions are included in this segment. Optional. - SessionSegmentCriteria session_inclusion_criteria = 1; - - // Defines which sessions are excluded in this segment. Optional. - SessionSegmentExclusion exclusion = 2; -} - -// A session matches a criteria if the session's events meet the conditions in -// the criteria. -message SessionSegmentCriteria { - // A session matches this criteria if the session matches each of these - // `andConditionGroups`. - repeated SessionSegmentConditionGroup and_condition_groups = 1; -} - -// Scoping specifies which events are considered when evaluating if a -// session meets a criteria. -enum SessionCriteriaScoping { - // Unspecified criteria scoping. Do not specify. - SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0; - - // If the criteria is satisfied within one event, the session matches the - // criteria. - SESSION_CRITERIA_WITHIN_SAME_EVENT = 1; - - // If the criteria is satisfied within one session, the session matches - // the criteria. - SESSION_CRITERIA_WITHIN_SAME_SESSION = 2; -} - -// Conditions tell Analytics what data to include in or exclude from the -// segment. -message SessionSegmentConditionGroup { - // Data is included or excluded from the segment based on if it matches - // the condition group. This scoping defines how many events the - // `segmentFilterExpression` is evaluated on before the condition group - // is determined to be matched or not. For example if `conditionScoping = - // SESSION_CRITERIA_WITHIN_SAME_SESSION`, the expression is evaluated on all - // events in a session, and then, the condition group is determined to be - // matched or not for this session. For example if `conditionScoping = - // SESSION_CRITERIA_WITHIN_SAME_EVENT`, the expression is evaluated on a - // single event, and then, the condition group is determined to be matched or - // not for this session. - // - // Optional. If unspecified, a `conditionScoping` of `WITHIN_SAME_SESSION` - // is used. - SessionCriteriaScoping condition_scoping = 1; - - // Data is included or excluded from the segment based on if it matches - // this expression. Expressions express criteria on dimension, metrics, - // and/or parameters. - SegmentFilterExpression segment_filter_expression = 2; -} - -// Specifies which sessions are excluded in this segment. -message SessionSegmentExclusion { - // Specifies how long an exclusion will last if a session matches the - // `sessionExclusionCriteria`. - // - // Optional. If unspecified, a `sessionExclusionDuration` of - // `SESSION_EXCLUSION_TEMPORARY` is used. - SessionExclusionDuration session_exclusion_duration = 1; - - // If a session meets this condition, the session is excluded from - // membership in the segment for the `sessionExclusionDuration`. - SessionSegmentCriteria session_exclusion_criteria = 2; -} - -// Enumerates options for how long an exclusion will last if a session -// matches the `sessionExclusionCriteria`. -enum SessionExclusionDuration { - // Unspecified exclusion duration. Do not specify. - SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0; - - // Temporarily exclude sessions from the segment during periods when the - // session meets the `sessionExclusionCriteria` condition. - SESSION_EXCLUSION_TEMPORARY = 1; - - // Permanently exclude sessions from the segment if the session ever meets - // the `sessionExclusionCriteria` condition. - SESSION_EXCLUSION_PERMANENT = 2; -} - -// Event segments are subsets of events that were triggered on your site or app. -// for example, all purchase events made in a particular location; app_exception -// events that occurred on a specific operating system. -message EventSegment { - // Defines which events are included in this segment. Optional. - EventSegmentCriteria event_inclusion_criteria = 1; - - // Defines which events are excluded in this segment. Optional. - EventSegmentExclusion exclusion = 2; -} - -// An event matches a criteria if the event meet the conditions in the -// criteria. -message EventSegmentCriteria { - // An event matches this criteria if the event matches each of these - // `andConditionGroups`. - repeated EventSegmentConditionGroup and_condition_groups = 1; -} - -// Scoping specifies which events are considered when evaluating if an event -// meets a criteria. -enum EventCriteriaScoping { - // Unspecified criteria scoping. Do not specify. - EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0; - - // If the criteria is satisfied within one event, the event matches the - // criteria. - EVENT_CRITERIA_WITHIN_SAME_EVENT = 1; -} - -// Conditions tell Analytics what data to include in or exclude from the -// segment. -message EventSegmentConditionGroup { - // `conditionScoping` should always be `EVENT_CRITERIA_WITHIN_SAME_EVENT`. - // - // Optional. If unspecified, a `conditionScoping` of - // `EVENT_CRITERIA_WITHIN_SAME_EVENT` is used. - EventCriteriaScoping condition_scoping = 1; - - // Data is included or excluded from the segment based on if it matches - // this expression. Expressions express criteria on dimension, metrics, - // and/or parameters. - SegmentFilterExpression segment_filter_expression = 2; -} - -// Specifies which events are excluded in this segment. -message EventSegmentExclusion { - // `eventExclusionDuration` should always be `PERMANENTLY_EXCLUDE`. - // - // Optional. If unspecified, an `eventExclusionDuration` of - // `EVENT_EXCLUSION_PERMANENT` is used. - EventExclusionDuration event_exclusion_duration = 1; - - // If an event meets this condition, the event is excluded from membership - // in the segment for the `eventExclusionDuration`. - EventSegmentCriteria event_exclusion_criteria = 2; -} - -// Enumerates options for how long an exclusion will last if an event -// matches the `eventExclusionCriteria`. -enum EventExclusionDuration { - // Unspecified exclusion duration. Do not specify. - EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0; - - // Permanently exclude events from the segment if the event ever meets - // the `eventExclusionCriteria` condition. - EVENT_EXCLUSION_PERMANENT = 1; -} - -// A segment is a subset of your Analytics data. For example, of your entire set -// of users, one segment might be users from a particular country or city. -// Another segment might be users who purchase a particular line of products or -// who visit a specific part of your site or trigger certain events in your app. -// -// To learn more, see [Segment -// Builder](https://support.google.com/analytics/answer/9304353). -message Segment { - // The name for this segment. If unspecified, segments are named "Segment". - // This name defines string value returned by the `segment` dimension. The - // `segment` dimension prefixes segment names by the 1-based index number of - // the segment in the request (for example "1. Segment", "2. Segment", etc.). - string name = 1; - - // A segment is specified in one scope. - oneof one_segment_scope { - // User segments are subsets of users who engaged with your site or app. - UserSegment user_segment = 2; - - // Session segments are subsets of the sessions that occurred on your site - // or app. - SessionSegment session_segment = 3; - - // Event segments are subsets of events that were triggered on your site or - // app. - EventSegment event_segment = 4; - } -} - -// Expresses combinations of segment filters. -message SegmentFilterExpression { - // Specify one type of filter for `SegmentFilterExpression`. - oneof expr { - // The SegmentFilterExpression in `andGroup` have an AND relationship. - SegmentFilterExpressionList and_group = 1; - - // The SegmentFilterExpression in `orGroup` have an OR relationship. - SegmentFilterExpressionList or_group = 2; - - // The SegmentFilterExpression is NOT of `notExpression`. - SegmentFilterExpression not_expression = 3; - - // A primitive segment filter. - SegmentFilter segment_filter = 4; - - // Creates a filter that matches events of a single event name. If a - // parameter filter expression is specified, only the subset of events that - // match both the single event name and the parameter filter expressions - // match this event filter. - SegmentEventFilter segment_event_filter = 5; - } -} - -// A list of segment filter expressions. -message SegmentFilterExpressionList { - // The list of segment filter expressions - repeated SegmentFilterExpression expressions = 1; -} - -// An expression to filter dimension or metric values. -message SegmentFilter { - // The dimension name or metric name. - string field_name = 1; - - // Specify one type of filter for `Filter`. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 4; - - // A filter for in list values. - InListFilter in_list_filter = 5; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 6; - - // A filter for between two values. - BetweenFilter between_filter = 7; - } - - // Specifies the scope for the filter. - SegmentFilterScoping filter_scoping = 8; -} - -// Scopings specify how the dimensions & metrics of multiple events -// should be considered when evaluating a segment filter. -message SegmentFilterScoping { - // If `atAnyPointInTime` is true, this filter evaluates to true for all - // events if it evaluates to true for any event in the date range of the - // request. - // - // This `atAnyPointInTime` parameter does not extend the date range of - // events in the report. If `atAnyPointInTime` is true, only events within - // the report's date range are considered when evaluating this filter. - // - // This `atAnyPointInTime` is only able to be specified if the criteria - // scoping is `ACROSS_ALL_SESSIONS` and is not able to be specified in - // sequences. - // - // If the criteria scoping is `ACROSS_ALL_SESSIONS`, `atAnyPointInTime` = - // false is used if unspecified. - optional bool at_any_point_in_time = 1; -} - -// Creates a filter that matches events of a single event name. If a parameter -// filter expression is specified, only the subset of events that match both the -// single event name and the parameter filter expressions match this event -// filter. -message SegmentEventFilter { - // This filter matches events of this single event name. Event name is - // required. - optional string event_name = 1; - - // If specified, this filter matches events that match both the single event - // name and the parameter filter expressions. - // - // Inside the parameter filter expression, only parameter filters are - // available. - optional SegmentParameterFilterExpression - segment_parameter_filter_expression = 2; -} - -// Expresses combinations of segment filter on parameters. -message SegmentParameterFilterExpression { - // Specify one type of filter for `SegmentParameterFilterExpression`. - oneof expr { - // The SegmentParameterFilterExpression in `andGroup` have an AND - // relationship. - SegmentParameterFilterExpressionList and_group = 1; - - // The SegmentParameterFilterExpression in `orGroup` have an OR - // relationship. - SegmentParameterFilterExpressionList or_group = 2; - - // The SegmentParameterFilterExpression is NOT of `notExpression`. - SegmentParameterFilterExpression not_expression = 3; - - // A primitive segment parameter filter. - SegmentParameterFilter segment_parameter_filter = 4; - } -} - -// A list of segment parameter filter expressions. -message SegmentParameterFilterExpressionList { - // The list of segment parameter filter expressions. - repeated SegmentParameterFilterExpression expressions = 1; -} - -// An expression to filter parameter values in a segment. -message SegmentParameterFilter { - // The field that is being filtered. - oneof one_parameter { - // This filter will be evaluated on the specified event parameter. Event - // parameters are logged as parameters of the event. Event parameters - // include fields like "firebase_screen" & "currency". - // - // Event parameters can only be used in segments & funnels and can only be - // used in a descendent filter from an EventFilter. In a descendent filter - // from an EventFilter either event or item parameters should be used. - string event_parameter_name = 1; - - // This filter will be evaluated on the specified item parameter. Item - // parameters are logged as parameters in the item array. Item parameters - // include fields like "item_name" & "item_category". - // - // Item parameters can only be used in segments & funnels and can only be - // used in a descendent filter from an EventFilter. In a descendent filter - // from an EventFilter either event or item parameters should be used. - // - // Item parameters are only available in ecommerce events. To learn more - // about ecommerce events, see the [Measure ecommerce] - // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) - // guide. - string item_parameter_name = 2; - } - - // Specify one type of filter. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 4; - - // A filter for in list values. - InListFilter in_list_filter = 5; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 6; - - // A filter for between two values. - BetweenFilter between_filter = 7; - } - - // Specifies the scope for the filter. - SegmentParameterFilterScoping filter_scoping = 8; -} - -// Scopings specify how multiple events should be considered when evaluating a -// segment parameter filter. -message SegmentParameterFilterScoping { - // Accumulates the parameter over the specified period of days before - // applying the filter. Only supported if criteria scoping is - // `ACROSS_ALL_SESSIONS` or `WITHIN_SAME_SESSION`. Only supported if the - // parameter is `event_count`. - // - // For example if `inAnyNDayPeriod` is 3, the event_name is "purchase", - // the event parameter is "event_count", and the Filter's criteria is - // greater than 5, this filter will accumulate the event count of purchase - // events over every 3 consecutive day period in the report's date range; a - // user will pass this Filter's criteria to be included in this segment if - // their count of purchase events exceeds 5 in any 3 consecutive day period. - // For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to - // 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered. - // - // The date range is not extended for the purpose of having a full N day - // window near the start of the date range. For example if a report is for - // 2021-11-01 to 2021-11-10 and `inAnyNDayPeriod` = 3, the first two day - // period will be effectively shortened because no event data outside the - // report's date range will be read. For example, the first four periods - // will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, - // 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04. - // - // `inAnyNDayPeriod` is optional. If not specified, the - // `segmentParameterFilter` is applied to each event individually. - optional int64 in_any_n_day_period = 1; -} - -// Expresses combinations of funnel filters. -message FunnelFilterExpression { - // Specify one type of filter for `FunnelFilterExpression`. - oneof expr { - // The FunnelFilterExpression in `andGroup` have an AND relationship. - FunnelFilterExpressionList and_group = 1; - - // The FunnelFilterExpression in `orGroup` have an OR relationship. - FunnelFilterExpressionList or_group = 2; - - // The FunnelFilterExpression is NOT of `notExpression`. - FunnelFilterExpression not_expression = 3; - - // A funnel filter for a dimension or metric. - FunnelFieldFilter funnel_field_filter = 4; - - // Creates a filter that matches events of a single event name. If a - // parameter filter expression is specified, only the subset of events that - // match both the single event name and the parameter filter expressions - // match this event filter. - FunnelEventFilter funnel_event_filter = 5; - } -} - -// A list of funnel filter expressions. -message FunnelFilterExpressionList { - // The list of funnel filter expressions. - repeated FunnelFilterExpression expressions = 1; -} - -// An expression to filter dimension or metric values. -message FunnelFieldFilter { - // The dimension name or metric name. - string field_name = 1; - - // Specify one type of filter. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 4; - - // A filter for in list values. - InListFilter in_list_filter = 5; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 6; - - // A filter for between two values. - BetweenFilter between_filter = 7; - } -} - -// Creates a filter that matches events of a single event name. If a parameter -// filter expression is specified, only the subset of events that match both the -// single event name and the parameter filter expressions match this event -// filter. -message FunnelEventFilter { - // This filter matches events of this single event name. Event name is - // required. - optional string event_name = 1; - - // If specified, this filter matches events that match both the single event - // name and the parameter filter expressions. - // - // Inside the parameter filter expression, only parameter filters are - // available. - optional FunnelParameterFilterExpression funnel_parameter_filter_expression = - 2; -} - -// Expresses combinations of funnel filters on parameters. -message FunnelParameterFilterExpression { - // Specify one type of filter for `FunnelParameterFilterExpression`. - oneof expr { - // The FunnelParameterFilterExpression in `andGroup` have an AND - // relationship. - FunnelParameterFilterExpressionList and_group = 1; - - // The FunnelParameterFilterExpression in `orGroup` have an OR - // relationship. - FunnelParameterFilterExpressionList or_group = 2; - - // The FunnelParameterFilterExpression is NOT of `notExpression`. - FunnelParameterFilterExpression not_expression = 3; - - // A primitive funnel parameter filter. - FunnelParameterFilter funnel_parameter_filter = 4; - } -} - -// A list of funnel parameter filter expressions. -message FunnelParameterFilterExpressionList { - // The list of funnel parameter filter expressions. - repeated FunnelParameterFilterExpression expressions = 1; -} - -// An expression to filter parameter values in a funnel. -message FunnelParameterFilter { - // The field that is being filtered. - oneof one_parameter { - // This filter will be evaluated on the specified event parameter. Event - // parameters are logged as parameters of the event. Event parameters - // include fields like "firebase_screen" & "currency". - // - // Event parameters can only be used in segments & funnels and can only be - // used in a descendent filter from an EventFilter. In a descendent filter - // from an EventFilter either event or item parameters should be used. - string event_parameter_name = 1; - - // This filter will be evaluated on the specified item parameter. Item - // parameters are logged as parameters in the item array. Item parameters - // include fields like "item_name" & "item_category". - // - // Item parameters can only be used in segments & funnels and can only be - // used in a descendent filter from an EventFilter. In a descendent filter - // from an EventFilter either event or item parameters should be used. - // - // Item parameters are only available in ecommerce events. To learn more - // about ecommerce events, see the [Measure ecommerce] - // (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) - // guide. - string item_parameter_name = 2; - } - - // Specify one type of filter. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 4; - - // A filter for in list values. - InListFilter in_list_filter = 5; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 6; - - // A filter for between two values. - BetweenFilter between_filter = 7; - } -} - -// The funnel report's response metadata carries additional information about -// the funnel report. -message FunnelResponseMetadata { - // If funnel report results are - // [sampled](https://support.google.com/analytics/answer/13331292), this - // describes what percentage of events were used in this funnel report. One - // `samplingMetadatas` is populated for each date range. Each - // `samplingMetadatas` corresponds to a date range in order that date ranges - // were specified in the request. - // - // However if the results are not sampled, this field will not be defined. - repeated SamplingMetadata sampling_metadatas = 1; -} - -// If funnel report results are -// [sampled](https://support.google.com/analytics/answer/13331292), this -// metadata describes what percentage of events were used in this funnel -// report for a date range. Sampling is the practice of analyzing a subset of -// all data in order to uncover the meaningful information in the larger data -// set. -message SamplingMetadata { - // The total number of events read in this sampled report for a date range. - // This is the size of the subset this property's data that was analyzed in - // this funnel report. - int64 samples_read_count = 1; - - // The total number of events present in this property's data that could - // have been analyzed in this funnel report for a date range. Sampling - // uncovers the meaningful information about the larger data set, and this - // is the size of the larger data set. - // - // To calculate the percentage of available data that was used in this - // funnel report, compute `samplesReadCount/samplingSpaceSize`. - int64 sampling_space_size = 2; -} - -// Represents aggregation of metrics. -enum MetricAggregation { - // Unspecified operator. - METRIC_AGGREGATION_UNSPECIFIED = 0; - - // SUM operator. - TOTAL = 1; - - // Minimum operator. - MINIMUM = 5; - - // Maximum operator. - MAXIMUM = 6; - - // Count operator. - COUNT = 4; -} - -// A metric's value type. -enum MetricType { - // Unspecified type. - METRIC_TYPE_UNSPECIFIED = 0; - - // Integer type. - TYPE_INTEGER = 1; - - // Floating point type. - TYPE_FLOAT = 2; - - // A duration of seconds; a special floating point type. - TYPE_SECONDS = 4; - - // A duration in milliseconds; a special floating point type. - TYPE_MILLISECONDS = 5; - - // A duration in minutes; a special floating point type. - TYPE_MINUTES = 6; - - // A duration in hours; a special floating point type. - TYPE_HOURS = 7; - - // A custom metric of standard type; a special floating point type. - TYPE_STANDARD = 8; - - // An amount of money; a special floating point type. - TYPE_CURRENCY = 9; - - // A length in feet; a special floating point type. - TYPE_FEET = 10; - - // A length in miles; a special floating point type. - TYPE_MILES = 11; - - // A length in meters; a special floating point type. - TYPE_METERS = 12; - - // A length in kilometers; a special floating point type. - TYPE_KILOMETERS = 13; -} - -// Categories of data that you may be restricted from viewing on certain -// Google Analytics properties. -enum RestrictedMetricType { - // Unspecified type. - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; - - // Cost metrics such as `adCost`. - COST_DATA = 1; - - // Revenue metrics such as `purchaseRevenue`. - REVENUE_DATA = 2; -} - -// Categories of sampling levels for the requests. -enum SamplingLevel { - // Unspecified type. - SAMPLING_LEVEL_UNSPECIFIED = 0; - - // Applies a sampling level of 10 million to standard properties and - // 100 million to Google Analytics 360 properties. - LOW = 1; - - // Exclusive to Google Analytics 360 properties with a sampling level of 1 - // billion. - MEDIUM = 2; - - // Exclusive to Google Analytics 360 properties. Unsampled explorations are - // more accurate and can reveal insights that aren't visible in standard - // explorations. To learn more, see - // https://support.google.com/analytics/answer/10896953. - UNSAMPLED = 3; -} - -// Controls conversion reporting. -// -// -message ConversionSpec { - // Attribution model to use in the Conversion Report - enum AttributionModel { - // Unspecified attribution model. - ATTRIBUTION_MODEL_UNSPECIFIED = 0; - - // Attribution was based on the paid and organic data driven model - DATA_DRIVEN = 1; - - // Attribution was based on the paid and organic last click model - LAST_CLICK = 2; - } - - // The conversion action IDs to include in the report. If empty, all - // conversions are included. Valid conversion action IDs can be retrieved from - // the `conversion_action` field within the `conversions` list in the - // response of the `GetMetadata` method. For example, - // 'conversionActions/1234'. - repeated string conversion_actions = 1; - - // The attribution model to use in the Conversion Report. If unspecified, - // `DATA_DRIVEN` is used. - AttributionModel attribution_model = 2; -} - -// Explains a dimension. -message DimensionMetadata { - // This dimension's name. Usable in [Dimension](#Dimension)'s `name`. For - // example, `eventName`. - string api_name = 1; - - // This dimension's name within the Google Analytics user interface. For - // example, `Event name`. - string ui_name = 2; - - // Description of how this dimension is used and calculated. - string description = 3; - - // Still usable but deprecated names for this dimension. If populated, this - // dimension is available by either `apiName` or one of `deprecatedApiNames` - // for a period of time. After the deprecation period, the dimension will be - // available only by `apiName`. - repeated string deprecated_api_names = 4; - - // True if the dimension is custom to this property. This includes user, - // event, & item scoped custom dimensions; to learn more about custom - // dimensions, see https://support.google.com/analytics/answer/14240153. This - // also include custom channel groups; to learn more about custom channel - // groups, see https://support.google.com/analytics/answer/13051316. - bool custom_definition = 5; - - // The display name of the category that this dimension belongs to. Similar - // dimensions and metrics are categorized together. - string category = 6; - - // Specifies the Google Analytics sections this dimension applies to. - repeated Section sections = 7; -} - -// Explains a metric. -message MetricMetadata { - // Justifications for why this metric is blocked. - enum BlockedReason { - // Will never be specified in API response. - BLOCKED_REASON_UNSPECIFIED = 0; - - // If present, your access is blocked to revenue related metrics for this - // property, and this metric is revenue related. - NO_REVENUE_METRICS = 1; - - // If present, your access is blocked to cost related metrics for this - // property, and this metric is cost related. - NO_COST_METRICS = 2; - } - - // A metric name. Usable in [Metric](#Metric)'s `name`. For example, - // `eventCount`. - string api_name = 1; - - // This metric's name within the Google Analytics user interface. For example, - // `Event count`. - string ui_name = 2; - - // Description of how this metric is used and calculated. - string description = 3; - - // Still usable but deprecated names for this metric. If populated, this - // metric is available by either `apiName` or one of `deprecatedApiNames` - // for a period of time. After the deprecation period, the metric will be - // available only by `apiName`. - repeated string deprecated_api_names = 4; - - // The type of this metric. - MetricType type = 5; - - // The mathematical expression for this derived metric. Can be used in - // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics - // are not expressions, and for non-expressions, this field is empty. - string expression = 6; - - // True if the metric is a custom metric for this property. - bool custom_definition = 7; - - // If reasons are specified, your access is blocked to this metric for this - // property. API requests from you to this property for this metric will - // succeed; however, the report will contain only zeros for this metric. API - // requests with metric filters on blocked metrics will fail. If reasons are - // empty, you have access to this metric. - // - // To learn more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - repeated BlockedReason blocked_reasons = 8; - - // The display name of the category that this metrics belongs to. Similar - // dimensions and metrics are categorized together. - string category = 9; - - // Specifies the Google Analytics sections this metric applies to. - repeated Section sections = 10; -} - -// The metadata for a single comparison. -message ComparisonMetadata { - // This comparison's resource name. Usable in [Comparison](#Comparison)'s - // `comparison` field. For example, 'comparisons/1234'. - string api_name = 1; - - // This comparison's name within the Google Analytics user interface. - string ui_name = 2; - - // This comparison's description. - string description = 3; -} - -// The metadata for a single conversion. -// -// -message ConversionMetadata { - // The unique identifier of the conversion action. This ID is used to specify - // which conversions to include in a report by populating the - // `conversion_actions` field in the `ConversionsSpec` of a report request. - // For example, 'conversionActions/1234'. - string conversion_action = 1; - - // This conversion's name within the Google Analytics user interface. - string display_name = 2; -} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto deleted file mode 100644 index 7bb264ea5ac7..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/analytics_data_api.proto +++ /dev/null @@ -1,1001 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.analytics.data.v1beta; - -import "google/analytics/data/v1beta/data.proto"; -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; -option java_multiple_files = true; -option java_outer_classname = "AnalyticsDataApiProto"; -option java_package = "com.google.analytics.data.v1beta"; -option (google.api.resource_definition) = { - type: "analyticsadmin.googleapis.com/Property" - pattern: "properties/{property}" -}; - -// Google Analytics reporting data service. -service BetaAnalyticsData { - option (google.api.default_host) = "analyticsdata.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/analytics," - "https://www.googleapis.com/auth/analytics.readonly"; - - // Returns a customized report of your Google Analytics event data. Reports - // contain statistics derived from data collected by the Google Analytics - // tracking code. The data returned from the API is as a table with columns - // for the requested dimensions and metrics. Metrics are individual - // measurements of user activity on your property, such as active users or - // event count. Dimensions break down metrics across some common criteria, - // such as country or event name. - // - // For a guide to constructing requests & understanding responses, see - // [Creating a - // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). - rpc RunReport(RunReportRequest) returns (RunReportResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:runReport" - body: "*" - }; - } - - // Returns a customized pivot report of your Google Analytics event data. - // Pivot reports are more advanced and expressive formats than regular - // reports. In a pivot report, dimensions are only visible if they are - // included in a pivot. Multiple pivots can be specified to further dissect - // your data. - rpc RunPivotReport(RunPivotReportRequest) returns (RunPivotReportResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:runPivotReport" - body: "*" - }; - } - - // Returns multiple reports in a batch. All reports must be for the same - // Google Analytics property. - rpc BatchRunReports(BatchRunReportsRequest) - returns (BatchRunReportsResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:batchRunReports" - body: "*" - }; - } - - // Returns multiple pivot reports in a batch. All reports must be for the same - // Google Analytics property. - rpc BatchRunPivotReports(BatchRunPivotReportsRequest) - returns (BatchRunPivotReportsResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:batchRunPivotReports" - body: "*" - }; - } - - // Returns metadata for dimensions and metrics available in reporting methods. - // Used to explore the dimensions and metrics. In this method, a Google - // Analytics property identifier is specified in the request, and - // the metadata response includes Custom dimensions and metrics as well as - // Universal metadata. - // - // For example if a custom metric with parameter name `levels_unlocked` is - // registered to a property, the Metadata response will contain - // `customEvent:levels_unlocked`. Universal metadata are dimensions and - // metrics applicable to any property such as `country` and `totalUsers`. - rpc GetMetadata(GetMetadataRequest) returns (Metadata) { - option (google.api.http) = { - get: "/v1beta/{name=properties/*/metadata}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns a customized report of realtime event data for your property. - // Events appear in realtime reports seconds after they have been sent to - // the Google Analytics. Realtime reports show events and usage data for the - // periods of time ranging from the present moment to 30 minutes ago (up to - // 60 minutes for Google Analytics 360 properties). - // - // For a guide to constructing realtime requests & understanding responses, - // see [Creating a Realtime - // Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). - rpc RunRealtimeReport(RunRealtimeReportRequest) - returns (RunRealtimeReportResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:runRealtimeReport" - body: "*" - }; - } - - // This compatibility method lists dimensions and metrics that can be added to - // a report request and maintain compatibility. This method fails if the - // request's dimensions and metrics are incompatible. - // - // In Google Analytics, reports fail if they request incompatible dimensions - // and/or metrics; in that case, you will need to remove dimensions and/or - // metrics from the incompatible report until the report is compatible. - // - // The Realtime and Core reports have different compatibility rules. This - // method checks compatibility for Core reports. - rpc CheckCompatibility(CheckCompatibilityRequest) - returns (CheckCompatibilityResponse) { - option (google.api.http) = { - post: "/v1beta/{property=properties/*}:checkCompatibility" - body: "*" - }; - } - - // Creates an audience export for later retrieval. This method quickly returns - // the audience export's resource name and initiates a long running - // asynchronous request to form an audience export. To export the users in an - // audience export, first create the audience export through this method and - // then send the audience resource name to the `QueryAudienceExport` method. - // - // See [Creating an Audience - // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Exports with examples. - // - // An audience export is a snapshot of the users currently in the audience at - // the time of audience export creation. Creating audience exports for one - // audience on different days will return different results as users enter and - // exit the audience. - // - // Audiences in Google Analytics 4 allow you to segment your users in the ways - // that are important to your business. To learn more, see - // https://support.google.com/analytics/answer/9267572. Audience exports - // contain the users in each audience. - // - // Audience Export APIs have some methods at alpha and other methods at beta - // stability. The intention is to advance methods to beta stability after some - // feedback and adoption. To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc CreateAudienceExport(CreateAudienceExportRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=properties/*}/audienceExports" - body: "audience_export" - }; - option (google.api.method_signature) = "parent,audience_export"; - option (google.longrunning.operation_info) = { - response_type: "AudienceExport" - metadata_type: "AudienceExportMetadata" - }; - } - - // Retrieves an audience export of users. After creating an audience, the - // users are not immediately available for exporting. First, a request to - // `CreateAudienceExport` is necessary to create an audience export of users, - // and then second, this method is used to retrieve the users in the audience - // export. - // - // See [Creating an Audience - // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Exports with examples. - // - // Audiences in Google Analytics 4 allow you to segment your users in the ways - // that are important to your business. To learn more, see - // https://support.google.com/analytics/answer/9267572. - // - // Audience Export APIs have some methods at alpha and other methods at beta - // stability. The intention is to advance methods to beta stability after some - // feedback and adoption. To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc QueryAudienceExport(QueryAudienceExportRequest) - returns (QueryAudienceExportResponse) { - option (google.api.http) = { - post: "/v1beta/{name=properties/*/audienceExports/*}:query" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets configuration metadata about a specific audience export. This method - // can be used to understand an audience export after it has been created. - // - // See [Creating an Audience - // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Exports with examples. - // - // Audience Export APIs have some methods at alpha and other methods at beta - // stability. The intention is to advance methods to beta stability after some - // feedback and adoption. To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc GetAudienceExport(GetAudienceExportRequest) returns (AudienceExport) { - option (google.api.http) = { - get: "/v1beta/{name=properties/*/audienceExports/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all audience exports for a property. This method can be used for you - // to find and reuse existing audience exports rather than creating - // unnecessary new audience exports. The same audience can have multiple - // audience exports that represent the export of users that were in an - // audience on different days. - // - // See [Creating an Audience - // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Exports with examples. - // - // Audience Export APIs have some methods at alpha and other methods at beta - // stability. The intention is to advance methods to beta stability after some - // feedback and adoption. To give your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc ListAudienceExports(ListAudienceExportsRequest) - returns (ListAudienceExportsResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=properties/*}/audienceExports" - }; - option (google.api.method_signature) = "parent"; - } -} - -// The request for compatibility information for a report's dimensions and -// metrics. Check compatibility provides a preview of the compatibility of a -// report; fields shared with the `runReport` request should be the same values -// as in your `runReport` request. -message CheckCompatibilityRequest { - // A Google Analytics property identifier whose events are tracked. To - // learn more, see [where to find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // `property` should be the same value as in your `runReport` request. - // - // Example: properties/1234 - string property = 1; - - // The dimensions in this report. `dimensions` should be the same value as in - // your `runReport` request. - repeated Dimension dimensions = 2; - - // The metrics in this report. `metrics` should be the same value as in your - // `runReport` request. - repeated Metric metrics = 3; - - // The filter clause of dimensions. `dimensionFilter` should be the same value - // as in your `runReport` request. - FilterExpression dimension_filter = 4; - - // The filter clause of metrics. `metricFilter` should be the same value as in - // your `runReport` request - FilterExpression metric_filter = 5; - - // Filters the dimensions and metrics in the response to just this - // compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` - // to only return compatible dimensions & metrics. - Compatibility compatibility_filter = 6; -} - -// The compatibility response with the compatibility of each dimension & metric. -message CheckCompatibilityResponse { - // The compatibility of each dimension. - repeated DimensionCompatibility dimension_compatibilities = 1; - - // The compatibility of each metric. - repeated MetricCompatibility metric_compatibilities = 2; -} - -// The dimensions, metrics and comparisons currently accepted in reporting -// methods. -message Metadata { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/Metadata" - pattern: "properties/{property}/metadata" - }; - - // Resource name of this metadata. - string name = 3; - - // The dimension descriptions. - repeated DimensionMetadata dimensions = 1; - - // The metric descriptions. - repeated MetricMetadata metrics = 2; - - // The comparison descriptions. - repeated ComparisonMetadata comparisons = 4; -} - -// The request to generate a report. -message RunReportRequest { - // A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // Within a batch request, this property should either be unspecified or - // consistent with the batch-level property. - // - // Example: properties/1234 - string property = 1; - - // The dimensions requested and displayed. - repeated Dimension dimensions = 2; - - // The metrics requested and displayed. - repeated Metric metrics = 3; - - // Date ranges of data to read. If multiple date ranges are requested, each - // response row will contain a zero based date range index. If two date - // ranges overlap, the event data for the overlapping days is included in the - // response rows for both date ranges. In a cohort request, this `dateRanges` - // must be unspecified. - repeated DateRange date_ranges = 4; - - // Dimension filters let you ask for only specific dimension values in - // the report. To learn more, see [Fundamentals of Dimension - // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - // for examples. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 5; - - // The filter clause of metrics. Applied after aggregating the report's rows, - // similar to SQL having-clause. Dimensions cannot be used in this filter. - FilterExpression metric_filter = 6; - - // The row count of the start row. The first row is counted as row 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 7; - - // The number of rows to return. If unspecified, 10,000 rows are returned. The - // API returns a maximum of 250,000 rows per request, no matter how many you - // ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. For instance, there are - // fewer than 300 possible values for the dimension `country`, so when - // reporting on only `country`, you can't get more than 300 rows, even if you - // set `limit` to a higher value. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 8; - - // Aggregation of metrics. Aggregated metric values will be shown in rows - // where the dimension_values are set to "RESERVED_(MetricAggregation)". - // Aggregates including both comparisons and multiple date ranges will - // be aggregated based on the date ranges. - repeated MetricAggregation metric_aggregations = 9; - - // Specifies how rows are ordered in the response. - // Requests including both comparisons and multiple date ranges will - // have order bys applied on the comparisons. - repeated OrderBy order_bys = 10; - - // A currency code in ISO4217 format, such as "AED", "USD", "JPY". - // If the field is empty, the report uses the property's default currency. - string currency_code = 11; - - // Cohort group associated with this request. If there is a cohort group - // in the request the 'cohort' dimension must be present. - CohortSpec cohort_spec = 12; - - // If false or unspecified, each row with all metrics equal to 0 will not be - // returned. If true, these rows will be returned if they are not separately - // removed by a filter. - // - // Regardless of this `keep_empty_rows` setting, only data recorded by the - // Google Analytics property can be displayed in a report. - // - // For example if a property never logs a `purchase` event, then a query for - // the `eventName` dimension and `eventCount` metric will not have a row - // eventName: "purchase" and eventCount: 0. - bool keep_empty_rows = 13; - - // Toggles whether to return the current state of this Google Analytics - // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - bool return_property_quota = 14; - - // Optional. The configuration of comparisons requested and displayed. The - // request only requires a comparisons field in order to receive a comparison - // column in the response. - repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response report table corresponding to a request. -message RunReportResponse { - // Describes dimension columns. The number of DimensionHeaders and ordering of - // DimensionHeaders matches the dimensions present in rows. - repeated DimensionHeader dimension_headers = 1; - - // Describes metric columns. The number of MetricHeaders and ordering of - // MetricHeaders matches the metrics present in rows. - repeated MetricHeader metric_headers = 2; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 3; - - // If requested, the totaled values of metrics. - repeated Row totals = 4; - - // If requested, the maximum values of metrics. - repeated Row maximums = 5; - - // If requested, the minimum values of metrics. - repeated Row minimums = 6; - - // The total number of rows in the query result. `rowCount` is independent of - // the number of rows returned in the response, the `limit` request - // parameter, and the `offset` request parameter. For example if a query - // returns 175 rows and includes `limit` of 50 in the API request, the - // response will contain `rowCount` of 175 but only 50 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int32 row_count = 7; - - // Metadata for the report. - ResponseMetaData metadata = 8; - - // This Google Analytics property's quota state including this request. - PropertyQuota property_quota = 9; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#runReport". Useful to distinguish between - // response types in JSON. - string kind = 10; -} - -// The request to generate a pivot report. -message RunPivotReportRequest { - // A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // Within a batch request, this property should either be unspecified or - // consistent with the batch-level property. - // - // Example: properties/1234 - string property = 1; - - // The dimensions requested. All defined dimensions must be used by one of the - // following: dimension_expression, dimension_filter, pivots, order_bys. - repeated Dimension dimensions = 2; - - // The metrics requested, at least one metric needs to be specified. All - // defined metrics must be used by one of the following: metric_expression, - // metric_filter, order_bys. - repeated Metric metrics = 3; - - // The date range to retrieve event data for the report. If multiple date - // ranges are specified, event data from each date range is used in the - // report. A special dimension with field name "dateRange" can be included in - // a Pivot's field names; if included, the report compares between date - // ranges. In a cohort request, this `dateRanges` must be unspecified. - repeated DateRange date_ranges = 4; - - // Describes the visual format of the report's dimensions in columns or rows. - // The union of the fieldNames (dimension names) in all pivots must be a - // subset of dimension names defined in Dimensions. No two pivots can share a - // dimension. A dimension is only visible if it appears in a pivot. - repeated Pivot pivots = 5; - - // The filter clause of dimensions. Dimensions must be requested to be used in - // this filter. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 6; - - // The filter clause of metrics. Applied at post aggregation phase, similar to - // SQL having-clause. Metrics must be requested to be used in this filter. - // Dimensions cannot be used in this filter. - FilterExpression metric_filter = 7; - - // A currency code in ISO4217 format, such as "AED", "USD", "JPY". - // If the field is empty, the report uses the property's default currency. - string currency_code = 8; - - // Cohort group associated with this request. If there is a cohort group - // in the request the 'cohort' dimension must be present. - CohortSpec cohort_spec = 9; - - // If false or unspecified, each row with all metrics equal to 0 will not be - // returned. If true, these rows will be returned if they are not separately - // removed by a filter. - // - // Regardless of this `keep_empty_rows` setting, only data recorded by the - // Google Analytics property can be displayed in a report. - // - // For example if a property never logs a `purchase` event, then a query for - // the `eventName` dimension and `eventCount` metric will not have a row - // eventName: "purchase" and eventCount: 0. - bool keep_empty_rows = 10; - - // Toggles whether to return the current state of this Google Analytics - // property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - bool return_property_quota = 11; - - // Optional. The configuration of comparisons requested and displayed. The - // request requires both a comparisons field and a comparisons dimension to - // receive a comparison column in the response. - repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response pivot report table corresponding to a pivot request. -message RunPivotReportResponse { - // Summarizes the columns and rows created by a pivot. Each pivot in the - // request produces one header in the response. If we have a request like - // this: - // - // "pivots": [{ - // "fieldNames": ["country", - // "city"] - // }, - // { - // "fieldNames": "eventName" - // }] - // - // We will have the following `pivotHeaders` in the response: - // - // "pivotHeaders" : [{ - // "dimensionHeaders": [{ - // "dimensionValues": [ - // { "value": "United Kingdom" }, - // { "value": "London" } - // ] - // }, - // { - // "dimensionValues": [ - // { "value": "Japan" }, - // { "value": "Osaka" } - // ] - // }] - // }, - // { - // "dimensionHeaders": [{ - // "dimensionValues": [{ "value": "session_start" }] - // }, - // { - // "dimensionValues": [{ "value": "scroll" }] - // }] - // }] - repeated PivotHeader pivot_headers = 1; - - // Describes dimension columns. The number of DimensionHeaders and ordering of - // DimensionHeaders matches the dimensions present in rows. - repeated DimensionHeader dimension_headers = 2; - - // Describes metric columns. The number of MetricHeaders and ordering of - // MetricHeaders matches the metrics present in rows. - repeated MetricHeader metric_headers = 3; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 4; - - // Aggregation of metric values. Can be totals, minimums, or maximums. The - // returned aggregations are controlled by the metric_aggregations in the - // pivot. The type of aggregation returned in each row is shown by the - // dimension_values which are set to "RESERVED_". - repeated Row aggregates = 5; - - // Metadata for the report. - ResponseMetaData metadata = 6; - - // This Google Analytics property's quota state including this request. - PropertyQuota property_quota = 7; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#runPivotReport". Useful to distinguish between - // response types in JSON. - string kind = 8; -} - -// The batch request containing multiple report requests. -message BatchRunReportsRequest { - // A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // This property must be specified for the batch. The property within - // RunReportRequest may either be unspecified or consistent with this - // property. - // - // Example: properties/1234 - string property = 1; - - // Individual requests. Each request has a separate report response. Each - // batch request is allowed up to 5 requests. - repeated RunReportRequest requests = 2; -} - -// The batch response containing multiple reports. -message BatchRunReportsResponse { - // Individual responses. Each response has a separate report request. - repeated RunReportResponse reports = 1; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#batchRunReports". Useful to distinguish between - // response types in JSON. - string kind = 2; -} - -// The batch request containing multiple pivot report requests. -message BatchRunPivotReportsRequest { - // A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // This property must be specified for the batch. The property within - // RunPivotReportRequest may either be unspecified or consistent with this - // property. - // - // Example: properties/1234 - string property = 1; - - // Individual requests. Each request has a separate pivot report response. - // Each batch request is allowed up to 5 requests. - repeated RunPivotReportRequest requests = 2; -} - -// The batch response containing multiple pivot reports. -message BatchRunPivotReportsResponse { - // Individual responses. Each response has a separate pivot report request. - repeated RunPivotReportResponse pivot_reports = 1; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#batchRunPivotReports". Useful to distinguish - // between response types in JSON. - string kind = 2; -} - -// Request for a property's dimension and metric metadata. -message GetMetadataRequest { - // Required. The resource name of the metadata to retrieve. This name field is - // specified in the URL path and not URL parameters. Property is a numeric - // Google Analytics property identifier. To learn more, see [where to find - // your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // - // Example: properties/1234/metadata - // - // Set the Property ID to 0 for dimensions and metrics common to all - // properties. In this special mode, this method will not return custom - // dimensions and metrics. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/Metadata" - } - ]; -} - -// The request to generate a realtime report. -message RunRealtimeReportRequest { - // A Google Analytics property identifier whose events are tracked. - // Specified in the URL path and not the body. To learn more, see [where to - // find your Property - // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - // - // Example: properties/1234 - string property = 1; - - // The dimensions requested and displayed. - repeated Dimension dimensions = 2; - - // The metrics requested and displayed. - repeated Metric metrics = 3; - - // The filter clause of dimensions. Metrics cannot be used in this filter. - FilterExpression dimension_filter = 4; - - // The filter clause of metrics. Applied at post aggregation phase, similar to - // SQL having-clause. Dimensions cannot be used in this filter. - FilterExpression metric_filter = 5; - - // The number of rows to return. If unspecified, 10,000 rows are returned. The - // API returns a maximum of 250,000 rows per request, no matter how many you - // ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. For instance, there are - // fewer than 300 possible values for the dimension `country`, so when - // reporting on only `country`, you can't get more than 300 rows, even if you - // set `limit` to a higher value. - int64 limit = 6; - - // Aggregation of metrics. Aggregated metric values will be shown in rows - // where the dimension_values are set to "RESERVED_(MetricAggregation)". - repeated MetricAggregation metric_aggregations = 7; - - // Specifies how rows are ordered in the response. - repeated OrderBy order_bys = 8; - - // Toggles whether to return the current state of this Google Analytics - // property's Realtime quota. Quota is returned in - // [PropertyQuota](#PropertyQuota). - bool return_property_quota = 9; - - // The minute ranges of event data to read. If unspecified, one minute range - // for the last 30 minutes will be used. If multiple minute ranges are - // requested, each response row will contain a zero based minute range index. - // If two minute ranges overlap, the event data for the overlapping minutes is - // included in the response rows for both minute ranges. - repeated MinuteRange minute_ranges = 10; -} - -// The response realtime report table corresponding to a request. -message RunRealtimeReportResponse { - // Describes dimension columns. The number of DimensionHeaders and ordering of - // DimensionHeaders matches the dimensions present in rows. - repeated DimensionHeader dimension_headers = 1; - - // Describes metric columns. The number of MetricHeaders and ordering of - // MetricHeaders matches the metrics present in rows. - repeated MetricHeader metric_headers = 2; - - // Rows of dimension value combinations and metric values in the report. - repeated Row rows = 3; - - // If requested, the totaled values of metrics. - repeated Row totals = 4; - - // If requested, the maximum values of metrics. - repeated Row maximums = 5; - - // If requested, the minimum values of metrics. - repeated Row minimums = 6; - - // The total number of rows in the query result. `rowCount` is independent of - // the number of rows returned in the response and the `limit` request - // parameter. For example if a query returns 175 rows and includes `limit` - // of 50 in the API request, the response will contain `rowCount` of 175 but - // only 50 rows. - int32 row_count = 7; - - // This Google Analytics property's Realtime quota state including this - // request. - PropertyQuota property_quota = 8; - - // Identifies what kind of resource this message is. This `kind` is always the - // fixed string "analyticsData#runRealtimeReport". Useful to distinguish - // between response types in JSON. - string kind = 9; -} - -// A request to retrieve configuration metadata about a specific audience -// export. -message GetAudienceExportRequest { - // Required. The audience export resource name. - // Format: `properties/{property}/audienceExports/{audience_export}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/AudienceExport" - } - ]; -} - -// A request to list all audience exports for a property. -message ListAudienceExportsRequest { - // Required. All audience exports for this property will be listed in the - // response. Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/AudienceExport" - } - ]; - - // Optional. The maximum number of audience exports to return. The service may - // return fewer than this value. If unspecified, at most 200 audience exports - // will be returned. The maximum value is 1000 (higher values will be coerced - // to the maximum). - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListAudienceExports` - // call. Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListAudienceExports` - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of all audience exports for a property. -message ListAudienceExportsResponse { - // Each audience export for a property. - repeated AudienceExport audience_exports = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - optional string next_page_token = 2; -} - -// A request to create a new audience export. -message CreateAudienceExportRequest { - // Required. The parent resource where this audience export will be created. - // Format: `properties/{property}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsdata.googleapis.com/AudienceExport" - } - ]; - - // Required. The audience export to create. - AudienceExport audience_export = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// An audience export is a list of users in an audience at the time of the -// list's creation. One audience may have multiple audience exports created for -// different days. -message AudienceExport { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/AudienceExport" - pattern: "properties/{property}/audienceExports/{audience_export}" - plural: "audienceExports" - singular: "audienceExport" - }; - - // The AudienceExport currently exists in this state. - enum State { - // Unspecified state will never be used. - STATE_UNSPECIFIED = 0; - - // The AudienceExport is currently creating and will be available in the - // future. Creating occurs immediately after the CreateAudienceExport call. - CREATING = 1; - - // The AudienceExport is fully created and ready for querying. An - // AudienceExport is updated to active asynchronously from a request; this - // occurs some time (for example 15 minutes) after the initial create call. - ACTIVE = 2; - - // The AudienceExport failed to be created. It is possible that - // re-requesting this audience export will succeed. - FAILED = 3; - } - - // Output only. Identifier. The audience export resource name assigned during - // creation. This resource name identifies this `AudienceExport`. - // - // Format: `properties/{property}/audienceExports/{audience_export}` - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Required. The audience resource name. This resource name identifies the - // audience being listed and is shared between the Analytics Data & Admin - // APIs. - // - // Format: `properties/{property}/audiences/{audience}` - string audience = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The descriptive display name for this audience. For example, - // "Purchasers". - string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The dimensions requested and displayed in the query response. - repeated AudienceDimension dimensions = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The current state for this AudienceExport. - optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when CreateAudienceExport was called and the - // AudienceExport began the `CREATING` state. - optional google.protobuf.Timestamp begin_creating_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total quota tokens charged during creation of the - // AudienceExport. Because this token count is based on activity from the - // `CREATING` state, this tokens charged will be fixed once an AudienceExport - // enters the `ACTIVE` or `FAILED` states. - int32 creation_quota_tokens_charged = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of rows in the AudienceExport result. - optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error message is populated when an audience export fails - // during creation. A common reason for such a failure is quota exhaustion. - optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The percentage completed for this audience export ranging - // between 0 to 100. - optional double percentage_completed = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// This metadata is currently blank. -message AudienceExportMetadata {} - -// A request to list users in an audience export. -message QueryAudienceExportRequest { - // Required. The name of the audience export to retrieve users from. - // Format: `properties/{property}/audienceExports/{audience_export}` - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The row count of the start row. The first row is counted as row - // 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return. If unspecified, 10,000 rows are - // returned. The API returns a maximum of 250,000 rows per request, no matter - // how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of users in an audience export. -message QueryAudienceExportResponse { - // Configuration data about AudienceExport being queried. Returned to help - // interpret the audience rows in this response. For example, the dimensions - // in this AudienceExport correspond to the columns in the AudienceRows. - optional AudienceExport audience_export = 1; - - // Rows for each user in an audience export. The number of rows in this - // response will be less than or equal to request's page size. - repeated AudienceRow audience_rows = 2; - - // The total number of rows in the AudienceExport result. `rowCount` is - // independent of the number of rows returned in the response, the `limit` - // request parameter, and the `offset` request parameter. For example if a - // query returns 175 rows and includes `limit` of 50 in the API request, the - // response will contain `rowCount` of 175 but only 50 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - optional int32 row_count = 3; -} - -// Dimension value attributes for the audience user row. -message AudienceRow { - // Each dimension value attribute for an audience user. One dimension value - // will be added for each dimension column requested. - repeated AudienceDimensionValue dimension_values = 1; -} - -// An audience dimension is a user attribute. Specific user attributed are -// requested and then later returned in the `QueryAudienceExportResponse`. -message AudienceDimension { - // Optional. The API name of the dimension. See the [API - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) - // for the list of dimension names. - string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The value of a dimension. -message AudienceDimensionValue { - // One kind of dimension value. - oneof one_value { - // Value as a string if the dimension type is a string. - string value = 1; - } -} diff --git a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto b/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto deleted file mode 100644 index 8cfa6e491f7d..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/google/analytics/data/v1beta/data.proto +++ /dev/null @@ -1,1082 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.analytics.data.v1beta; - -option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; -option java_multiple_files = true; -option java_outer_classname = "ReportingApiProto"; -option java_package = "com.google.analytics.data.v1beta"; - -// A contiguous set of days: `startDate`, `startDate + 1`, ..., `endDate`. -// Requests are allowed up to 4 date ranges. -message DateRange { - // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot - // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also - // accepted, and in that case, the date is inferred based on the property's - // reporting time zone. - string start_date = 1; - - // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot - // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is - // also accepted, and in that case, the date is inferred based on the - // property's reporting time zone. - string end_date = 2; - - // Assigns a name to this date range. The dimension `dateRange` is valued to - // this name in a report response. If set, cannot begin with `date_range_` or - // `RESERVED_`. If not set, date ranges are named by their zero based index in - // the request: `date_range_0`, `date_range_1`, etc. - string name = 3; -} - -// A contiguous set of minutes: `startMinutesAgo`, `startMinutesAgo + 1`, ..., -// `endMinutesAgo`. Requests are allowed up to 2 minute ranges. -message MinuteRange { - // The inclusive start minute for the query as a number of minutes before now. - // For example, `"startMinutesAgo": 29` specifies the report should include - // event data from 29 minutes ago and after. Cannot be after `endMinutesAgo`. - // - // If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics - // properties can request up to the last 30 minutes of event data - // (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to - // the last 60 minutes of event data (`startMinutesAgo <= 59`). - optional int32 start_minutes_ago = 1; - - // The inclusive end minute for the query as a number of minutes before now. - // Cannot be before `startMinutesAgo`. For example, `"endMinutesAgo": 15` - // specifies the report should include event data from prior to 15 minutes - // ago. - // - // If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics - // properties can request any minute in the last 30 minutes of event data - // (`endMinutesAgo <= 29`), and 360 Analytics properties can request any - // minute in the last 60 minutes of event data (`endMinutesAgo <= 59`). - optional int32 end_minutes_ago = 2; - - // Assigns a name to this minute range. The dimension `dateRange` is valued to - // this name in a report response. If set, cannot begin with `date_range_` or - // `RESERVED_`. If not set, minute ranges are named by their zero based index - // in the request: `date_range_0`, `date_range_1`, etc. - string name = 3; -} - -// Dimensions are attributes of your data. For example, the dimension city -// indicates the city from which an event originates. Dimension values in report -// responses are strings; for example, the city could be "Paris" or "New York". -// Requests are allowed up to 9 dimensions. -message Dimension { - // The name of the dimension. See the [API - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) - // for the list of dimension names supported by core reporting methods such - // as `runReport` and `batchRunReports`. See - // [Realtime - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) - // for the list of dimension names supported by the `runRealtimeReport` - // method. See - // [Funnel - // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) - // for the list of dimension names supported by the `runFunnelReport` - // method. - // - // If `dimensionExpression` is specified, `name` can be any string that you - // would like within the allowed character set. For example if a - // `dimensionExpression` concatenates `country` and `city`, you could call - // that dimension `countryAndCity`. Dimension names that you choose must match - // the regular expression `^[a-zA-Z0-9_]$`. - // - // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, - // `dimensionExpression`, and `pivots`. - string name = 1; - - // One dimension can be the result of an expression of multiple dimensions. - // For example, dimension "country, city": concatenate(country, ", ", city). - DimensionExpression dimension_expression = 2; -} - -// Used to express a dimension which is the result of a formula of multiple -// dimensions. Example usages: -// 1) lower_case(dimension) -// 2) concatenate(dimension1, symbol, dimension2). -message DimensionExpression { - // Used to convert a dimension value to a single case. - message CaseExpression { - // Name of a dimension. The name must refer back to a name in dimensions - // field of the request. - string dimension_name = 1; - } - - // Used to combine dimension values to a single dimension. - message ConcatenateExpression { - // Names of dimensions. The names must refer back to names in the dimensions - // field of the request. - repeated string dimension_names = 1; - - // The delimiter placed between dimension names. - // - // Delimiters are often single characters such as "|" or "," but can be - // longer strings. If a dimension value contains the delimiter, both will be - // present in response with no distinction. For example if dimension 1 value - // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the - // response will contain "US,FR,JP". - string delimiter = 2; - } - - // Specify one type of dimension expression for `DimensionExpression`. - oneof one_expression { - // Used to convert a dimension value to lower case. - CaseExpression lower_case = 4; - - // Used to convert a dimension value to upper case. - CaseExpression upper_case = 5; - - // Used to combine dimension values to a single dimension. - // For example, dimension "country, city": concatenate(country, ", ", city). - ConcatenateExpression concatenate = 6; - } -} - -// The quantitative measurements of a report. For example, the metric -// `eventCount` is the total number of events. Requests are allowed up to 10 -// metrics. -message Metric { - // The name of the metric. See the [API - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) - // for the list of metric names supported by core reporting methods such - // as `runReport` and `batchRunReports`. See - // [Realtime - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) - // for the list of metric names supported by the `runRealtimeReport` - // method. See - // [Funnel - // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) - // for the list of metric names supported by the `runFunnelReport` - // method. - // - // If `expression` is specified, `name` can be any string that you would like - // within the allowed character set. For example if `expression` is - // `screenPageViews/sessions`, you could call that metric's name = - // `viewsPerSession`. Metric names that you choose must match the regular - // expression `^[a-zA-Z0-9_]$`. - // - // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric - // `expression`. - string name = 1; - - // A mathematical expression for derived metrics. For example, the metric - // Event count per user is `eventCount/totalUsers`. - string expression = 2; - - // Indicates if a metric is invisible in the report response. If a metric is - // invisible, the metric will not produce a column in the response, but can be - // used in `metricFilter`, `orderBys`, or a metric `expression`. - bool invisible = 3; -} - -// Defines an individual comparison. Most requests will include multiple -// comparisons so that the report compares between the comparisons. -message Comparison { - // Each comparison produces separate rows in the response. In the response, - // this comparison is identified by this name. If name is unspecified, we will - // use the saved comparisons display name. - optional string name = 1; - - // One kind of comparison value - oneof one_comparison { - // A basic comparison. - FilterExpression dimension_filter = 2; - - // A saved comparison identified by the comparison's resource name. - // For example, 'comparisons/1234'. - string comparison = 3; - } -} - -// To express dimension or metric filters. The fields in the same -// FilterExpression need to be either all dimensions or all metrics. -message FilterExpression { - // Specify one type of filter expression for `FilterExpression`. - oneof expr { - // The FilterExpressions in and_group have an AND relationship. - FilterExpressionList and_group = 1; - - // The FilterExpressions in or_group have an OR relationship. - FilterExpressionList or_group = 2; - - // The FilterExpression is NOT of not_expression. - FilterExpression not_expression = 3; - - // A primitive filter. In the same FilterExpression, all of the filter's - // field names need to be either all dimensions or all metrics. - Filter filter = 4; - } -} - -// A list of filter expressions. -message FilterExpressionList { - // A list of filter expressions. - repeated FilterExpression expressions = 1; -} - -// An expression to filter dimension or metric values. -message Filter { - // The filter for string - message StringFilter { - // The match type of a string filter - enum MatchType { - // Unspecified - MATCH_TYPE_UNSPECIFIED = 0; - - // Exact match of the string value. - EXACT = 1; - - // Begins with the string value. - BEGINS_WITH = 2; - - // Ends with the string value. - ENDS_WITH = 3; - - // Contains the string value. - CONTAINS = 4; - - // Full match for the regular expression with the string value. - FULL_REGEXP = 5; - - // Partial match for the regular expression with the string value. - PARTIAL_REGEXP = 6; - } - - // The match type for this filter. - MatchType match_type = 1; - - // The string value used for the matching. - string value = 2; - - // If true, the string value is case sensitive. - bool case_sensitive = 3; - } - - // The result needs to be in a list of string values. - message InListFilter { - // The list of string values. - // Must be non-empty. - repeated string values = 1; - - // If true, the string value is case sensitive. - bool case_sensitive = 2; - } - - // Filters for numeric or date values. - message NumericFilter { - // The operation applied to a numeric filter - enum Operation { - // Unspecified. - OPERATION_UNSPECIFIED = 0; - - // Equal - EQUAL = 1; - - // Less than - LESS_THAN = 2; - - // Less than or equal - LESS_THAN_OR_EQUAL = 3; - - // Greater than - GREATER_THAN = 4; - - // Greater than or equal - GREATER_THAN_OR_EQUAL = 5; - } - - // The operation type for this filter. - Operation operation = 1; - - // A numeric value or a date value. - NumericValue value = 2; - } - - // To express that the result needs to be between two numbers (inclusive). - message BetweenFilter { - // Begins with this number. - NumericValue from_value = 1; - - // Ends with this number. - NumericValue to_value = 2; - } - - // Filter for empty values. - message EmptyFilter {} - - // The dimension name or metric name. - // - // In most methods, dimensions & metrics can be used for the first time in - // this field. However in a RunPivotReportRequest, this field must be - // additionally specified by name in the RunPivotReportRequest's dimensions or - // metrics. - string field_name = 1; - - // Specify one type of filter for `Filter`. - oneof one_filter { - // Strings related filter. - StringFilter string_filter = 3; - - // A filter for in list values. - InListFilter in_list_filter = 4; - - // A filter for numeric or date values. - NumericFilter numeric_filter = 5; - - // A filter for two values. - BetweenFilter between_filter = 6; - - // A filter for empty values such as "(not set)" and "" values. - EmptyFilter empty_filter = 8; - } -} - -// Order bys define how rows will be sorted in the response. For example, -// ordering rows by descending event count is one ordering, and ordering rows by -// the event name string is a different ordering. -message OrderBy { - // Sorts by metric values. - message MetricOrderBy { - // A metric name in the request to order by. - string metric_name = 1; - } - - // Sorts by dimension values. - message DimensionOrderBy { - // Rule to order the string dimension values by. - enum OrderType { - // Unspecified. - ORDER_TYPE_UNSPECIFIED = 0; - - // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < - // "b" < "z". - ALPHANUMERIC = 1; - - // Case insensitive alphanumeric sort by lower case Unicode code point. - // For example, "2" < "A" < "b" < "X" < "z". - CASE_INSENSITIVE_ALPHANUMERIC = 2; - - // Dimension values are converted to numbers before sorting. For example - // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < - // "25". Non-numeric dimension values all have equal ordering value below - // all numeric values. - NUMERIC = 3; - } - - // A dimension name in the request to order by. - string dimension_name = 1; - - // Controls the rule for dimension value ordering. - OrderType order_type = 2; - } - - // Sorts by a pivot column group. - message PivotOrderBy { - // A pair of dimension names and values. Rows with this dimension pivot pair - // are ordered by the metric's value. - // - // For example if pivots = {{"browser", "Chrome"}} and - // metric_name = "Sessions", - // then the rows will be sorted based on Sessions in Chrome. - // - // ---------|----------|----------------|----------|---------------- - // | Chrome | Chrome | Safari | Safari - // ---------|----------|----------------|----------|---------------- - // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions - // ---------|----------|----------------|----------|---------------- - // US | 2 | 2 | 3 | 1 - // ---------|----------|----------------|----------|---------------- - // Canada | 3 | 1 | 4 | 1 - // ---------|----------|----------------|----------|---------------- - message PivotSelection { - // Must be a dimension name from the request. - string dimension_name = 1; - - // Order by only when the named dimension is this value. - string dimension_value = 2; - } - - // In the response to order by, order rows by this column. Must be a metric - // name from the request. - string metric_name = 1; - - // Used to select a dimension name and value pivot. If multiple pivot - // selections are given, the sort occurs on rows where all pivot selection - // dimension name and value pairs match the row's dimension name and value - // pair. - repeated PivotSelection pivot_selections = 2; - } - - // Specify one type of order by for `OrderBy`. - oneof one_order_by { - // Sorts results by a metric's values. - MetricOrderBy metric = 1; - - // Sorts results by a dimension's values. - DimensionOrderBy dimension = 2; - - // Sorts results by a metric's values within a pivot column group. - PivotOrderBy pivot = 3; - } - - // If true, sorts by descending order. - bool desc = 4; -} - -// Describes the visible dimension columns and rows in the report response. -message Pivot { - // Dimension names for visible columns in the report response. Including - // "dateRange" produces a date range column; for each row in the response, - // dimension values in the date range column will indicate the corresponding - // date range from the request. - repeated string field_names = 1; - - // Specifies how dimensions are ordered in the pivot. In the first Pivot, the - // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent - // Pivots, the OrderBys determine only PivotDimensionHeader ordering. - // Dimensions specified in these OrderBys must be a subset of - // Pivot.field_names. - repeated OrderBy order_bys = 2; - - // The row count of the start row. The first row is counted as row 0. - int64 offset = 3; - - // The number of unique combinations of dimension values to return in this - // pivot. The `limit` parameter is required. A `limit` of 10,000 is common for - // single pivot requests. - // - // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` - // must not exceed 250,000. For example, a two pivot request with `limit: - // 1000` in each pivot will fail because the product is `1,000,000`. - int64 limit = 4; - - // Aggregate the metrics by dimensions in this pivot using the specified - // metric_aggregations. - repeated MetricAggregation metric_aggregations = 5; -} - -// The specification of cohorts for a cohort report. -// -// Cohort reports create a time series of user retention for the cohort. For -// example, you could select the cohort of users that were acquired in the first -// week of September and follow that cohort for the next six weeks. Selecting -// the users acquired in the first week of September cohort is specified in the -// `cohort` object. Following that cohort for the next six weeks is specified in -// the `cohortsRange` object. -// -// For examples, see [Cohort Report -// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). -// -// The report response could show a weekly time series where say your app has -// retained 60% of this cohort after three weeks and 25% of this cohort after -// six weeks. These two percentages can be calculated by the metric -// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. -message CohortSpec { - // Defines the selection criteria to group users into cohorts. - // - // Most cohort reports define only a single cohort. If multiple cohorts are - // specified, each cohort can be recognized in the report by their name. - repeated Cohort cohorts = 1; - - // Cohort reports follow cohorts over an extended reporting date range. This - // range specifies an offset duration to follow the cohorts over. - CohortsRange cohorts_range = 2; - - // Optional settings for a cohort report. - CohortReportSettings cohort_report_settings = 3; -} - -// Defines a cohort selection criteria. A cohort is a group of users who share -// a common characteristic. For example, users with the same `firstSessionDate` -// belong to the same cohort. -message Cohort { - // Assigns a name to this cohort. The dimension `cohort` is valued to this - // name in a report response. If set, cannot begin with `cohort_` or - // `RESERVED_`. If not set, cohorts are named by their zero based index - // `cohort_0`, `cohort_1`, etc. - string name = 1; - - // Dimension used by the cohort. Required and only supports - // `firstSessionDate`. - string dimension = 2; - - // The cohort selects users whose first touch date is between start date and - // end date defined in the `dateRange`. This `dateRange` does not specify the - // full date range of event data that is present in a cohort report. In a - // cohort report, this `dateRange` is extended by the granularity and offset - // present in the `cohortsRange`; event data for the extended reporting date - // range is present in a cohort report. - // - // In a cohort request, this `dateRange` is required and the `dateRanges` in - // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. - // - // This `dateRange` should generally be aligned with the cohort's granularity. - // If `CohortsRange` uses daily granularity, this `dateRange` can be a single - // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be - // aligned to a week boundary, starting at Sunday and ending Saturday. If - // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to - // a month, starting at the first and ending on the last day of the month. - DateRange date_range = 3; -} - -// Configures the extended reporting date range for a cohort report. Specifies -// an offset duration to follow the cohorts over. -message CohortsRange { - // The granularity used to interpret the `startOffset` and `endOffset` for the - // extended reporting date range for a cohort report. - enum Granularity { - // Should never be specified. - GRANULARITY_UNSPECIFIED = 0; - - // Daily granularity. Commonly used if the cohort's `dateRange` is a single - // day and the request contains `cohortNthDay`. - DAILY = 1; - - // Weekly granularity. Commonly used if the cohort's `dateRange` is a week - // in duration (starting on Sunday and ending on Saturday) and the request - // contains `cohortNthWeek`. - WEEKLY = 2; - - // Monthly granularity. Commonly used if the cohort's `dateRange` is a month - // in duration and the request contains `cohortNthMonth`. - MONTHLY = 3; - } - - // Required. The granularity used to interpret the `startOffset` and - // `endOffset` for the extended reporting date range for a cohort report. - Granularity granularity = 1; - - // `startOffset` specifies the start date of the extended reporting date range - // for a cohort report. `startOffset` is commonly set to 0 so that reports - // contain data from the acquisition of the cohort forward. - // - // If `granularity` is `DAILY`, the `startDate` of the extended reporting date - // range is `startDate` of the cohort plus `startOffset` days. - // - // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting - // date range is `startDate` of the cohort plus `startOffset * 7` days. - // - // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting - // date range is `startDate` of the cohort plus `startOffset * 30` days. - int32 start_offset = 2; - - // Required. `endOffset` specifies the end date of the extended reporting date - // range for a cohort report. `endOffset` can be any positive integer but is - // commonly set to 5 to 10 so that reports contain data on the cohort for the - // next several granularity time periods. - // - // If `granularity` is `DAILY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset` days. - // - // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset * 7` days. - // - // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date - // range is `endDate` of the cohort plus `endOffset * 30` days. - int32 end_offset = 3; -} - -// Optional settings of a cohort report. -message CohortReportSettings { - // If true, accumulates the result from first touch day to the end day. Not - // supported in `RunReportRequest`. - bool accumulate = 1; -} - -// Response's metadata carrying additional information about the report content. -message ResponseMetaData { - // The schema restrictions actively enforced in creating this report. To learn - // more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - message SchemaRestrictionResponse { - // A metric actively restricted in creating the report. - message ActiveMetricRestriction { - // The name of the restricted metric. - optional string metric_name = 1; - - // The reason for this metric's restriction. - repeated RestrictedMetricType restricted_metric_types = 2; - } - - // All restrictions actively enforced in creating the report. For example, - // `purchaseRevenue` always has the restriction type `REVENUE_DATA`. - // However, this active response restriction is only populated if the user's - // custom role disallows access to `REVENUE_DATA`. - repeated ActiveMetricRestriction active_metric_restrictions = 1; - } - - // If true, indicates some buckets of dimension combinations are rolled into - // "(other)" row. This can happen for high cardinality reports. - // - // The metadata parameter dataLossFromOtherRow is populated based on the - // aggregated data table used in the report. The parameter will be accurately - // populated regardless of the filters and limits in the report. - // - // For example, the (other) row could be dropped from the report because the - // request contains a filter on sessionSource = google. This parameter will - // still be populated if data loss from other row was present in the input - // aggregate data used to generate this report. - // - // To learn more, see [About the (other) row and data - // sampling](https://support.google.com/analytics/answer/13208658#reports). - bool data_loss_from_other_row = 3; - - // Describes the schema restrictions actively enforced in creating this - // report. To learn more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - optional SchemaRestrictionResponse schema_restriction_response = 4; - - // The currency code used in this report. Intended to be used in formatting - // currency metrics like `purchaseRevenue` for visualization. If currency_code - // was specified in the request, this response parameter will echo the request - // parameter; otherwise, this response parameter is the property's current - // currency_code. - // - // Currency codes are string encodings of currency types from the ISO 4217 - // standard (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", - // "EUR", "JPY". To learn more, see - // https://support.google.com/analytics/answer/9796179. - optional string currency_code = 5; - - // The property's current timezone. Intended to be used to interpret - // time-based dimensions like `hour` and `minute`. Formatted as strings from - // the IANA Time Zone database (https://www.iana.org/time-zones); for example - // "America/New_York" or "Asia/Tokyo". - optional string time_zone = 6; - - // If empty reason is specified, the report is empty for this reason. - optional string empty_reason = 7; - - // If `subjectToThresholding` is true, this report is subject to thresholding - // and only returns data that meets the minimum aggregation thresholds. It is - // possible for a request to be subject to thresholding thresholding and no - // data is absent from the report, and this happens when all data is above the - // thresholds. To learn more, see [Data - // thresholds](https://support.google.com/analytics/answer/9383630). - optional bool subject_to_thresholding = 8; - - // If this report results is - // [sampled](https://support.google.com/analytics/answer/13331292), this - // describes the percentage of events used in this report. One - // `samplingMetadatas` is populated for each date range. Each - // `samplingMetadatas` corresponds to a date range in order that date ranges - // were specified in the request. - // - // However if the results are not sampled, this field will not be defined. - repeated SamplingMetadata sampling_metadatas = 9; -} - -// If this report results is -// [sampled](https://support.google.com/analytics/answer/13331292), this -// describes the percentage of events used in this report. Sampling is the -// practice of analyzing a subset of all data in order to uncover the meaningful -// information in the larger data set. -message SamplingMetadata { - // The total number of events read in this sampled report for a date range. - // This is the size of the subset this property's data that was analyzed in - // this report. - int64 samples_read_count = 1; - - // The total number of events present in this property's data that could - // have been analyzed in this report for a date range. Sampling - // uncovers the meaningful information about the larger data set, and this - // is the size of the larger data set. - // - // To calculate the percentage of available data that was used in this - // report, compute `samplesReadCount/samplingSpaceSize`. - int64 sampling_space_size = 2; -} - -// Describes a dimension column in the report. Dimensions requested in a report -// produce column entries within rows and DimensionHeaders. However, dimensions -// used exclusively within filters or expressions do not produce columns in a -// report; correspondingly, those dimensions do not produce headers. -message DimensionHeader { - // The dimension's name. - string name = 1; -} - -// Describes a metric column in the report. Visible metrics requested in a -// report produce column entries within rows and MetricHeaders. However, -// metrics used exclusively within filters or expressions do not produce columns -// in a report; correspondingly, those metrics do not produce headers. -message MetricHeader { - // The metric's name. - string name = 1; - - // The metric's data type. - MetricType type = 2; -} - -// Dimensions' values in a single pivot. -message PivotHeader { - // The size is the same as the cardinality of the corresponding dimension - // combinations. - repeated PivotDimensionHeader pivot_dimension_headers = 1; - - // The cardinality of the pivot. The total number of rows for this pivot's - // fields regardless of how the parameters `offset` and `limit` are specified - // in the request. - int32 row_count = 2; -} - -// Summarizes dimension values from a row for this pivot. -message PivotDimensionHeader { - // Values of multiple dimensions in a pivot. - repeated DimensionValue dimension_values = 1; -} - -// Report data for each row. -// For example if RunReportRequest contains: -// -// ```none -// "dimensions": [ -// { -// "name": "eventName" -// }, -// { -// "name": "countryId" -// } -// ], -// "metrics": [ -// { -// "name": "eventCount" -// } -// ] -// ``` -// -// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and -// 15 as the eventCount, would be: -// -// ```none -// "dimensionValues": [ -// { -// "value": "in_app_purchase" -// }, -// { -// "value": "JP" -// } -// ], -// "metricValues": [ -// { -// "value": "15" -// } -// ] -// ``` -message Row { - // List of requested dimension values. In a PivotReport, dimension_values - // are only listed for dimensions included in a pivot. - repeated DimensionValue dimension_values = 1; - - // List of requested visible metric values. - repeated MetricValue metric_values = 2; -} - -// The value of a dimension. -message DimensionValue { - // One kind of dimension value - oneof one_value { - // Value as a string if the dimension type is a string. - string value = 1; - } -} - -// The value of a metric. -message MetricValue { - // One of metric value - oneof one_value { - // Measurement value. See MetricHeader for type. - string value = 4; - } -} - -// To represent a number. -message NumericValue { - // One of a numeric value - oneof one_value { - // Integer value - int64 int64_value = 1; - - // Double value - double double_value = 2; - } -} - -// Current state of all quotas for this Analytics Property. If any quota for a -// property is exhausted, all requests to that property will return Resource -// Exhausted errors. -message PropertyQuota { - // Standard Analytics Properties can use up to 200,000 tokens per day; - // Analytics 360 Properties can use 2,000,000 tokens per day. Most requests - // consume fewer than 10 tokens. - QuotaStatus tokens_per_day = 1; - - // Standard Analytics Properties can use up to 40,000 tokens per hour; - // Analytics 360 Properties can use 400,000 tokens per hour. An API request - // consumes a single number of tokens, and that number is deducted from all of - // the hourly, daily, and per project hourly quotas. - QuotaStatus tokens_per_hour = 2; - - // Standard Analytics Properties can send up to 10 concurrent requests; - // Analytics 360 Properties can use up to 50 concurrent requests. - QuotaStatus concurrent_requests = 3; - - // Standard Analytics Properties and cloud project pairs can have up to 10 - // server errors per hour; Analytics 360 Properties and cloud project pairs - // can have up to 50 server errors per hour. - QuotaStatus server_errors_per_project_per_hour = 4; - - // Analytics Properties can send up to 120 requests with potentially - // thresholded dimensions per hour. In a batch request, each report request - // is individually counted for this quota if the request contains potentially - // thresholded dimensions. - QuotaStatus potentially_thresholded_requests_per_hour = 5; - - // Analytics Properties can use up to 35% of their tokens per project per - // hour. This amounts to standard Analytics Properties can use up to 14,000 - // tokens per project per hour, and Analytics 360 Properties can use 140,000 - // tokens per project per hour. An API request consumes a single number of - // tokens, and that number is deducted from all of the hourly, daily, and per - // project hourly quotas. - QuotaStatus tokens_per_project_per_hour = 6; -} - -// Current state for a particular quota group. -message QuotaStatus { - // Quota consumed by this request. - optional int32 consumed = 1; - - // Quota remaining after this request. - optional int32 remaining = 2; -} - -// Explains a dimension. -message DimensionMetadata { - // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For - // example, `eventName`. - string api_name = 1; - - // This dimension's name within the Google Analytics user interface. For - // example, `Event name`. - string ui_name = 2; - - // Description of how this dimension is used and calculated. - string description = 3; - - // Still usable but deprecated names for this dimension. If populated, this - // dimension is available by either `apiName` or one of `deprecatedApiNames` - // for a period of time. After the deprecation period, the dimension will be - // available only by `apiName`. - repeated string deprecated_api_names = 4; - - // True if the dimension is custom to this property. This includes user, - // event, & item scoped custom dimensions; to learn more about custom - // dimensions, see https://support.google.com/analytics/answer/14240153. This - // also include custom channel groups; to learn more about custom channel - // groups, see https://support.google.com/analytics/answer/13051316. - bool custom_definition = 5; - - // The display name of the category that this dimension belongs to. Similar - // dimensions and metrics are categorized together. - string category = 7; -} - -// Explains a metric. -message MetricMetadata { - // Justifications for why this metric is blocked. - enum BlockedReason { - // Will never be specified in API response. - BLOCKED_REASON_UNSPECIFIED = 0; - - // If present, your access is blocked to revenue related metrics for this - // property, and this metric is revenue related. - NO_REVENUE_METRICS = 1; - - // If present, your access is blocked to cost related metrics for this - // property, and this metric is cost related. - NO_COST_METRICS = 2; - } - - // A metric name. Useable in [Metric](#Metric)'s `name`. For example, - // `eventCount`. - string api_name = 1; - - // This metric's name within the Google Analytics user interface. For example, - // `Event count`. - string ui_name = 2; - - // Description of how this metric is used and calculated. - string description = 3; - - // Still usable but deprecated names for this metric. If populated, this - // metric is available by either `apiName` or one of `deprecatedApiNames` - // for a period of time. After the deprecation period, the metric will be - // available only by `apiName`. - repeated string deprecated_api_names = 4; - - // The type of this metric. - MetricType type = 5; - - // The mathematical expression for this derived metric. Can be used in - // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics - // are not expressions, and for non-expressions, this field is empty. - string expression = 6; - - // True if the metric is a custom metric for this property. - bool custom_definition = 7; - - // If reasons are specified, your access is blocked to this metric for this - // property. API requests from you to this property for this metric will - // succeed; however, the report will contain only zeros for this metric. API - // requests with metric filters on blocked metrics will fail. If reasons are - // empty, you have access to this metric. - // - // To learn more, see [Access and data-restriction - // management](https://support.google.com/analytics/answer/10851388). - repeated BlockedReason blocked_reasons = 8; - - // The display name of the category that this metrics belongs to. Similar - // dimensions and metrics are categorized together. - string category = 10; -} - -// The metadata for a single comparison. -message ComparisonMetadata { - // This comparison's resource name. Useable in [Comparison](#Comparison)'s - // `comparison` field. For example, 'comparisons/1234'. - string api_name = 1; - - // This comparison's name within the Google Analytics user interface. - string ui_name = 2; - - // This comparison's description. - string description = 3; -} - -// The compatibility for a single dimension. -message DimensionCompatibility { - // The dimension metadata contains the API name for this compatibility - // information. The dimension metadata also contains other helpful information - // like the UI name and description. - optional DimensionMetadata dimension_metadata = 1; - - // The compatibility of this dimension. If the compatibility is COMPATIBLE, - // this dimension can be successfully added to the report. - optional Compatibility compatibility = 2; -} - -// The compatibility for a single metric. -message MetricCompatibility { - // The metric metadata contains the API name for this compatibility - // information. The metric metadata also contains other helpful information - // like the UI name and description. - optional MetricMetadata metric_metadata = 1; - - // The compatibility of this metric. If the compatibility is COMPATIBLE, - // this metric can be successfully added to the report. - optional Compatibility compatibility = 2; -} - -// Represents aggregation of metrics. -enum MetricAggregation { - // Unspecified operator. - METRIC_AGGREGATION_UNSPECIFIED = 0; - - // SUM operator. - TOTAL = 1; - - // Minimum operator. - MINIMUM = 5; - - // Maximum operator. - MAXIMUM = 6; - - // Count operator. - COUNT = 4; -} - -// A metric's value type. -enum MetricType { - // Unspecified type. - METRIC_TYPE_UNSPECIFIED = 0; - - // Integer type. - TYPE_INTEGER = 1; - - // Floating point type. - TYPE_FLOAT = 2; - - // A duration of seconds; a special floating point type. - TYPE_SECONDS = 4; - - // A duration in milliseconds; a special floating point type. - TYPE_MILLISECONDS = 5; - - // A duration in minutes; a special floating point type. - TYPE_MINUTES = 6; - - // A duration in hours; a special floating point type. - TYPE_HOURS = 7; - - // A custom metric of standard type; a special floating point type. - TYPE_STANDARD = 8; - - // An amount of money; a special floating point type. - TYPE_CURRENCY = 9; - - // A length in feet; a special floating point type. - TYPE_FEET = 10; - - // A length in miles; a special floating point type. - TYPE_MILES = 11; - - // A length in meters; a special floating point type. - TYPE_METERS = 12; - - // A length in kilometers; a special floating point type. - TYPE_KILOMETERS = 13; -} - -// Categories of data that you may be restricted from viewing on certain -// Google Analytics properties. -enum RestrictedMetricType { - // Unspecified type. - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; - - // Cost metrics such as `adCost`. - COST_DATA = 1; - - // Revenue metrics such as `purchaseRevenue`. - REVENUE_DATA = 2; -} - -// The compatibility types for a single dimension or metric. -enum Compatibility { - // Unspecified compatibility. - COMPATIBILITY_UNSPECIFIED = 0; - - // The dimension or metric is compatible. This dimension or metric can be - // successfully added to a report. - COMPATIBLE = 1; - - // The dimension or metric is incompatible. This dimension or metric cannot be - // successfully added to a report. - INCOMPATIBLE = 2; -} diff --git a/owl-bot-staging/google-analytics-data/protos/protos.d.ts b/owl-bot-staging/google-analytics-data/protos/protos.d.ts deleted file mode 100644 index 5f7a160e8a0d..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/protos.d.ts +++ /dev/null @@ -1,28701 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace analytics. */ - namespace analytics { - - /** Namespace data. */ - namespace data { - - /** Namespace v1alpha. */ - namespace v1alpha { - - /** Represents an AlphaAnalyticsData */ - class AlphaAnalyticsData extends $protobuf.rpc.Service { - - /** - * Constructs a new AlphaAnalyticsData service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new AlphaAnalyticsData service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AlphaAnalyticsData; - - /** - * Calls RunFunnelReport. - * @param request RunFunnelReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunFunnelReportResponse - */ - public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback): void; - - /** - * Calls RunFunnelReport. - * @param request RunFunnelReportRequest message or plain object - * @returns Promise - */ - public runFunnelReport(request: google.analytics.data.v1alpha.IRunFunnelReportRequest): Promise; - - /** - * Calls CreateAudienceList. - * @param request CreateAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback): void; - - /** - * Calls CreateAudienceList. - * @param request CreateAudienceListRequest message or plain object - * @returns Promise - */ - public createAudienceList(request: google.analytics.data.v1alpha.ICreateAudienceListRequest): Promise; - - /** - * Calls QueryAudienceList. - * @param request QueryAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAudienceListResponse - */ - public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback): void; - - /** - * Calls QueryAudienceList. - * @param request QueryAudienceListRequest message or plain object - * @returns Promise - */ - public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest): Promise; - - /** - * Calls GetAudienceList. - * @param request GetAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AudienceList - */ - public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback): void; - - /** - * Calls GetAudienceList. - * @param request GetAudienceListRequest message or plain object - * @returns Promise - */ - public getAudienceList(request: google.analytics.data.v1alpha.IGetAudienceListRequest): Promise; - - /** - * Calls ListAudienceLists. - * @param request ListAudienceListsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAudienceListsResponse - */ - public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback): void; - - /** - * Calls ListAudienceLists. - * @param request ListAudienceListsRequest message or plain object - * @returns Promise - */ - public listAudienceLists(request: google.analytics.data.v1alpha.IListAudienceListsRequest): Promise; - - /** - * Calls CreateRecurringAudienceList. - * @param request CreateRecurringAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecurringAudienceList - */ - public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback): void; - - /** - * Calls CreateRecurringAudienceList. - * @param request CreateRecurringAudienceListRequest message or plain object - * @returns Promise - */ - public createRecurringAudienceList(request: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): Promise; - - /** - * Calls GetRecurringAudienceList. - * @param request GetRecurringAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecurringAudienceList - */ - public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback): void; - - /** - * Calls GetRecurringAudienceList. - * @param request GetRecurringAudienceListRequest message or plain object - * @returns Promise - */ - public getRecurringAudienceList(request: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): Promise; - - /** - * Calls ListRecurringAudienceLists. - * @param request ListRecurringAudienceListsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse - */ - public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback): void; - - /** - * Calls ListRecurringAudienceLists. - * @param request ListRecurringAudienceListsRequest message or plain object - * @returns Promise - */ - public listRecurringAudienceLists(request: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): Promise; - - /** - * Calls GetPropertyQuotasSnapshot. - * @param request GetPropertyQuotasSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot - */ - public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback): void; - - /** - * Calls GetPropertyQuotasSnapshot. - * @param request GetPropertyQuotasSnapshotRequest message or plain object - * @returns Promise - */ - public getPropertyQuotasSnapshot(request: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): Promise; - - /** - * Calls CreateReportTask. - * @param request CreateReportTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback): void; - - /** - * Calls CreateReportTask. - * @param request CreateReportTaskRequest message or plain object - * @returns Promise - */ - public createReportTask(request: google.analytics.data.v1alpha.ICreateReportTaskRequest): Promise; - - /** - * Calls QueryReportTask. - * @param request QueryReportTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryReportTaskResponse - */ - public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback): void; - - /** - * Calls QueryReportTask. - * @param request QueryReportTaskRequest message or plain object - * @returns Promise - */ - public queryReportTask(request: google.analytics.data.v1alpha.IQueryReportTaskRequest): Promise; - - /** - * Calls GetReportTask. - * @param request GetReportTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ReportTask - */ - public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback): void; - - /** - * Calls GetReportTask. - * @param request GetReportTaskRequest message or plain object - * @returns Promise - */ - public getReportTask(request: google.analytics.data.v1alpha.IGetReportTaskRequest): Promise; - - /** - * Calls ListReportTasks. - * @param request ListReportTasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListReportTasksResponse - */ - public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback): void; - - /** - * Calls ListReportTasks. - * @param request ListReportTasksRequest message or plain object - * @returns Promise - */ - public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest): Promise; - - /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunReportResponse - */ - public runReport(request: google.analytics.data.v1alpha.IRunReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback): void; - - /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @returns Promise - */ - public runReport(request: google.analytics.data.v1alpha.IRunReportRequest): Promise; - - /** - * Calls GetMetadata. - * @param request GetMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Metadata - */ - public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback): void; - - /** - * Calls GetMetadata. - * @param request GetMetadataRequest message or plain object - * @returns Promise - */ - public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest): Promise; - } - - namespace AlphaAnalyticsData { - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. - * @param error Error, if any - * @param [response] RunFunnelReportResponse - */ - type RunFunnelReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunFunnelReportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateAudienceListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. - * @param error Error, if any - * @param [response] QueryAudienceListResponse - */ - type QueryAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryAudienceListResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. - * @param error Error, if any - * @param [response] AudienceList - */ - type GetAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.AudienceList) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. - * @param error Error, if any - * @param [response] ListAudienceListsResponse - */ - type ListAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListAudienceListsResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. - * @param error Error, if any - * @param [response] RecurringAudienceList - */ - type CreateRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. - * @param error Error, if any - * @param [response] RecurringAudienceList - */ - type GetRecurringAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RecurringAudienceList) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. - * @param error Error, if any - * @param [response] ListRecurringAudienceListsResponse - */ - type ListRecurringAudienceListsCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. - * @param error Error, if any - * @param [response] PropertyQuotasSnapshot - */ - type GetPropertyQuotasSnapshotCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.PropertyQuotasSnapshot) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateReportTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. - * @param error Error, if any - * @param [response] QueryReportTaskResponse - */ - type QueryReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryReportTaskResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. - * @param error Error, if any - * @param [response] ReportTask - */ - type GetReportTaskCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ReportTask) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. - * @param error Error, if any - * @param [response] ListReportTasksResponse - */ - type ListReportTasksCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListReportTasksResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. - * @param error Error, if any - * @param [response] RunReportResponse - */ - type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunReportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. - * @param error Error, if any - * @param [response] Metadata - */ - type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.Metadata) => void; - } - - /** Properties of a CreateRecurringAudienceListRequest. */ - interface ICreateRecurringAudienceListRequest { - - /** CreateRecurringAudienceListRequest parent */ - parent?: (string|null); - - /** CreateRecurringAudienceListRequest recurringAudienceList */ - recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); - } - - /** Represents a CreateRecurringAudienceListRequest. */ - class CreateRecurringAudienceListRequest implements ICreateRecurringAudienceListRequest { - - /** - * Constructs a new CreateRecurringAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest); - - /** CreateRecurringAudienceListRequest parent. */ - public parent: string; - - /** CreateRecurringAudienceListRequest recurringAudienceList. */ - public recurringAudienceList?: (google.analytics.data.v1alpha.IRecurringAudienceList|null); - - /** - * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateRecurringAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; - - /** - * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. - * @param message CreateRecurringAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. - * @param message CreateRecurringAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; - - /** - * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; - - /** - * Verifies a CreateRecurringAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateRecurringAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateRecurringAudienceListRequest; - - /** - * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. - * @param message CreateRecurringAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateRecurringAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateRecurringAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecurringAudienceList. */ - interface IRecurringAudienceList { - - /** RecurringAudienceList name */ - name?: (string|null); - - /** RecurringAudienceList audience */ - audience?: (string|null); - - /** RecurringAudienceList audienceDisplayName */ - audienceDisplayName?: (string|null); - - /** RecurringAudienceList dimensions */ - dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); - - /** RecurringAudienceList activeDaysRemaining */ - activeDaysRemaining?: (number|null); - - /** RecurringAudienceList audienceLists */ - audienceLists?: (string[]|null); - - /** RecurringAudienceList webhookNotification */ - webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); - } - - /** Represents a RecurringAudienceList. */ - class RecurringAudienceList implements IRecurringAudienceList { - - /** - * Constructs a new RecurringAudienceList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRecurringAudienceList); - - /** RecurringAudienceList name. */ - public name: string; - - /** RecurringAudienceList audience. */ - public audience: string; - - /** RecurringAudienceList audienceDisplayName. */ - public audienceDisplayName: string; - - /** RecurringAudienceList dimensions. */ - public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; - - /** RecurringAudienceList activeDaysRemaining. */ - public activeDaysRemaining?: (number|null); - - /** RecurringAudienceList audienceLists. */ - public audienceLists: string[]; - - /** RecurringAudienceList webhookNotification. */ - public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); - - /** - * Creates a new RecurringAudienceList instance using the specified properties. - * @param [properties] Properties to set - * @returns RecurringAudienceList instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRecurringAudienceList): google.analytics.data.v1alpha.RecurringAudienceList; - - /** - * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. - * @param message RecurringAudienceList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. - * @param message RecurringAudienceList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRecurringAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecurringAudienceList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecurringAudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RecurringAudienceList; - - /** - * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecurringAudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RecurringAudienceList; - - /** - * Verifies a RecurringAudienceList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecurringAudienceList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RecurringAudienceList; - - /** - * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. - * @param message RecurringAudienceList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.RecurringAudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecurringAudienceList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecurringAudienceList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WebhookNotification. */ - interface IWebhookNotification { - - /** WebhookNotification uri */ - uri?: (string|null); - - /** WebhookNotification channelToken */ - channelToken?: (string|null); - } - - /** Represents a WebhookNotification. */ - class WebhookNotification implements IWebhookNotification { - - /** - * Constructs a new WebhookNotification. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IWebhookNotification); - - /** WebhookNotification uri. */ - public uri?: (string|null); - - /** WebhookNotification channelToken. */ - public channelToken?: (string|null); - - /** - * Creates a new WebhookNotification instance using the specified properties. - * @param [properties] Properties to set - * @returns WebhookNotification instance - */ - public static create(properties?: google.analytics.data.v1alpha.IWebhookNotification): google.analytics.data.v1alpha.WebhookNotification; - - /** - * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. - * @param message WebhookNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. - * @param message WebhookNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebhookNotification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebhookNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.WebhookNotification; - - /** - * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebhookNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.WebhookNotification; - - /** - * Verifies a WebhookNotification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebhookNotification - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.WebhookNotification; - - /** - * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. - * @param message WebhookNotification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.WebhookNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebhookNotification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebhookNotification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRecurringAudienceListRequest. */ - interface IGetRecurringAudienceListRequest { - - /** GetRecurringAudienceListRequest name */ - name?: (string|null); - } - - /** Represents a GetRecurringAudienceListRequest. */ - class GetRecurringAudienceListRequest implements IGetRecurringAudienceListRequest { - - /** - * Constructs a new GetRecurringAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest); - - /** GetRecurringAudienceListRequest name. */ - public name: string; - - /** - * Creates a new GetRecurringAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRecurringAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; - - /** - * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. - * @param message GetRecurringAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. - * @param message GetRecurringAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; - - /** - * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; - - /** - * Verifies a GetRecurringAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRecurringAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetRecurringAudienceListRequest; - - /** - * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. - * @param message GetRecurringAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.GetRecurringAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRecurringAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRecurringAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRecurringAudienceListsRequest. */ - interface IListRecurringAudienceListsRequest { - - /** ListRecurringAudienceListsRequest parent */ - parent?: (string|null); - - /** ListRecurringAudienceListsRequest pageSize */ - pageSize?: (number|null); - - /** ListRecurringAudienceListsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListRecurringAudienceListsRequest. */ - class ListRecurringAudienceListsRequest implements IListRecurringAudienceListsRequest { - - /** - * Constructs a new ListRecurringAudienceListsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest); - - /** ListRecurringAudienceListsRequest parent. */ - public parent: string; - - /** ListRecurringAudienceListsRequest pageSize. */ - public pageSize: number; - - /** ListRecurringAudienceListsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRecurringAudienceListsRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; - - /** - * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. - * @param message ListRecurringAudienceListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. - * @param message ListRecurringAudienceListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRecurringAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; - - /** - * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRecurringAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; - - /** - * Verifies a ListRecurringAudienceListsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRecurringAudienceListsRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsRequest; - - /** - * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. - * @param message ListRecurringAudienceListsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRecurringAudienceListsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRecurringAudienceListsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRecurringAudienceListsResponse. */ - interface IListRecurringAudienceListsResponse { - - /** ListRecurringAudienceListsResponse recurringAudienceLists */ - recurringAudienceLists?: (google.analytics.data.v1alpha.IRecurringAudienceList[]|null); - - /** ListRecurringAudienceListsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListRecurringAudienceListsResponse. */ - class ListRecurringAudienceListsResponse implements IListRecurringAudienceListsResponse { - - /** - * Constructs a new ListRecurringAudienceListsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse); - - /** ListRecurringAudienceListsResponse recurringAudienceLists. */ - public recurringAudienceLists: google.analytics.data.v1alpha.IRecurringAudienceList[]; - - /** ListRecurringAudienceListsResponse nextPageToken. */ - public nextPageToken?: (string|null); - - /** - * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRecurringAudienceListsResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; - - /** - * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. - * @param message ListRecurringAudienceListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. - * @param message ListRecurringAudienceListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListRecurringAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRecurringAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; - - /** - * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRecurringAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; - - /** - * Verifies a ListRecurringAudienceListsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRecurringAudienceListsResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListRecurringAudienceListsResponse; - - /** - * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. - * @param message ListRecurringAudienceListsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRecurringAudienceListsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRecurringAudienceListsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPropertyQuotasSnapshotRequest. */ - interface IGetPropertyQuotasSnapshotRequest { - - /** GetPropertyQuotasSnapshotRequest name */ - name?: (string|null); - } - - /** Represents a GetPropertyQuotasSnapshotRequest. */ - class GetPropertyQuotasSnapshotRequest implements IGetPropertyQuotasSnapshotRequest { - - /** - * Constructs a new GetPropertyQuotasSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest); - - /** GetPropertyQuotasSnapshotRequest name. */ - public name: string; - - /** - * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPropertyQuotasSnapshotRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; - - /** - * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. - * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. - * @param message GetPropertyQuotasSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPropertyQuotasSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; - - /** - * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPropertyQuotasSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; - - /** - * Verifies a GetPropertyQuotasSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPropertyQuotasSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest; - - /** - * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. - * @param message GetPropertyQuotasSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPropertyQuotasSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPropertyQuotasSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PropertyQuotasSnapshot. */ - interface IPropertyQuotasSnapshot { - - /** PropertyQuotasSnapshot name */ - name?: (string|null); - - /** PropertyQuotasSnapshot corePropertyQuota */ - corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** PropertyQuotasSnapshot realtimePropertyQuota */ - realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** PropertyQuotasSnapshot funnelPropertyQuota */ - funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - } - - /** Represents a PropertyQuotasSnapshot. */ - class PropertyQuotasSnapshot implements IPropertyQuotasSnapshot { - - /** - * Constructs a new PropertyQuotasSnapshot. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot); - - /** PropertyQuotasSnapshot name. */ - public name: string; - - /** PropertyQuotasSnapshot corePropertyQuota. */ - public corePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** PropertyQuotasSnapshot realtimePropertyQuota. */ - public realtimePropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** PropertyQuotasSnapshot funnelPropertyQuota. */ - public funnelPropertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** - * Creates a new PropertyQuotasSnapshot instance using the specified properties. - * @param [properties] Properties to set - * @returns PropertyQuotasSnapshot instance - */ - public static create(properties?: google.analytics.data.v1alpha.IPropertyQuotasSnapshot): google.analytics.data.v1alpha.PropertyQuotasSnapshot; - - /** - * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. - * @param message PropertyQuotasSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. - * @param message PropertyQuotasSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuotasSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PropertyQuotasSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuotasSnapshot; - - /** - * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PropertyQuotasSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuotasSnapshot; - - /** - * Verifies a PropertyQuotasSnapshot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PropertyQuotasSnapshot - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuotasSnapshot; - - /** - * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. - * @param message PropertyQuotasSnapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.PropertyQuotasSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PropertyQuotasSnapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PropertyQuotasSnapshot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAudienceListRequest. */ - interface IGetAudienceListRequest { - - /** GetAudienceListRequest name */ - name?: (string|null); - } - - /** Represents a GetAudienceListRequest. */ - class GetAudienceListRequest implements IGetAudienceListRequest { - - /** - * Constructs a new GetAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest); - - /** GetAudienceListRequest name. */ - public name: string; - - /** - * Creates a new GetAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IGetAudienceListRequest): google.analytics.data.v1alpha.GetAudienceListRequest; - - /** - * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. - * @param message GetAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. - * @param message GetAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IGetAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetAudienceListRequest; - - /** - * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetAudienceListRequest; - - /** - * Verifies a GetAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetAudienceListRequest; - - /** - * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. - * @param message GetAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.GetAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAudienceListsRequest. */ - interface IListAudienceListsRequest { - - /** ListAudienceListsRequest parent */ - parent?: (string|null); - - /** ListAudienceListsRequest pageSize */ - pageSize?: (number|null); - - /** ListAudienceListsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListAudienceListsRequest. */ - class ListAudienceListsRequest implements IListAudienceListsRequest { - - /** - * Constructs a new ListAudienceListsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest); - - /** ListAudienceListsRequest parent. */ - public parent: string; - - /** ListAudienceListsRequest pageSize. */ - public pageSize: number; - - /** ListAudienceListsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListAudienceListsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAudienceListsRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsRequest): google.analytics.data.v1alpha.ListAudienceListsRequest; - - /** - * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. - * @param message ListAudienceListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. - * @param message ListAudienceListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAudienceListsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListAudienceListsRequest; - - /** - * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListAudienceListsRequest; - - /** - * Verifies a ListAudienceListsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAudienceListsRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsRequest; - - /** - * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. - * @param message ListAudienceListsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAudienceListsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAudienceListsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAudienceListsResponse. */ - interface IListAudienceListsResponse { - - /** ListAudienceListsResponse audienceLists */ - audienceLists?: (google.analytics.data.v1alpha.IAudienceList[]|null); - - /** ListAudienceListsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListAudienceListsResponse. */ - class ListAudienceListsResponse implements IListAudienceListsResponse { - - /** - * Constructs a new ListAudienceListsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse); - - /** ListAudienceListsResponse audienceLists. */ - public audienceLists: google.analytics.data.v1alpha.IAudienceList[]; - - /** ListAudienceListsResponse nextPageToken. */ - public nextPageToken?: (string|null); - - /** - * Creates a new ListAudienceListsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAudienceListsResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListAudienceListsResponse): google.analytics.data.v1alpha.ListAudienceListsResponse; - - /** - * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. - * @param message ListAudienceListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. - * @param message ListAudienceListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListAudienceListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAudienceListsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListAudienceListsResponse; - - /** - * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListAudienceListsResponse; - - /** - * Verifies a ListAudienceListsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAudienceListsResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListAudienceListsResponse; - - /** - * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. - * @param message ListAudienceListsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListAudienceListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAudienceListsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAudienceListsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAudienceListRequest. */ - interface ICreateAudienceListRequest { - - /** CreateAudienceListRequest parent */ - parent?: (string|null); - - /** CreateAudienceListRequest audienceList */ - audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - } - - /** Represents a CreateAudienceListRequest. */ - class CreateAudienceListRequest implements ICreateAudienceListRequest { - - /** - * Constructs a new CreateAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest); - - /** CreateAudienceListRequest parent. */ - public parent: string; - - /** CreateAudienceListRequest audienceList. */ - public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - - /** - * Creates a new CreateAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICreateAudienceListRequest): google.analytics.data.v1alpha.CreateAudienceListRequest; - - /** - * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. - * @param message CreateAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. - * @param message CreateAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateAudienceListRequest; - - /** - * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateAudienceListRequest; - - /** - * Verifies a CreateAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateAudienceListRequest; - - /** - * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. - * @param message CreateAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CreateAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceList. */ - interface IAudienceList { - - /** AudienceList name */ - name?: (string|null); - - /** AudienceList audience */ - audience?: (string|null); - - /** AudienceList audienceDisplayName */ - audienceDisplayName?: (string|null); - - /** AudienceList dimensions */ - dimensions?: (google.analytics.data.v1alpha.IAudienceDimension[]|null); - - /** AudienceList state */ - state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); - - /** AudienceList beginCreatingTime */ - beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** AudienceList creationQuotaTokensCharged */ - creationQuotaTokensCharged?: (number|null); - - /** AudienceList rowCount */ - rowCount?: (number|null); - - /** AudienceList errorMessage */ - errorMessage?: (string|null); - - /** AudienceList percentageCompleted */ - percentageCompleted?: (number|null); - - /** AudienceList recurringAudienceList */ - recurringAudienceList?: (string|null); - - /** AudienceList webhookNotification */ - webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); - } - - /** Represents an AudienceList. */ - class AudienceList implements IAudienceList { - - /** - * Constructs a new AudienceList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IAudienceList); - - /** AudienceList name. */ - public name: string; - - /** AudienceList audience. */ - public audience: string; - - /** AudienceList audienceDisplayName. */ - public audienceDisplayName: string; - - /** AudienceList dimensions. */ - public dimensions: google.analytics.data.v1alpha.IAudienceDimension[]; - - /** AudienceList state. */ - public state?: (google.analytics.data.v1alpha.AudienceList.State|keyof typeof google.analytics.data.v1alpha.AudienceList.State|null); - - /** AudienceList beginCreatingTime. */ - public beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** AudienceList creationQuotaTokensCharged. */ - public creationQuotaTokensCharged: number; - - /** AudienceList rowCount. */ - public rowCount?: (number|null); - - /** AudienceList errorMessage. */ - public errorMessage?: (string|null); - - /** AudienceList percentageCompleted. */ - public percentageCompleted?: (number|null); - - /** AudienceList recurringAudienceList. */ - public recurringAudienceList?: (string|null); - - /** AudienceList webhookNotification. */ - public webhookNotification?: (google.analytics.data.v1alpha.IWebhookNotification|null); - - /** - * Creates a new AudienceList instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceList instance - */ - public static create(properties?: google.analytics.data.v1alpha.IAudienceList): google.analytics.data.v1alpha.AudienceList; - - /** - * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. - * @param message AudienceList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. - * @param message AudienceList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceList; - - /** - * Decodes an AudienceList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceList; - - /** - * Verifies an AudienceList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceList; - - /** - * Creates a plain object from an AudienceList message. Also converts values to other types if specified. - * @param message AudienceList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.AudienceList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AudienceList { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - FAILED = 3 - } - } - - /** Properties of an AudienceListMetadata. */ - interface IAudienceListMetadata { - } - - /** Represents an AudienceListMetadata. */ - class AudienceListMetadata implements IAudienceListMetadata { - - /** - * Constructs a new AudienceListMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IAudienceListMetadata); - - /** - * Creates a new AudienceListMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceListMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IAudienceListMetadata): google.analytics.data.v1alpha.AudienceListMetadata; - - /** - * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. - * @param message AudienceListMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. - * @param message AudienceListMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceListMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceListMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceListMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceListMetadata; - - /** - * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceListMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceListMetadata; - - /** - * Verifies an AudienceListMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceListMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceListMetadata; - - /** - * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. - * @param message AudienceListMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.AudienceListMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceListMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceListMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryAudienceListRequest. */ - interface IQueryAudienceListRequest { - - /** QueryAudienceListRequest name */ - name?: (string|null); - - /** QueryAudienceListRequest offset */ - offset?: (number|Long|string|null); - - /** QueryAudienceListRequest limit */ - limit?: (number|Long|string|null); - } - - /** Represents a QueryAudienceListRequest. */ - class QueryAudienceListRequest implements IQueryAudienceListRequest { - - /** - * Constructs a new QueryAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest); - - /** QueryAudienceListRequest name. */ - public name: string; - - /** QueryAudienceListRequest offset. */ - public offset: (number|Long|string); - - /** QueryAudienceListRequest limit. */ - public limit: (number|Long|string); - - /** - * Creates a new QueryAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListRequest): google.analytics.data.v1alpha.QueryAudienceListRequest; - - /** - * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. - * @param message QueryAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. - * @param message QueryAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryAudienceListRequest; - - /** - * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryAudienceListRequest; - - /** - * Verifies a QueryAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListRequest; - - /** - * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. - * @param message QueryAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryAudienceListResponse. */ - interface IQueryAudienceListResponse { - - /** QueryAudienceListResponse audienceList */ - audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - - /** QueryAudienceListResponse audienceRows */ - audienceRows?: (google.analytics.data.v1alpha.IAudienceRow[]|null); - - /** QueryAudienceListResponse rowCount */ - rowCount?: (number|null); - } - - /** Represents a QueryAudienceListResponse. */ - class QueryAudienceListResponse implements IQueryAudienceListResponse { - - /** - * Constructs a new QueryAudienceListResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse); - - /** QueryAudienceListResponse audienceList. */ - public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - - /** QueryAudienceListResponse audienceRows. */ - public audienceRows: google.analytics.data.v1alpha.IAudienceRow[]; - - /** QueryAudienceListResponse rowCount. */ - public rowCount?: (number|null); - - /** - * Creates a new QueryAudienceListResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAudienceListResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IQueryAudienceListResponse): google.analytics.data.v1alpha.QueryAudienceListResponse; - - /** - * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. - * @param message QueryAudienceListResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. - * @param message QueryAudienceListResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAudienceListResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryAudienceListResponse; - - /** - * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryAudienceListResponse; - - /** - * Verifies a QueryAudienceListResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAudienceListResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryAudienceListResponse; - - /** - * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. - * @param message QueryAudienceListResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.QueryAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAudienceListResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryAudienceListResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceRow. */ - interface IAudienceRow { - - /** AudienceRow dimensionValues */ - dimensionValues?: (google.analytics.data.v1alpha.IAudienceDimensionValue[]|null); - } - - /** Represents an AudienceRow. */ - class AudienceRow implements IAudienceRow { - - /** - * Constructs a new AudienceRow. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IAudienceRow); - - /** AudienceRow dimensionValues. */ - public dimensionValues: google.analytics.data.v1alpha.IAudienceDimensionValue[]; - - /** - * Creates a new AudienceRow instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceRow instance - */ - public static create(properties?: google.analytics.data.v1alpha.IAudienceRow): google.analytics.data.v1alpha.AudienceRow; - - /** - * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. - * @param message AudienceRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. - * @param message AudienceRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceRow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceRow; - - /** - * Decodes an AudienceRow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceRow; - - /** - * Verifies an AudienceRow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceRow - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceRow; - - /** - * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. - * @param message AudienceRow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceRow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceRow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceDimension. */ - interface IAudienceDimension { - - /** AudienceDimension dimensionName */ - dimensionName?: (string|null); - } - - /** Represents an AudienceDimension. */ - class AudienceDimension implements IAudienceDimension { - - /** - * Constructs a new AudienceDimension. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IAudienceDimension); - - /** AudienceDimension dimensionName. */ - public dimensionName: string; - - /** - * Creates a new AudienceDimension instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceDimension instance - */ - public static create(properties?: google.analytics.data.v1alpha.IAudienceDimension): google.analytics.data.v1alpha.AudienceDimension; - - /** - * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. - * @param message AudienceDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. - * @param message AudienceDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceDimension; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceDimension; - - /** - * Verifies an AudienceDimension message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceDimension - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimension; - - /** - * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. - * @param message AudienceDimension - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceDimension to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceDimension - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceDimensionValue. */ - interface IAudienceDimensionValue { - - /** AudienceDimensionValue value */ - value?: (string|null); - } - - /** Represents an AudienceDimensionValue. */ - class AudienceDimensionValue implements IAudienceDimensionValue { - - /** - * Constructs a new AudienceDimensionValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue); - - /** AudienceDimensionValue value. */ - public value?: (string|null); - - /** AudienceDimensionValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new AudienceDimensionValue instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceDimensionValue instance - */ - public static create(properties?: google.analytics.data.v1alpha.IAudienceDimensionValue): google.analytics.data.v1alpha.AudienceDimensionValue; - - /** - * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @param message AudienceDimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @param message AudienceDimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.AudienceDimensionValue; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.AudienceDimensionValue; - - /** - * Verifies an AudienceDimensionValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceDimensionValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.AudienceDimensionValue; - - /** - * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. - * @param message AudienceDimensionValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceDimensionValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceDimensionValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunFunnelReportRequest. */ - interface IRunFunnelReportRequest { - - /** RunFunnelReportRequest property */ - property?: (string|null); - - /** RunFunnelReportRequest dateRanges */ - dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); - - /** RunFunnelReportRequest funnel */ - funnel?: (google.analytics.data.v1alpha.IFunnel|null); - - /** RunFunnelReportRequest funnelBreakdown */ - funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); - - /** RunFunnelReportRequest funnelNextAction */ - funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); - - /** RunFunnelReportRequest funnelVisualizationType */ - funnelVisualizationType?: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null); - - /** RunFunnelReportRequest segments */ - segments?: (google.analytics.data.v1alpha.ISegment[]|null); - - /** RunFunnelReportRequest limit */ - limit?: (number|Long|string|null); - - /** RunFunnelReportRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunFunnelReportRequest returnPropertyQuota */ - returnPropertyQuota?: (boolean|null); - } - - /** Represents a RunFunnelReportRequest. */ - class RunFunnelReportRequest implements IRunFunnelReportRequest { - - /** - * Constructs a new RunFunnelReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest); - - /** RunFunnelReportRequest property. */ - public property: string; - - /** RunFunnelReportRequest dateRanges. */ - public dateRanges: google.analytics.data.v1alpha.IDateRange[]; - - /** RunFunnelReportRequest funnel. */ - public funnel?: (google.analytics.data.v1alpha.IFunnel|null); - - /** RunFunnelReportRequest funnelBreakdown. */ - public funnelBreakdown?: (google.analytics.data.v1alpha.IFunnelBreakdown|null); - - /** RunFunnelReportRequest funnelNextAction. */ - public funnelNextAction?: (google.analytics.data.v1alpha.IFunnelNextAction|null); - - /** RunFunnelReportRequest funnelVisualizationType. */ - public funnelVisualizationType: (google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|keyof typeof google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType); - - /** RunFunnelReportRequest segments. */ - public segments: google.analytics.data.v1alpha.ISegment[]; - - /** RunFunnelReportRequest limit. */ - public limit: (number|Long|string); - - /** RunFunnelReportRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunFunnelReportRequest returnPropertyQuota. */ - public returnPropertyQuota: boolean; - - /** - * Creates a new RunFunnelReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunFunnelReportRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportRequest): google.analytics.data.v1alpha.RunFunnelReportRequest; - - /** - * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. - * @param message RunFunnelReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. - * @param message RunFunnelReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunFunnelReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunFunnelReportRequest; - - /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunFunnelReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunFunnelReportRequest; - - /** - * Verifies a RunFunnelReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunFunnelReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportRequest; - - /** - * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. - * @param message RunFunnelReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunFunnelReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunFunnelReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RunFunnelReportRequest { - - /** FunnelVisualizationType enum. */ - enum FunnelVisualizationType { - FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED = 0, - STANDARD_FUNNEL = 1, - TRENDED_FUNNEL = 2 - } - } - - /** Properties of a RunFunnelReportResponse. */ - interface IRunFunnelReportResponse { - - /** RunFunnelReportResponse funnelTable */ - funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); - - /** RunFunnelReportResponse funnelVisualization */ - funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); - - /** RunFunnelReportResponse propertyQuota */ - propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** RunFunnelReportResponse kind */ - kind?: (string|null); - } - - /** Represents a RunFunnelReportResponse. */ - class RunFunnelReportResponse implements IRunFunnelReportResponse { - - /** - * Constructs a new RunFunnelReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse); - - /** RunFunnelReportResponse funnelTable. */ - public funnelTable?: (google.analytics.data.v1alpha.IFunnelSubReport|null); - - /** RunFunnelReportResponse funnelVisualization. */ - public funnelVisualization?: (google.analytics.data.v1alpha.IFunnelSubReport|null); - - /** RunFunnelReportResponse propertyQuota. */ - public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** RunFunnelReportResponse kind. */ - public kind: string; - - /** - * Creates a new RunFunnelReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunFunnelReportResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRunFunnelReportResponse): google.analytics.data.v1alpha.RunFunnelReportResponse; - - /** - * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. - * @param message RunFunnelReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. - * @param message RunFunnelReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRunFunnelReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunFunnelReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunFunnelReportResponse; - - /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunFunnelReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunFunnelReportResponse; - - /** - * Verifies a RunFunnelReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunFunnelReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunFunnelReportResponse; - - /** - * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. - * @param message RunFunnelReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.RunFunnelReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunFunnelReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunFunnelReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReportTask. */ - interface IReportTask { - - /** ReportTask name */ - name?: (string|null); - - /** ReportTask reportDefinition */ - reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); - - /** ReportTask reportMetadata */ - reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); - } - - /** Represents a ReportTask. */ - class ReportTask implements IReportTask { - - /** - * Constructs a new ReportTask. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IReportTask); - - /** ReportTask name. */ - public name: string; - - /** ReportTask reportDefinition. */ - public reportDefinition?: (google.analytics.data.v1alpha.ReportTask.IReportDefinition|null); - - /** ReportTask reportMetadata. */ - public reportMetadata?: (google.analytics.data.v1alpha.ReportTask.IReportMetadata|null); - - /** - * Creates a new ReportTask instance using the specified properties. - * @param [properties] Properties to set - * @returns ReportTask instance - */ - public static create(properties?: google.analytics.data.v1alpha.IReportTask): google.analytics.data.v1alpha.ReportTask; - - /** - * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @param message ReportTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @param message ReportTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReportTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask; - - /** - * Decodes a ReportTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask; - - /** - * Verifies a ReportTask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReportTask - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask; - - /** - * Creates a plain object from a ReportTask message. Also converts values to other types if specified. - * @param message ReportTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ReportTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReportTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReportTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReportTask { - - /** Properties of a ReportDefinition. */ - interface IReportDefinition { - - /** ReportDefinition dimensions */ - dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); - - /** ReportDefinition metrics */ - metrics?: (google.analytics.data.v1alpha.IMetric[]|null); - - /** ReportDefinition dateRanges */ - dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); - - /** ReportDefinition dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** ReportDefinition metricFilter */ - metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** ReportDefinition offset */ - offset?: (number|Long|string|null); - - /** ReportDefinition limit */ - limit?: (number|Long|string|null); - - /** ReportDefinition metricAggregations */ - metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); - - /** ReportDefinition orderBys */ - orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); - - /** ReportDefinition currencyCode */ - currencyCode?: (string|null); - - /** ReportDefinition cohortSpec */ - cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); - - /** ReportDefinition keepEmptyRows */ - keepEmptyRows?: (boolean|null); - - /** ReportDefinition samplingLevel */ - samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); - } - - /** Represents a ReportDefinition. */ - class ReportDefinition implements IReportDefinition { - - /** - * Constructs a new ReportDefinition. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition); - - /** ReportDefinition dimensions. */ - public dimensions: google.analytics.data.v1alpha.IDimension[]; - - /** ReportDefinition metrics. */ - public metrics: google.analytics.data.v1alpha.IMetric[]; - - /** ReportDefinition dateRanges. */ - public dateRanges: google.analytics.data.v1alpha.IDateRange[]; - - /** ReportDefinition dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** ReportDefinition metricFilter. */ - public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** ReportDefinition offset. */ - public offset: (number|Long|string); - - /** ReportDefinition limit. */ - public limit: (number|Long|string); - - /** ReportDefinition metricAggregations. */ - public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; - - /** ReportDefinition orderBys. */ - public orderBys: google.analytics.data.v1alpha.IOrderBy[]; - - /** ReportDefinition currencyCode. */ - public currencyCode: string; - - /** ReportDefinition cohortSpec. */ - public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); - - /** ReportDefinition keepEmptyRows. */ - public keepEmptyRows: boolean; - - /** ReportDefinition samplingLevel. */ - public samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null); - - /** - * Creates a new ReportDefinition instance using the specified properties. - * @param [properties] Properties to set - * @returns ReportDefinition instance - */ - public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportDefinition): google.analytics.data.v1alpha.ReportTask.ReportDefinition; - - /** - * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. - * @param message ReportDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. - * @param message ReportDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReportDefinition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask.ReportDefinition; - - /** - * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask.ReportDefinition; - - /** - * Verifies a ReportDefinition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReportDefinition - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportDefinition; - - /** - * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. - * @param message ReportDefinition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReportDefinition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReportDefinition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReportMetadata. */ - interface IReportMetadata { - - /** ReportMetadata state */ - state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); - - /** ReportMetadata beginCreatingTime */ - beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** ReportMetadata creationQuotaTokensCharged */ - creationQuotaTokensCharged?: (number|null); - - /** ReportMetadata taskRowCount */ - taskRowCount?: (number|null); - - /** ReportMetadata errorMessage */ - errorMessage?: (string|null); - - /** ReportMetadata totalRowCount */ - totalRowCount?: (number|null); - } - - /** Represents a ReportMetadata. */ - class ReportMetadata implements IReportMetadata { - - /** - * Constructs a new ReportMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata); - - /** ReportMetadata state. */ - public state?: (google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|keyof typeof google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null); - - /** ReportMetadata beginCreatingTime. */ - public beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** ReportMetadata creationQuotaTokensCharged. */ - public creationQuotaTokensCharged: number; - - /** ReportMetadata taskRowCount. */ - public taskRowCount?: (number|null); - - /** ReportMetadata errorMessage. */ - public errorMessage?: (string|null); - - /** ReportMetadata totalRowCount. */ - public totalRowCount?: (number|null); - - /** - * Creates a new ReportMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ReportMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.ReportTask.IReportMetadata): google.analytics.data.v1alpha.ReportTask.ReportMetadata; - - /** - * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. - * @param message ReportMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. - * @param message ReportMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ReportTask.IReportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReportMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTask.ReportMetadata; - - /** - * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTask.ReportMetadata; - - /** - * Verifies a ReportMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReportMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTask.ReportMetadata; - - /** - * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. - * @param message ReportMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ReportTask.ReportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReportMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReportMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReportMetadata { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - FAILED = 3 - } - } - } - - /** Properties of a CreateReportTaskRequest. */ - interface ICreateReportTaskRequest { - - /** CreateReportTaskRequest parent */ - parent?: (string|null); - - /** CreateReportTaskRequest reportTask */ - reportTask?: (google.analytics.data.v1alpha.IReportTask|null); - } - - /** Represents a CreateReportTaskRequest. */ - class CreateReportTaskRequest implements ICreateReportTaskRequest { - - /** - * Constructs a new CreateReportTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest); - - /** CreateReportTaskRequest parent. */ - public parent: string; - - /** CreateReportTaskRequest reportTask. */ - public reportTask?: (google.analytics.data.v1alpha.IReportTask|null); - - /** - * Creates a new CreateReportTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateReportTaskRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICreateReportTaskRequest): google.analytics.data.v1alpha.CreateReportTaskRequest; - - /** - * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. - * @param message CreateReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. - * @param message CreateReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICreateReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateReportTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CreateReportTaskRequest; - - /** - * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CreateReportTaskRequest; - - /** - * Verifies a CreateReportTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateReportTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CreateReportTaskRequest; - - /** - * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. - * @param message CreateReportTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CreateReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateReportTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateReportTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReportTaskMetadata. */ - interface IReportTaskMetadata { - } - - /** Represents a ReportTaskMetadata. */ - class ReportTaskMetadata implements IReportTaskMetadata { - - /** - * Constructs a new ReportTaskMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IReportTaskMetadata); - - /** - * Creates a new ReportTaskMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ReportTaskMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IReportTaskMetadata): google.analytics.data.v1alpha.ReportTaskMetadata; - - /** - * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. - * @param message ReportTaskMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. - * @param message ReportTaskMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IReportTaskMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReportTaskMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReportTaskMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ReportTaskMetadata; - - /** - * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReportTaskMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ReportTaskMetadata; - - /** - * Verifies a ReportTaskMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReportTaskMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ReportTaskMetadata; - - /** - * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. - * @param message ReportTaskMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ReportTaskMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReportTaskMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReportTaskMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryReportTaskRequest. */ - interface IQueryReportTaskRequest { - - /** QueryReportTaskRequest name */ - name?: (string|null); - - /** QueryReportTaskRequest offset */ - offset?: (number|Long|string|null); - - /** QueryReportTaskRequest limit */ - limit?: (number|Long|string|null); - } - - /** Represents a QueryReportTaskRequest. */ - class QueryReportTaskRequest implements IQueryReportTaskRequest { - - /** - * Constructs a new QueryReportTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest); - - /** QueryReportTaskRequest name. */ - public name: string; - - /** QueryReportTaskRequest offset. */ - public offset: (number|Long|string); - - /** QueryReportTaskRequest limit. */ - public limit: (number|Long|string); - - /** - * Creates a new QueryReportTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryReportTaskRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskRequest): google.analytics.data.v1alpha.QueryReportTaskRequest; - - /** - * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. - * @param message QueryReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. - * @param message QueryReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryReportTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryReportTaskRequest; - - /** - * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryReportTaskRequest; - - /** - * Verifies a QueryReportTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryReportTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskRequest; - - /** - * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. - * @param message QueryReportTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryReportTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryReportTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryReportTaskResponse. */ - interface IQueryReportTaskResponse { - - /** QueryReportTaskResponse dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); - - /** QueryReportTaskResponse metricHeaders */ - metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); - - /** QueryReportTaskResponse rows */ - rows?: (google.analytics.data.v1alpha.IRow[]|null); - - /** QueryReportTaskResponse totals */ - totals?: (google.analytics.data.v1alpha.IRow[]|null); - - /** QueryReportTaskResponse maximums */ - maximums?: (google.analytics.data.v1alpha.IRow[]|null); - - /** QueryReportTaskResponse minimums */ - minimums?: (google.analytics.data.v1alpha.IRow[]|null); - - /** QueryReportTaskResponse rowCount */ - rowCount?: (number|null); - - /** QueryReportTaskResponse metadata */ - metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); - } - - /** Represents a QueryReportTaskResponse. */ - class QueryReportTaskResponse implements IQueryReportTaskResponse { - - /** - * Constructs a new QueryReportTaskResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse); - - /** QueryReportTaskResponse dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; - - /** QueryReportTaskResponse metricHeaders. */ - public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; - - /** QueryReportTaskResponse rows. */ - public rows: google.analytics.data.v1alpha.IRow[]; - - /** QueryReportTaskResponse totals. */ - public totals: google.analytics.data.v1alpha.IRow[]; - - /** QueryReportTaskResponse maximums. */ - public maximums: google.analytics.data.v1alpha.IRow[]; - - /** QueryReportTaskResponse minimums. */ - public minimums: google.analytics.data.v1alpha.IRow[]; - - /** QueryReportTaskResponse rowCount. */ - public rowCount: number; - - /** QueryReportTaskResponse metadata. */ - public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); - - /** - * Creates a new QueryReportTaskResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryReportTaskResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IQueryReportTaskResponse): google.analytics.data.v1alpha.QueryReportTaskResponse; - - /** - * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. - * @param message QueryReportTaskResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. - * @param message QueryReportTaskResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQueryReportTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryReportTaskResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryReportTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QueryReportTaskResponse; - - /** - * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryReportTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QueryReportTaskResponse; - - /** - * Verifies a QueryReportTaskResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryReportTaskResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QueryReportTaskResponse; - - /** - * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. - * @param message QueryReportTaskResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.QueryReportTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryReportTaskResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryReportTaskResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetReportTaskRequest. */ - interface IGetReportTaskRequest { - - /** GetReportTaskRequest name */ - name?: (string|null); - } - - /** Represents a GetReportTaskRequest. */ - class GetReportTaskRequest implements IGetReportTaskRequest { - - /** - * Constructs a new GetReportTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest); - - /** GetReportTaskRequest name. */ - public name: string; - - /** - * Creates a new GetReportTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetReportTaskRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IGetReportTaskRequest): google.analytics.data.v1alpha.GetReportTaskRequest; - - /** - * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. - * @param message GetReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. - * @param message GetReportTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IGetReportTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetReportTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetReportTaskRequest; - - /** - * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetReportTaskRequest; - - /** - * Verifies a GetReportTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetReportTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetReportTaskRequest; - - /** - * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. - * @param message GetReportTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.GetReportTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetReportTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetReportTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListReportTasksRequest. */ - interface IListReportTasksRequest { - - /** ListReportTasksRequest parent */ - parent?: (string|null); - - /** ListReportTasksRequest pageSize */ - pageSize?: (number|null); - - /** ListReportTasksRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListReportTasksRequest. */ - class ListReportTasksRequest implements IListReportTasksRequest { - - /** - * Constructs a new ListReportTasksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListReportTasksRequest); - - /** ListReportTasksRequest parent. */ - public parent: string; - - /** ListReportTasksRequest pageSize. */ - public pageSize: number; - - /** ListReportTasksRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListReportTasksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListReportTasksRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListReportTasksRequest): google.analytics.data.v1alpha.ListReportTasksRequest; - - /** - * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. - * @param message ListReportTasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. - * @param message ListReportTasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListReportTasksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListReportTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListReportTasksRequest; - - /** - * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListReportTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListReportTasksRequest; - - /** - * Verifies a ListReportTasksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListReportTasksRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksRequest; - - /** - * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. - * @param message ListReportTasksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListReportTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListReportTasksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListReportTasksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListReportTasksResponse. */ - interface IListReportTasksResponse { - - /** ListReportTasksResponse reportTasks */ - reportTasks?: (google.analytics.data.v1alpha.IReportTask[]|null); - - /** ListReportTasksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListReportTasksResponse. */ - class ListReportTasksResponse implements IListReportTasksResponse { - - /** - * Constructs a new ListReportTasksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IListReportTasksResponse); - - /** ListReportTasksResponse reportTasks. */ - public reportTasks: google.analytics.data.v1alpha.IReportTask[]; - - /** ListReportTasksResponse nextPageToken. */ - public nextPageToken?: (string|null); - - /** - * Creates a new ListReportTasksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListReportTasksResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IListReportTasksResponse): google.analytics.data.v1alpha.ListReportTasksResponse; - - /** - * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. - * @param message ListReportTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. - * @param message ListReportTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IListReportTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListReportTasksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListReportTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ListReportTasksResponse; - - /** - * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListReportTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ListReportTasksResponse; - - /** - * Verifies a ListReportTasksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListReportTasksResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ListReportTasksResponse; - - /** - * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. - * @param message ListReportTasksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ListReportTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListReportTasksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListReportTasksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunReportRequest. */ - interface IRunReportRequest { - - /** RunReportRequest property */ - property?: (string|null); - - /** RunReportRequest dimensions */ - dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); - - /** RunReportRequest metrics */ - metrics?: (google.analytics.data.v1alpha.IMetric[]|null); - - /** RunReportRequest dateRanges */ - dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); - - /** RunReportRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunReportRequest metricFilter */ - metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunReportRequest offset */ - offset?: (number|Long|string|null); - - /** RunReportRequest limit */ - limit?: (number|Long|string|null); - - /** RunReportRequest metricAggregations */ - metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); - - /** RunReportRequest orderBys */ - orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); - - /** RunReportRequest currencyCode */ - currencyCode?: (string|null); - - /** RunReportRequest cohortSpec */ - cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); - - /** RunReportRequest keepEmptyRows */ - keepEmptyRows?: (boolean|null); - - /** RunReportRequest returnPropertyQuota */ - returnPropertyQuota?: (boolean|null); - - /** RunReportRequest comparisons */ - comparisons?: (google.analytics.data.v1alpha.IComparison[]|null); - - /** RunReportRequest conversionSpec */ - conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); - } - - /** Represents a RunReportRequest. */ - class RunReportRequest implements IRunReportRequest { - - /** - * Constructs a new RunReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRunReportRequest); - - /** RunReportRequest property. */ - public property: string; - - /** RunReportRequest dimensions. */ - public dimensions: google.analytics.data.v1alpha.IDimension[]; - - /** RunReportRequest metrics. */ - public metrics: google.analytics.data.v1alpha.IMetric[]; - - /** RunReportRequest dateRanges. */ - public dateRanges: google.analytics.data.v1alpha.IDateRange[]; - - /** RunReportRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunReportRequest metricFilter. */ - public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** RunReportRequest offset. */ - public offset: (number|Long|string); - - /** RunReportRequest limit. */ - public limit: (number|Long|string); - - /** RunReportRequest metricAggregations. */ - public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; - - /** RunReportRequest orderBys. */ - public orderBys: google.analytics.data.v1alpha.IOrderBy[]; - - /** RunReportRequest currencyCode. */ - public currencyCode: string; - - /** RunReportRequest cohortSpec. */ - public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); - - /** RunReportRequest keepEmptyRows. */ - public keepEmptyRows: boolean; - - /** RunReportRequest returnPropertyQuota. */ - public returnPropertyQuota: boolean; - - /** RunReportRequest comparisons. */ - public comparisons: google.analytics.data.v1alpha.IComparison[]; - - /** RunReportRequest conversionSpec. */ - public conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); - - /** - * Creates a new RunReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunReportRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRunReportRequest): google.analytics.data.v1alpha.RunReportRequest; - - /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportRequest; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportRequest; - - /** - * Verifies a RunReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportRequest; - - /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. - * @param message RunReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunReportResponse. */ - interface IRunReportResponse { - - /** RunReportResponse dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); - - /** RunReportResponse metricHeaders */ - metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); - - /** RunReportResponse rows */ - rows?: (google.analytics.data.v1alpha.IRow[]|null); - - /** RunReportResponse totals */ - totals?: (google.analytics.data.v1alpha.IRow[]|null); - - /** RunReportResponse maximums */ - maximums?: (google.analytics.data.v1alpha.IRow[]|null); - - /** RunReportResponse minimums */ - minimums?: (google.analytics.data.v1alpha.IRow[]|null); - - /** RunReportResponse rowCount */ - rowCount?: (number|null); - - /** RunReportResponse metadata */ - metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); - - /** RunReportResponse propertyQuota */ - propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** RunReportResponse kind */ - kind?: (string|null); - - /** RunReportResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a RunReportResponse. */ - class RunReportResponse implements IRunReportResponse { - - /** - * Constructs a new RunReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRunReportResponse); - - /** RunReportResponse dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; - - /** RunReportResponse metricHeaders. */ - public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; - - /** RunReportResponse rows. */ - public rows: google.analytics.data.v1alpha.IRow[]; - - /** RunReportResponse totals. */ - public totals: google.analytics.data.v1alpha.IRow[]; - - /** RunReportResponse maximums. */ - public maximums: google.analytics.data.v1alpha.IRow[]; - - /** RunReportResponse minimums. */ - public minimums: google.analytics.data.v1alpha.IRow[]; - - /** RunReportResponse rowCount. */ - public rowCount: number; - - /** RunReportResponse metadata. */ - public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); - - /** RunReportResponse propertyQuota. */ - public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); - - /** RunReportResponse kind. */ - public kind: string; - - /** RunReportResponse nextPageToken. */ - public nextPageToken?: (string|null); - - /** - * Creates a new RunReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunReportResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRunReportResponse): google.analytics.data.v1alpha.RunReportResponse; - - /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportResponse; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportResponse; - - /** - * Verifies a RunReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportResponse; - - /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. - * @param message RunReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMetadataRequest. */ - interface IGetMetadataRequest { - - /** GetMetadataRequest name */ - name?: (string|null); - } - - /** Represents a GetMetadataRequest. */ - class GetMetadataRequest implements IGetMetadataRequest { - - /** - * Constructs a new GetMetadataRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IGetMetadataRequest); - - /** GetMetadataRequest name. */ - public name: string; - - /** - * Creates a new GetMetadataRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMetadataRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.IGetMetadataRequest): google.analytics.data.v1alpha.GetMetadataRequest; - - /** - * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. - * @param message GetMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. - * @param message GetMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetMetadataRequest; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetMetadataRequest; - - /** - * Verifies a GetMetadataRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMetadataRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetMetadataRequest; - - /** - * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. - * @param message GetMetadataRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMetadataRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMetadataRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata name */ - name?: (string|null); - - /** Metadata dimensions */ - dimensions?: (google.analytics.data.v1alpha.IDimensionMetadata[]|null); - - /** Metadata metrics */ - metrics?: (google.analytics.data.v1alpha.IMetricMetadata[]|null); - - /** Metadata comparisons */ - comparisons?: (google.analytics.data.v1alpha.IComparisonMetadata[]|null); - - /** Metadata conversions */ - conversions?: (google.analytics.data.v1alpha.IConversionMetadata[]|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetadata); - - /** Metadata name. */ - public name: string; - - /** Metadata dimensions. */ - public dimensions: google.analytics.data.v1alpha.IDimensionMetadata[]; - - /** Metadata metrics. */ - public metrics: google.analytics.data.v1alpha.IMetricMetadata[]; - - /** Metadata comparisons. */ - public comparisons: google.analytics.data.v1alpha.IComparisonMetadata[]; - - /** Metadata conversions. */ - public conversions: google.analytics.data.v1alpha.IConversionMetadata[]; - - /** - * Creates a new Metadata instance using the specified properties. - * @param [properties] Properties to set - * @returns Metadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IMetadata): google.analytics.data.v1alpha.Metadata; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DateRange. */ - interface IDateRange { - - /** DateRange startDate */ - startDate?: (string|null); - - /** DateRange endDate */ - endDate?: (string|null); - - /** DateRange name */ - name?: (string|null); - } - - /** Represents a DateRange. */ - class DateRange implements IDateRange { - - /** - * Constructs a new DateRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDateRange); - - /** DateRange startDate. */ - public startDate: string; - - /** DateRange endDate. */ - public endDate: string; - - /** DateRange name. */ - public name: string; - - /** - * Creates a new DateRange instance using the specified properties. - * @param [properties] Properties to set - * @returns DateRange instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; - - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DateRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DateRange; - - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DateRange; - - /** - * Verifies a DateRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DateRange - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; - - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @param message DateRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DateRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DateRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Dimension. */ - interface IDimension { - - /** Dimension name */ - name?: (string|null); - - /** Dimension dimensionExpression */ - dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); - } - - /** Represents a Dimension. */ - class Dimension implements IDimension { - - /** - * Constructs a new Dimension. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDimension); - - /** Dimension name. */ - public name: string; - - /** Dimension dimensionExpression. */ - public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); - - /** - * Creates a new Dimension instance using the specified properties. - * @param [properties] Properties to set - * @returns Dimension instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; - - /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Dimension message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Dimension; - - /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Dimension; - - /** - * Verifies a Dimension message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dimension - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; - - /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @param message Dimension - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Dimension to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Dimension - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionExpression. */ - interface IDimensionExpression { - - /** DimensionExpression lowerCase */ - lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase */ - upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression concatenate */ - concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); - } - - /** Represents a DimensionExpression. */ - class DimensionExpression implements IDimensionExpression { - - /** - * Constructs a new DimensionExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); - - /** DimensionExpression lowerCase. */ - public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase. */ - public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression concatenate. */ - public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); - - /** DimensionExpression oneExpression. */ - public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); - - /** - * Creates a new DimensionExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; - - /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression; - - /** - * Verifies a DimensionExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; - - /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. - * @param message DimensionExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DimensionExpression { - - /** Properties of a CaseExpression. */ - interface ICaseExpression { - - /** CaseExpression dimensionName */ - dimensionName?: (string|null); - } - - /** Represents a CaseExpression. */ - class CaseExpression implements ICaseExpression { - - /** - * Constructs a new CaseExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); - - /** CaseExpression dimensionName. */ - public dimensionName: string; - - /** - * Creates a new CaseExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns CaseExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - - /** - * Verifies a CaseExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CaseExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @param message CaseExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CaseExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CaseExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConcatenateExpression. */ - interface IConcatenateExpression { - - /** ConcatenateExpression dimensionNames */ - dimensionNames?: (string[]|null); - - /** ConcatenateExpression delimiter */ - delimiter?: (string|null); - } - - /** Represents a ConcatenateExpression. */ - class ConcatenateExpression implements IConcatenateExpression { - - /** - * Constructs a new ConcatenateExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); - - /** ConcatenateExpression dimensionNames. */ - public dimensionNames: string[]; - - /** ConcatenateExpression delimiter. */ - public delimiter: string; - - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns ConcatenateExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - - /** - * Verifies a ConcatenateExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConcatenateExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @param message ConcatenateExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConcatenateExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConcatenateExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric expression */ - expression?: (string|null); - - /** Metric invisible */ - invisible?: (boolean|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetric); - - /** Metric name. */ - public name: string; - - /** Metric expression. */ - public expression: string; - - /** Metric invisible. */ - public invisible: boolean; - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metric; - - /** - * Verifies a Metric message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Comparison. */ - interface IComparison { - - /** Comparison name */ - name?: (string|null); - - /** Comparison dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** Comparison comparison */ - comparison?: (string|null); - } - - /** Represents a Comparison. */ - class Comparison implements IComparison { - - /** - * Constructs a new Comparison. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IComparison); - - /** Comparison name. */ - public name?: (string|null); - - /** Comparison dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** Comparison comparison. */ - public comparison?: (string|null); - - /** Comparison oneComparison. */ - public oneComparison?: ("dimensionFilter"|"comparison"); - - /** - * Creates a new Comparison instance using the specified properties. - * @param [properties] Properties to set - * @returns Comparison instance - */ - public static create(properties?: google.analytics.data.v1alpha.IComparison): google.analytics.data.v1alpha.Comparison; - - /** - * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. - * @param message Comparison message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. - * @param message Comparison message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Comparison message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Comparison; - - /** - * Decodes a Comparison message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Comparison; - - /** - * Verifies a Comparison message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Comparison message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Comparison - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Comparison; - - /** - * Creates a plain object from a Comparison message. Also converts values to other types if specified. - * @param message Comparison - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Comparison to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Comparison - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FilterExpression. */ - interface IFilterExpression { - - /** FilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** FilterExpression filter */ - filter?: (google.analytics.data.v1alpha.IFilter|null); - } - - /** Represents a FilterExpression. */ - class FilterExpression implements IFilterExpression { - - /** - * Constructs a new FilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); - - /** FilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); - - /** FilterExpression filter. */ - public filter?: (google.analytics.data.v1alpha.IFilter|null); - - /** FilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); - - /** - * Creates a new FilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; - - /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpression; - - /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpression; - - /** - * Verifies a FilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; - - /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. - * @param message FilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FilterExpressionList. */ - interface IFilterExpressionList { - - /** FilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); - } - - /** Represents a FilterExpressionList. */ - class FilterExpressionList implements IFilterExpressionList { - - /** - * Constructs a new FilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); - - /** FilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFilterExpression[]; - - /** - * Creates a new FilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; - - /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpressionList; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpressionList; - - /** - * Verifies a FilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; - - /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. - * @param message FilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter fieldName */ - fieldName?: (string|null); - - /** Filter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** Filter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** Filter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** Filter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** Filter emptyFilter */ - emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFilter); - - /** Filter fieldName. */ - public fieldName: string; - - /** Filter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** Filter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** Filter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** Filter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** Filter emptyFilter. */ - public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); - - /** Filter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringFilter. */ - interface IStringFilter { - - /** StringFilter matchType */ - matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); - - /** StringFilter value */ - value?: (string|null); - - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); - } - - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { - - /** - * Constructs a new StringFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IStringFilter); - - /** StringFilter matchType. */ - public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); - - /** StringFilter value. */ - public value: string; - - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; - - /** - * Creates a new StringFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.StringFilter; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.StringFilter; - - /** - * Verifies a StringFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StringFilter { - - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - BEGINS_WITH = 2, - ENDS_WITH = 3, - CONTAINS = 4, - FULL_REGEXP = 5, - PARTIAL_REGEXP = 6 - } - } - - /** Properties of an InListFilter. */ - interface IInListFilter { - - /** InListFilter values */ - values?: (string[]|null); - - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); - } - - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { - - /** - * Constructs a new InListFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IInListFilter); - - /** InListFilter values. */ - public values: string[]; - - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; - - /** - * Creates a new InListFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InListFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; - - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.InListFilter; - - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.InListFilter; - - /** - * Verifies an InListFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InListFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; - - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InListFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InListFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NumericFilter. */ - interface INumericFilter { - - /** NumericFilter operation */ - operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); - - /** NumericFilter value */ - value?: (google.analytics.data.v1alpha.INumericValue|null); - } - - /** Represents a NumericFilter. */ - class NumericFilter implements INumericFilter { - - /** - * Constructs a new NumericFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.INumericFilter); - - /** NumericFilter operation. */ - public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); - - /** NumericFilter value. */ - public value?: (google.analytics.data.v1alpha.INumericValue|null); - - /** - * Creates a new NumericFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; - - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericFilter; - - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericFilter; - - /** - * Verifies a NumericFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @param message NumericFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NumericFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NumericFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NumericFilter { - - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - EQUAL = 1, - LESS_THAN = 2, - LESS_THAN_OR_EQUAL = 3, - GREATER_THAN = 4, - GREATER_THAN_OR_EQUAL = 5 - } - } - - /** Properties of an OrderBy. */ - interface IOrderBy { - - /** OrderBy metric */ - metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension */ - dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); - - /** OrderBy desc */ - desc?: (boolean|null); - } - - /** Represents an OrderBy. */ - class OrderBy implements IOrderBy { - - /** - * Constructs a new OrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IOrderBy); - - /** OrderBy metric. */ - public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension. */ - public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); - - /** OrderBy desc. */ - public desc: boolean; - - /** OrderBy oneOrderBy. */ - public oneOrderBy?: ("metric"|"dimension"); - - /** - * Creates a new OrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns OrderBy instance - */ - public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; - - /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy; - - /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy; - - /** - * Verifies an OrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; - - /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. - * @param message OrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OrderBy { - - /** Properties of a MetricOrderBy. */ - interface IMetricOrderBy { - - /** MetricOrderBy metricName */ - metricName?: (string|null); - } - - /** Represents a MetricOrderBy. */ - class MetricOrderBy implements IMetricOrderBy { - - /** - * Constructs a new MetricOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); - - /** MetricOrderBy metricName. */ - public metricName: string; - - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricOrderBy instance - */ - public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; - - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; - - /** - * Verifies a MetricOrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; - - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @param message MetricOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricOrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionOrderBy. */ - interface IDimensionOrderBy { - - /** DimensionOrderBy dimensionName */ - dimensionName?: (string|null); - - /** DimensionOrderBy orderType */ - orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); - } - - /** Represents a DimensionOrderBy. */ - class DimensionOrderBy implements IDimensionOrderBy { - - /** - * Constructs a new DimensionOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); - - /** DimensionOrderBy dimensionName. */ - public dimensionName: string; - - /** DimensionOrderBy orderType. */ - public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); - - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionOrderBy instance - */ - public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; - - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; - - /** - * Verifies a DimensionOrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; - - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @param message DimensionOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionOrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DimensionOrderBy { - - /** OrderType enum. */ - enum OrderType { - ORDER_TYPE_UNSPECIFIED = 0, - ALPHANUMERIC = 1, - CASE_INSENSITIVE_ALPHANUMERIC = 2, - NUMERIC = 3 - } - } - } - - /** Properties of a BetweenFilter. */ - interface IBetweenFilter { - - /** BetweenFilter fromValue */ - fromValue?: (google.analytics.data.v1alpha.INumericValue|null); - - /** BetweenFilter toValue */ - toValue?: (google.analytics.data.v1alpha.INumericValue|null); - } - - /** Represents a BetweenFilter. */ - class BetweenFilter implements IBetweenFilter { - - /** - * Constructs a new BetweenFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); - - /** BetweenFilter fromValue. */ - public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); - - /** BetweenFilter toValue. */ - public toValue?: (google.analytics.data.v1alpha.INumericValue|null); - - /** - * Creates a new BetweenFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns BetweenFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; - - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.BetweenFilter; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.BetweenFilter; - - /** - * Verifies a BetweenFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BetweenFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; - - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @param message BetweenFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BetweenFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BetweenFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EmptyFilter. */ - interface IEmptyFilter { - } - - /** Represents an EmptyFilter. */ - class EmptyFilter implements IEmptyFilter { - - /** - * Constructs a new EmptyFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); - - /** - * Creates a new EmptyFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns EmptyFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; - - /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EmptyFilter; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EmptyFilter; - - /** - * Verifies an EmptyFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EmptyFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; - - /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. - * @param message EmptyFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EmptyFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EmptyFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NumericValue. */ - interface INumericValue { - - /** NumericValue int64Value */ - int64Value?: (number|Long|string|null); - - /** NumericValue doubleValue */ - doubleValue?: (number|null); - } - - /** Represents a NumericValue. */ - class NumericValue implements INumericValue { - - /** - * Constructs a new NumericValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.INumericValue); - - /** NumericValue int64Value. */ - public int64Value?: (number|Long|string|null); - - /** NumericValue doubleValue. */ - public doubleValue?: (number|null); - - /** NumericValue oneValue. */ - public oneValue?: ("int64Value"|"doubleValue"); - - /** - * Creates a new NumericValue instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericValue instance - */ - public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; - - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericValue; - - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericValue; - - /** - * Verifies a NumericValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; - - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @param message NumericValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NumericValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NumericValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CohortSpec. */ - interface ICohortSpec { - - /** CohortSpec cohorts */ - cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); - - /** CohortSpec cohortsRange */ - cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); - - /** CohortSpec cohortReportSettings */ - cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); - } - - /** Represents a CohortSpec. */ - class CohortSpec implements ICohortSpec { - - /** - * Constructs a new CohortSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); - - /** CohortSpec cohorts. */ - public cohorts: google.analytics.data.v1alpha.ICohort[]; - - /** CohortSpec cohortsRange. */ - public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); - - /** CohortSpec cohortReportSettings. */ - public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); - - /** - * Creates a new CohortSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortSpec instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; - - /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortSpec; - - /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortSpec; - - /** - * Verifies a CohortSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortSpec - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; - - /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. - * @param message CohortSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cohort. */ - interface ICohort { - - /** Cohort name */ - name?: (string|null); - - /** Cohort dimension */ - dimension?: (string|null); - - /** Cohort dateRange */ - dateRange?: (google.analytics.data.v1alpha.IDateRange|null); - } - - /** Represents a Cohort. */ - class Cohort implements ICohort { - - /** - * Constructs a new Cohort. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICohort); - - /** Cohort name. */ - public name: string; - - /** Cohort dimension. */ - public dimension: string; - - /** Cohort dateRange. */ - public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); - - /** - * Creates a new Cohort instance using the specified properties. - * @param [properties] Properties to set - * @returns Cohort instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; - - /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cohort message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Cohort; - - /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Cohort; - - /** - * Verifies a Cohort message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cohort - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; - - /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. - * @param message Cohort - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cohort to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cohort - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CohortsRange. */ - interface ICohortsRange { - - /** CohortsRange granularity */ - granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); - - /** CohortsRange startOffset */ - startOffset?: (number|null); - - /** CohortsRange endOffset */ - endOffset?: (number|null); - } - - /** Represents a CohortsRange. */ - class CohortsRange implements ICohortsRange { - - /** - * Constructs a new CohortsRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); - - /** CohortsRange granularity. */ - public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); - - /** CohortsRange startOffset. */ - public startOffset: number; - - /** CohortsRange endOffset. */ - public endOffset: number; - - /** - * Creates a new CohortsRange instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortsRange instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; - - /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortsRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortsRange; - - /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortsRange; - - /** - * Verifies a CohortsRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortsRange - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; - - /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. - * @param message CohortsRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortsRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortsRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CohortsRange { - - /** Granularity enum. */ - enum Granularity { - GRANULARITY_UNSPECIFIED = 0, - DAILY = 1, - WEEKLY = 2, - MONTHLY = 3 - } - } - - /** Properties of a CohortReportSettings. */ - interface ICohortReportSettings { - - /** CohortReportSettings accumulate */ - accumulate?: (boolean|null); - } - - /** Represents a CohortReportSettings. */ - class CohortReportSettings implements ICohortReportSettings { - - /** - * Constructs a new CohortReportSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); - - /** CohortReportSettings accumulate. */ - public accumulate: boolean; - - /** - * Creates a new CohortReportSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortReportSettings instance - */ - public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; - - /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortReportSettings; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortReportSettings; - - /** - * Verifies a CohortReportSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortReportSettings - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; - - /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. - * @param message CohortReportSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortReportSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortReportSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Section enum. */ - enum Section { - SECTION_UNSPECIFIED = 0, - SECTION_REPORT = 1, - SECTION_ADVERTISING = 2 - } - - /** Properties of a ResponseMetaData. */ - interface IResponseMetaData { - - /** ResponseMetaData dataLossFromOtherRow */ - dataLossFromOtherRow?: (boolean|null); - - /** ResponseMetaData schemaRestrictionResponse */ - schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode */ - currencyCode?: (string|null); - - /** ResponseMetaData timeZone */ - timeZone?: (string|null); - - /** ResponseMetaData emptyReason */ - emptyReason?: (string|null); - - /** ResponseMetaData subjectToThresholding */ - subjectToThresholding?: (boolean|null); - - /** ResponseMetaData samplingMetadatas */ - samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); - - /** ResponseMetaData section */ - section?: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section|null); - } - - /** Represents a ResponseMetaData. */ - class ResponseMetaData implements IResponseMetaData { - - /** - * Constructs a new ResponseMetaData. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); - - /** ResponseMetaData dataLossFromOtherRow. */ - public dataLossFromOtherRow: boolean; - - /** ResponseMetaData schemaRestrictionResponse. */ - public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode. */ - public currencyCode?: (string|null); - - /** ResponseMetaData timeZone. */ - public timeZone?: (string|null); - - /** ResponseMetaData emptyReason. */ - public emptyReason?: (string|null); - - /** ResponseMetaData subjectToThresholding. */ - public subjectToThresholding?: (boolean|null); - - /** ResponseMetaData samplingMetadatas. */ - public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; - - /** ResponseMetaData section. */ - public section: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section); - - /** - * Creates a new ResponseMetaData instance using the specified properties. - * @param [properties] Properties to set - * @returns ResponseMetaData instance - */ - public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; - - /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData; - - /** - * Verifies a ResponseMetaData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseMetaData - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; - - /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. - * @param message ResponseMetaData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseMetaData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResponseMetaData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResponseMetaData { - - /** Properties of a SchemaRestrictionResponse. */ - interface ISchemaRestrictionResponse { - - /** SchemaRestrictionResponse activeMetricRestrictions */ - activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); - } - - /** Represents a SchemaRestrictionResponse. */ - class SchemaRestrictionResponse implements ISchemaRestrictionResponse { - - /** - * Constructs a new SchemaRestrictionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); - - /** SchemaRestrictionResponse activeMetricRestrictions. */ - public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; - - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaRestrictionResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Verifies a SchemaRestrictionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaRestrictionResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @param message SchemaRestrictionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaRestrictionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchemaRestrictionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SchemaRestrictionResponse { - - /** Properties of an ActiveMetricRestriction. */ - interface IActiveMetricRestriction { - - /** ActiveMetricRestriction metricName */ - metricName?: (string|null); - - /** ActiveMetricRestriction restrictedMetricTypes */ - restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); - } - - /** Represents an ActiveMetricRestriction. */ - class ActiveMetricRestriction implements IActiveMetricRestriction { - - /** - * Constructs a new ActiveMetricRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); - - /** ActiveMetricRestriction metricName. */ - public metricName?: (string|null); - - /** ActiveMetricRestriction restrictedMetricTypes. */ - public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; - - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns ActiveMetricRestriction instance - */ - public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Verifies an ActiveMetricRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActiveMetricRestriction - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @param message ActiveMetricRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActiveMetricRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActiveMetricRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a DimensionHeader. */ - interface IDimensionHeader { - - /** DimensionHeader name */ - name?: (string|null); - } - - /** Represents a DimensionHeader. */ - class DimensionHeader implements IDimensionHeader { - - /** - * Constructs a new DimensionHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); - - /** DimensionHeader name. */ - public name: string; - - /** - * Creates a new DimensionHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionHeader instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; - - /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionHeader; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionHeader; - - /** - * Verifies a DimensionHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; - - /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. - * @param message DimensionHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricHeader. */ - interface IMetricHeader { - - /** MetricHeader name */ - name?: (string|null); - - /** MetricHeader type */ - type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); - } - - /** Represents a MetricHeader. */ - class MetricHeader implements IMetricHeader { - - /** - * Constructs a new MetricHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); - - /** MetricHeader name. */ - public name: string; - - /** MetricHeader type. */ - public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); - - /** - * Creates a new MetricHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricHeader instance - */ - public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; - - /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricHeader; - - /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricHeader; - - /** - * Verifies a MetricHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; - - /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. - * @param message MetricHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Row. */ - interface IRow { - - /** Row dimensionValues */ - dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); - - /** Row metricValues */ - metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); - } - - /** Represents a Row. */ - class Row implements IRow { - - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IRow); - - /** Row dimensionValues. */ - public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; - - /** Row metricValues. */ - public metricValues: google.analytics.data.v1alpha.IMetricValue[]; - - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; - - /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Row; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Row; - - /** - * Verifies a Row message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Row - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionValue. */ - interface IDimensionValue { - - /** DimensionValue value */ - value?: (string|null); - } - - /** Represents a DimensionValue. */ - class DimensionValue implements IDimensionValue { - - /** - * Constructs a new DimensionValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); - - /** DimensionValue value. */ - public value?: (string|null); - - /** DimensionValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new DimensionValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionValue instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; - - /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionValue; - - /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionValue; - - /** - * Verifies a DimensionValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; - - /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. - * @param message DimensionValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricValue. */ - interface IMetricValue { - - /** MetricValue value */ - value?: (string|null); - } - - /** Represents a MetricValue. */ - class MetricValue implements IMetricValue { - - /** - * Constructs a new MetricValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetricValue); - - /** MetricValue value. */ - public value?: (string|null); - - /** MetricValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new MetricValue instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricValue instance - */ - public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; - - /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricValue; - - /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricValue; - - /** - * Verifies a MetricValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; - - /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. - * @param message MetricValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PropertyQuota. */ - interface IPropertyQuota { - - /** PropertyQuota tokensPerDay */ - tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour */ - tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota concurrentRequests */ - concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota serverErrorsPerProjectPerHour */ - serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota potentiallyThresholdedRequestsPerHour */ - potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerProjectPerHour */ - tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - } - - /** Represents a PropertyQuota. */ - class PropertyQuota implements IPropertyQuota { - - /** - * Constructs a new PropertyQuota. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); - - /** PropertyQuota tokensPerDay. */ - public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour. */ - public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota concurrentRequests. */ - public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota serverErrorsPerProjectPerHour. */ - public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ - public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerProjectPerHour. */ - public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** - * Creates a new PropertyQuota instance using the specified properties. - * @param [properties] Properties to set - * @returns PropertyQuota instance - */ - public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; - - /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuota; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuota; - - /** - * Verifies a PropertyQuota message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PropertyQuota - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; - - /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. - * @param message PropertyQuota - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PropertyQuota to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PropertyQuota - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QuotaStatus. */ - interface IQuotaStatus { - - /** QuotaStatus consumed */ - consumed?: (number|null); - - /** QuotaStatus remaining */ - remaining?: (number|null); - } - - /** Represents a QuotaStatus. */ - class QuotaStatus implements IQuotaStatus { - - /** - * Constructs a new QuotaStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); - - /** QuotaStatus consumed. */ - public consumed: number; - - /** QuotaStatus remaining. */ - public remaining: number; - - /** - * Creates a new QuotaStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns QuotaStatus instance - */ - public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; - - /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QuotaStatus; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QuotaStatus; - - /** - * Verifies a QuotaStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuotaStatus - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; - - /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. - * @param message QuotaStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuotaStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QuotaStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelBreakdown. */ - interface IFunnelBreakdown { - - /** FunnelBreakdown breakdownDimension */ - breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); - - /** FunnelBreakdown limit */ - limit?: (number|Long|string|null); - } - - /** Represents a FunnelBreakdown. */ - class FunnelBreakdown implements IFunnelBreakdown { - - /** - * Constructs a new FunnelBreakdown. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); - - /** FunnelBreakdown breakdownDimension. */ - public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); - - /** FunnelBreakdown limit. */ - public limit?: (number|Long|string|null); - - /** - * Creates a new FunnelBreakdown instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelBreakdown instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; - - /** - * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @param message FunnelBreakdown message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @param message FunnelBreakdown message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelBreakdown message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelBreakdown - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelBreakdown; - - /** - * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelBreakdown - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelBreakdown; - - /** - * Verifies a FunnelBreakdown message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelBreakdown - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; - - /** - * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. - * @param message FunnelBreakdown - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelBreakdown to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelBreakdown - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelNextAction. */ - interface IFunnelNextAction { - - /** FunnelNextAction nextActionDimension */ - nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); - - /** FunnelNextAction limit */ - limit?: (number|Long|string|null); - } - - /** Represents a FunnelNextAction. */ - class FunnelNextAction implements IFunnelNextAction { - - /** - * Constructs a new FunnelNextAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); - - /** FunnelNextAction nextActionDimension. */ - public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); - - /** FunnelNextAction limit. */ - public limit?: (number|Long|string|null); - - /** - * Creates a new FunnelNextAction instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelNextAction instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; - - /** - * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @param message FunnelNextAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @param message FunnelNextAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelNextAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelNextAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelNextAction; - - /** - * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelNextAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelNextAction; - - /** - * Verifies a FunnelNextAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelNextAction - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; - - /** - * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. - * @param message FunnelNextAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelNextAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelNextAction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Funnel. */ - interface IFunnel { - - /** Funnel isOpenFunnel */ - isOpenFunnel?: (boolean|null); - - /** Funnel steps */ - steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); - } - - /** Represents a Funnel. */ - class Funnel implements IFunnel { - - /** - * Constructs a new Funnel. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnel); - - /** Funnel isOpenFunnel. */ - public isOpenFunnel: boolean; - - /** Funnel steps. */ - public steps: google.analytics.data.v1alpha.IFunnelStep[]; - - /** - * Creates a new Funnel instance using the specified properties. - * @param [properties] Properties to set - * @returns Funnel instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; - - /** - * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @param message Funnel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @param message Funnel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Funnel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Funnel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Funnel; - - /** - * Decodes a Funnel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Funnel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Funnel; - - /** - * Verifies a Funnel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Funnel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Funnel - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; - - /** - * Creates a plain object from a Funnel message. Also converts values to other types if specified. - * @param message Funnel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Funnel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Funnel - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelStep. */ - interface IFunnelStep { - - /** FunnelStep name */ - name?: (string|null); - - /** FunnelStep isDirectlyFollowedBy */ - isDirectlyFollowedBy?: (boolean|null); - - /** FunnelStep withinDurationFromPriorStep */ - withinDurationFromPriorStep?: (google.protobuf.IDuration|null); - - /** FunnelStep filterExpression */ - filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - } - - /** Represents a FunnelStep. */ - class FunnelStep implements IFunnelStep { - - /** - * Constructs a new FunnelStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); - - /** FunnelStep name. */ - public name: string; - - /** FunnelStep isDirectlyFollowedBy. */ - public isDirectlyFollowedBy: boolean; - - /** FunnelStep withinDurationFromPriorStep. */ - public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); - - /** FunnelStep filterExpression. */ - public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - - /** - * Creates a new FunnelStep instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelStep instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; - - /** - * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @param message FunnelStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @param message FunnelStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelStep; - - /** - * Decodes a FunnelStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelStep; - - /** - * Verifies a FunnelStep message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelStep - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; - - /** - * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. - * @param message FunnelStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelSubReport. */ - interface IFunnelSubReport { - - /** FunnelSubReport dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); - - /** FunnelSubReport metricHeaders */ - metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); - - /** FunnelSubReport rows */ - rows?: (google.analytics.data.v1alpha.IRow[]|null); - - /** FunnelSubReport metadata */ - metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); - } - - /** Represents a FunnelSubReport. */ - class FunnelSubReport implements IFunnelSubReport { - - /** - * Constructs a new FunnelSubReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); - - /** FunnelSubReport dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; - - /** FunnelSubReport metricHeaders. */ - public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; - - /** FunnelSubReport rows. */ - public rows: google.analytics.data.v1alpha.IRow[]; - - /** FunnelSubReport metadata. */ - public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); - - /** - * Creates a new FunnelSubReport instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelSubReport instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; - - /** - * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @param message FunnelSubReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @param message FunnelSubReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelSubReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelSubReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelSubReport; - - /** - * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelSubReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelSubReport; - - /** - * Verifies a FunnelSubReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelSubReport - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; - - /** - * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. - * @param message FunnelSubReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelSubReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelSubReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSegment. */ - interface IUserSegment { - - /** UserSegment userInclusionCriteria */ - userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - - /** UserSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); - } - - /** Represents a UserSegment. */ - class UserSegment implements IUserSegment { - - /** - * Constructs a new UserSegment. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegment); - - /** UserSegment userInclusionCriteria. */ - public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - - /** UserSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); - - /** - * Creates a new UserSegment instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSegment instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; - - /** - * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @param message UserSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @param message UserSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSegment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegment; - - /** - * Decodes a UserSegment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegment; - - /** - * Verifies a UserSegment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSegment - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; - - /** - * Creates a plain object from a UserSegment message. Also converts values to other types if specified. - * @param message UserSegment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSegment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSegment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSegmentCriteria. */ - interface IUserSegmentCriteria { - - /** UserSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); - - /** UserSegmentCriteria andSequenceGroups */ - andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); - } - - /** Represents a UserSegmentCriteria. */ - class UserSegmentCriteria implements IUserSegmentCriteria { - - /** - * Constructs a new UserSegmentCriteria. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); - - /** UserSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; - - /** UserSegmentCriteria andSequenceGroups. */ - public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; - - /** - * Creates a new UserSegmentCriteria instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSegmentCriteria instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; - - /** - * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @param message UserSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @param message UserSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentCriteria; - - /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentCriteria; - - /** - * Verifies a UserSegmentCriteria message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSegmentCriteria - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; - - /** - * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. - * @param message UserSegmentCriteria - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSegmentCriteria to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSegmentCriteria - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UserCriteriaScoping enum. */ - enum UserCriteriaScoping { - USER_CRITERIA_SCOPING_UNSPECIFIED = 0, - USER_CRITERIA_WITHIN_SAME_EVENT = 1, - USER_CRITERIA_WITHIN_SAME_SESSION = 2, - USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 - } - - /** Properties of a UserSegmentConditionGroup. */ - interface IUserSegmentConditionGroup { - - /** UserSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); - - /** UserSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - } - - /** Represents a UserSegmentConditionGroup. */ - class UserSegmentConditionGroup implements IUserSegmentConditionGroup { - - /** - * Constructs a new UserSegmentConditionGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); - - /** UserSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - - /** UserSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** - * Creates a new UserSegmentConditionGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSegmentConditionGroup instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; - - /** - * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @param message UserSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @param message UserSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentConditionGroup; - - /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentConditionGroup; - - /** - * Verifies a UserSegmentConditionGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSegmentConditionGroup - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; - - /** - * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. - * @param message UserSegmentConditionGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSegmentConditionGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSegmentConditionGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSegmentSequenceGroup. */ - interface IUserSegmentSequenceGroup { - - /** UserSegmentSequenceGroup sequenceScoping */ - sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); - - /** UserSegmentSequenceGroup sequenceMaximumDuration */ - sequenceMaximumDuration?: (google.protobuf.IDuration|null); - - /** UserSegmentSequenceGroup userSequenceSteps */ - userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); - } - - /** Represents a UserSegmentSequenceGroup. */ - class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { - - /** - * Constructs a new UserSegmentSequenceGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); - - /** UserSegmentSequenceGroup sequenceScoping. */ - public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - - /** UserSegmentSequenceGroup sequenceMaximumDuration. */ - public sequenceMaximumDuration?: (google.protobuf.IDuration|null); - - /** UserSegmentSequenceGroup userSequenceSteps. */ - public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; - - /** - * Creates a new UserSegmentSequenceGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSegmentSequenceGroup instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; - - /** - * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @param message UserSegmentSequenceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @param message UserSegmentSequenceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSegmentSequenceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentSequenceGroup; - - /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSegmentSequenceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentSequenceGroup; - - /** - * Verifies a UserSegmentSequenceGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSegmentSequenceGroup - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; - - /** - * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. - * @param message UserSegmentSequenceGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSegmentSequenceGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSegmentSequenceGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSequenceStep. */ - interface IUserSequenceStep { - - /** UserSequenceStep isDirectlyFollowedBy */ - isDirectlyFollowedBy?: (boolean|null); - - /** UserSequenceStep stepScoping */ - stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); - - /** UserSequenceStep segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - } - - /** Represents a UserSequenceStep. */ - class UserSequenceStep implements IUserSequenceStep { - - /** - * Constructs a new UserSequenceStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); - - /** UserSequenceStep isDirectlyFollowedBy. */ - public isDirectlyFollowedBy: boolean; - - /** UserSequenceStep stepScoping. */ - public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - - /** UserSequenceStep segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** - * Creates a new UserSequenceStep instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSequenceStep instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; - - /** - * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @param message UserSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @param message UserSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSequenceStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSequenceStep; - - /** - * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSequenceStep; - - /** - * Verifies a UserSequenceStep message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSequenceStep - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; - - /** - * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. - * @param message UserSequenceStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSequenceStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSequenceStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserSegmentExclusion. */ - interface IUserSegmentExclusion { - - /** UserSegmentExclusion userExclusionDuration */ - userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); - - /** UserSegmentExclusion userExclusionCriteria */ - userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - } - - /** Represents a UserSegmentExclusion. */ - class UserSegmentExclusion implements IUserSegmentExclusion { - - /** - * Constructs a new UserSegmentExclusion. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); - - /** UserSegmentExclusion userExclusionDuration. */ - public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); - - /** UserSegmentExclusion userExclusionCriteria. */ - public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - - /** - * Creates a new UserSegmentExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns UserSegmentExclusion instance - */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; - - /** - * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @param message UserSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @param message UserSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentExclusion; - - /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentExclusion; - - /** - * Verifies a UserSegmentExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserSegmentExclusion - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; - - /** - * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. - * @param message UserSegmentExclusion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserSegmentExclusion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserSegmentExclusion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UserExclusionDuration enum. */ - enum UserExclusionDuration { - USER_EXCLUSION_DURATION_UNSPECIFIED = 0, - USER_EXCLUSION_TEMPORARY = 1, - USER_EXCLUSION_PERMANENT = 2 - } - - /** Properties of a SessionSegment. */ - interface ISessionSegment { - - /** SessionSegment sessionInclusionCriteria */ - sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); - - /** SessionSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); - } - - /** Represents a SessionSegment. */ - class SessionSegment implements ISessionSegment { - - /** - * Constructs a new SessionSegment. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); - - /** SessionSegment sessionInclusionCriteria. */ - public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); - - /** SessionSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); - - /** - * Creates a new SessionSegment instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionSegment instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; - - /** - * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @param message SessionSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @param message SessionSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionSegment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegment; - - /** - * Decodes a SessionSegment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegment; - - /** - * Verifies a SessionSegment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionSegment - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; - - /** - * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. - * @param message SessionSegment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionSegment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionSegment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SessionSegmentCriteria. */ - interface ISessionSegmentCriteria { - - /** SessionSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); - } - - /** Represents a SessionSegmentCriteria. */ - class SessionSegmentCriteria implements ISessionSegmentCriteria { - - /** - * Constructs a new SessionSegmentCriteria. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); - - /** SessionSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; - - /** - * Creates a new SessionSegmentCriteria instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionSegmentCriteria instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; - - /** - * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @param message SessionSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @param message SessionSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentCriteria; - - /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentCriteria; - - /** - * Verifies a SessionSegmentCriteria message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionSegmentCriteria - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; - - /** - * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. - * @param message SessionSegmentCriteria - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionSegmentCriteria to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionSegmentCriteria - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SessionCriteriaScoping enum. */ - enum SessionCriteriaScoping { - SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, - SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, - SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 - } - - /** Properties of a SessionSegmentConditionGroup. */ - interface ISessionSegmentConditionGroup { - - /** SessionSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); - - /** SessionSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - } - - /** Represents a SessionSegmentConditionGroup. */ - class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { - - /** - * Constructs a new SessionSegmentConditionGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); - - /** SessionSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); - - /** SessionSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** - * Creates a new SessionSegmentConditionGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionSegmentConditionGroup instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; - - /** - * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @param message SessionSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @param message SessionSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentConditionGroup; - - /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentConditionGroup; - - /** - * Verifies a SessionSegmentConditionGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionSegmentConditionGroup - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; - - /** - * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. - * @param message SessionSegmentConditionGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionSegmentConditionGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionSegmentConditionGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SessionSegmentExclusion. */ - interface ISessionSegmentExclusion { - - /** SessionSegmentExclusion sessionExclusionDuration */ - sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); - - /** SessionSegmentExclusion sessionExclusionCriteria */ - sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); - } - - /** Represents a SessionSegmentExclusion. */ - class SessionSegmentExclusion implements ISessionSegmentExclusion { - - /** - * Constructs a new SessionSegmentExclusion. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); - - /** SessionSegmentExclusion sessionExclusionDuration. */ - public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); - - /** SessionSegmentExclusion sessionExclusionCriteria. */ - public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); - - /** - * Creates a new SessionSegmentExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionSegmentExclusion instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; - - /** - * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @param message SessionSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @param message SessionSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentExclusion; - - /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentExclusion; - - /** - * Verifies a SessionSegmentExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionSegmentExclusion - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; - - /** - * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. - * @param message SessionSegmentExclusion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionSegmentExclusion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionSegmentExclusion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SessionExclusionDuration enum. */ - enum SessionExclusionDuration { - SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, - SESSION_EXCLUSION_TEMPORARY = 1, - SESSION_EXCLUSION_PERMANENT = 2 - } - - /** Properties of an EventSegment. */ - interface IEventSegment { - - /** EventSegment eventInclusionCriteria */ - eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - - /** EventSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); - } - - /** Represents an EventSegment. */ - class EventSegment implements IEventSegment { - - /** - * Constructs a new EventSegment. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegment); - - /** EventSegment eventInclusionCriteria. */ - public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - - /** EventSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); - - /** - * Creates a new EventSegment instance using the specified properties. - * @param [properties] Properties to set - * @returns EventSegment instance - */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; - - /** - * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @param message EventSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @param message EventSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventSegment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegment; - - /** - * Decodes an EventSegment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegment; - - /** - * Verifies an EventSegment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventSegment - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; - - /** - * Creates a plain object from an EventSegment message. Also converts values to other types if specified. - * @param message EventSegment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventSegment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventSegment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EventSegmentCriteria. */ - interface IEventSegmentCriteria { - - /** EventSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); - } - - /** Represents an EventSegmentCriteria. */ - class EventSegmentCriteria implements IEventSegmentCriteria { - - /** - * Constructs a new EventSegmentCriteria. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); - - /** EventSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; - - /** - * Creates a new EventSegmentCriteria instance using the specified properties. - * @param [properties] Properties to set - * @returns EventSegmentCriteria instance - */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; - - /** - * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @param message EventSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @param message EventSegmentCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentCriteria; - - /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentCriteria; - - /** - * Verifies an EventSegmentCriteria message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventSegmentCriteria - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; - - /** - * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. - * @param message EventSegmentCriteria - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventSegmentCriteria to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventSegmentCriteria - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** EventCriteriaScoping enum. */ - enum EventCriteriaScoping { - EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, - EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 - } - - /** Properties of an EventSegmentConditionGroup. */ - interface IEventSegmentConditionGroup { - - /** EventSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); - - /** EventSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - } - - /** Represents an EventSegmentConditionGroup. */ - class EventSegmentConditionGroup implements IEventSegmentConditionGroup { - - /** - * Constructs a new EventSegmentConditionGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); - - /** EventSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); - - /** EventSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** - * Creates a new EventSegmentConditionGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns EventSegmentConditionGroup instance - */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; - - /** - * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @param message EventSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @param message EventSegmentConditionGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentConditionGroup; - - /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentConditionGroup; - - /** - * Verifies an EventSegmentConditionGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventSegmentConditionGroup - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; - - /** - * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. - * @param message EventSegmentConditionGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventSegmentConditionGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventSegmentConditionGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EventSegmentExclusion. */ - interface IEventSegmentExclusion { - - /** EventSegmentExclusion eventExclusionDuration */ - eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); - - /** EventSegmentExclusion eventExclusionCriteria */ - eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - } - - /** Represents an EventSegmentExclusion. */ - class EventSegmentExclusion implements IEventSegmentExclusion { - - /** - * Constructs a new EventSegmentExclusion. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); - - /** EventSegmentExclusion eventExclusionDuration. */ - public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); - - /** EventSegmentExclusion eventExclusionCriteria. */ - public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - - /** - * Creates a new EventSegmentExclusion instance using the specified properties. - * @param [properties] Properties to set - * @returns EventSegmentExclusion instance - */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; - - /** - * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @param message EventSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @param message EventSegmentExclusion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentExclusion; - - /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentExclusion; - - /** - * Verifies an EventSegmentExclusion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventSegmentExclusion - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; - - /** - * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. - * @param message EventSegmentExclusion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventSegmentExclusion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventSegmentExclusion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** EventExclusionDuration enum. */ - enum EventExclusionDuration { - EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, - EVENT_EXCLUSION_PERMANENT = 1 - } - - /** Properties of a Segment. */ - interface ISegment { - - /** Segment name */ - name?: (string|null); - - /** Segment userSegment */ - userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); - - /** Segment sessionSegment */ - sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); - - /** Segment eventSegment */ - eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); - } - - /** Represents a Segment. */ - class Segment implements ISegment { - - /** - * Constructs a new Segment. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegment); - - /** Segment name. */ - public name: string; - - /** Segment userSegment. */ - public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); - - /** Segment sessionSegment. */ - public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); - - /** Segment eventSegment. */ - public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); - - /** Segment oneSegmentScope. */ - public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); - - /** - * Creates a new Segment instance using the specified properties. - * @param [properties] Properties to set - * @returns Segment instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; - - /** - * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Segment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Segment; - - /** - * Decodes a Segment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Segment; - - /** - * Verifies a Segment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Segment - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; - - /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. - * @param message Segment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Segment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Segment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentFilterExpression. */ - interface ISegmentFilterExpression { - - /** SegmentFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - - /** SegmentFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - - /** SegmentFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** SegmentFilterExpression segmentFilter */ - segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); - - /** SegmentFilterExpression segmentEventFilter */ - segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); - } - - /** Represents a SegmentFilterExpression. */ - class SegmentFilterExpression implements ISegmentFilterExpression { - - /** - * Constructs a new SegmentFilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); - - /** SegmentFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - - /** SegmentFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - - /** SegmentFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); - - /** SegmentFilterExpression segmentFilter. */ - public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); - - /** SegmentFilterExpression segmentEventFilter. */ - public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); - - /** SegmentFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); - - /** - * Creates a new SegmentFilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentFilterExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; - - /** - * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @param message SegmentFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @param message SegmentFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpression; - - /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpression; - - /** - * Verifies a SegmentFilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentFilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; - - /** - * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. - * @param message SegmentFilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentFilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentFilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentFilterExpressionList. */ - interface ISegmentFilterExpressionList { - - /** SegmentFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); - } - - /** Represents a SegmentFilterExpressionList. */ - class SegmentFilterExpressionList implements ISegmentFilterExpressionList { - - /** - * Constructs a new SegmentFilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); - - /** SegmentFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; - - /** - * Creates a new SegmentFilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentFilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; - - /** - * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @param message SegmentFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @param message SegmentFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpressionList; - - /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpressionList; - - /** - * Verifies a SegmentFilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentFilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; - - /** - * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. - * @param message SegmentFilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentFilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentFilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentFilter. */ - interface ISegmentFilter { - - /** SegmentFilter fieldName */ - fieldName?: (string|null); - - /** SegmentFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** SegmentFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** SegmentFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** SegmentFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** SegmentFilter filterScoping */ - filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); - } - - /** Represents a SegmentFilter. */ - class SegmentFilter implements ISegmentFilter { - - /** - * Constructs a new SegmentFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); - - /** SegmentFilter fieldName. */ - public fieldName: string; - - /** SegmentFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** SegmentFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** SegmentFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** SegmentFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** SegmentFilter filterScoping. */ - public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); - - /** SegmentFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); - - /** - * Creates a new SegmentFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; - - /** - * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @param message SegmentFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @param message SegmentFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilter; - - /** - * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilter; - - /** - * Verifies a SegmentFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; - - /** - * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. - * @param message SegmentFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentFilterScoping. */ - interface ISegmentFilterScoping { - - /** SegmentFilterScoping atAnyPointInTime */ - atAnyPointInTime?: (boolean|null); - } - - /** Represents a SegmentFilterScoping. */ - class SegmentFilterScoping implements ISegmentFilterScoping { - - /** - * Constructs a new SegmentFilterScoping. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); - - /** SegmentFilterScoping atAnyPointInTime. */ - public atAnyPointInTime?: (boolean|null); - - /** - * Creates a new SegmentFilterScoping instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentFilterScoping instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; - - /** - * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @param message SegmentFilterScoping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @param message SegmentFilterScoping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterScoping; - - /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterScoping; - - /** - * Verifies a SegmentFilterScoping message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentFilterScoping - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; - - /** - * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. - * @param message SegmentFilterScoping - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentFilterScoping to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentFilterScoping - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentEventFilter. */ - interface ISegmentEventFilter { - - /** SegmentEventFilter eventName */ - eventName?: (string|null); - - /** SegmentEventFilter segmentParameterFilterExpression */ - segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - } - - /** Represents a SegmentEventFilter. */ - class SegmentEventFilter implements ISegmentEventFilter { - - /** - * Constructs a new SegmentEventFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); - - /** SegmentEventFilter eventName. */ - public eventName?: (string|null); - - /** SegmentEventFilter segmentParameterFilterExpression. */ - public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - - /** - * Creates a new SegmentEventFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentEventFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; - - /** - * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @param message SegmentEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @param message SegmentEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentEventFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentEventFilter; - - /** - * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentEventFilter; - - /** - * Verifies a SegmentEventFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentEventFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; - - /** - * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. - * @param message SegmentEventFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentEventFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentEventFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentParameterFilterExpression. */ - interface ISegmentParameterFilterExpression { - - /** SegmentParameterFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - - /** SegmentParameterFilterExpression segmentParameterFilter */ - segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); - } - - /** Represents a SegmentParameterFilterExpression. */ - class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { - - /** - * Constructs a new SegmentParameterFilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); - - /** SegmentParameterFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - - /** SegmentParameterFilterExpression segmentParameterFilter. */ - public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); - - /** SegmentParameterFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); - - /** - * Creates a new SegmentParameterFilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentParameterFilterExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; - - /** - * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @param message SegmentParameterFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @param message SegmentParameterFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpression; - - /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpression; - - /** - * Verifies a SegmentParameterFilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentParameterFilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; - - /** - * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. - * @param message SegmentParameterFilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentParameterFilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentParameterFilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentParameterFilterExpressionList. */ - interface ISegmentParameterFilterExpressionList { - - /** SegmentParameterFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); - } - - /** Represents a SegmentParameterFilterExpressionList. */ - class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { - - /** - * Constructs a new SegmentParameterFilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); - - /** SegmentParameterFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; - - /** - * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentParameterFilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; - - /** - * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @param message SegmentParameterFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @param message SegmentParameterFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; - - /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; - - /** - * Verifies a SegmentParameterFilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentParameterFilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; - - /** - * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. - * @param message SegmentParameterFilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentParameterFilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentParameterFilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentParameterFilter. */ - interface ISegmentParameterFilter { - - /** SegmentParameterFilter eventParameterName */ - eventParameterName?: (string|null); - - /** SegmentParameterFilter itemParameterName */ - itemParameterName?: (string|null); - - /** SegmentParameterFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** SegmentParameterFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** SegmentParameterFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** SegmentParameterFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** SegmentParameterFilter filterScoping */ - filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); - } - - /** Represents a SegmentParameterFilter. */ - class SegmentParameterFilter implements ISegmentParameterFilter { - - /** - * Constructs a new SegmentParameterFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); - - /** SegmentParameterFilter eventParameterName. */ - public eventParameterName?: (string|null); - - /** SegmentParameterFilter itemParameterName. */ - public itemParameterName?: (string|null); - - /** SegmentParameterFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** SegmentParameterFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** SegmentParameterFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** SegmentParameterFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** SegmentParameterFilter filterScoping. */ - public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); - - /** SegmentParameterFilter oneParameter. */ - public oneParameter?: ("eventParameterName"|"itemParameterName"); - - /** SegmentParameterFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); - - /** - * Creates a new SegmentParameterFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentParameterFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; - - /** - * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @param message SegmentParameterFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @param message SegmentParameterFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilter; - - /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilter; - - /** - * Verifies a SegmentParameterFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentParameterFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; - - /** - * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. - * @param message SegmentParameterFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentParameterFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentParameterFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentParameterFilterScoping. */ - interface ISegmentParameterFilterScoping { - - /** SegmentParameterFilterScoping inAnyNDayPeriod */ - inAnyNDayPeriod?: (number|Long|string|null); - } - - /** Represents a SegmentParameterFilterScoping. */ - class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { - - /** - * Constructs a new SegmentParameterFilterScoping. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); - - /** SegmentParameterFilterScoping inAnyNDayPeriod. */ - public inAnyNDayPeriod?: (number|Long|string|null); - - /** - * Creates a new SegmentParameterFilterScoping instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentParameterFilterScoping instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; - - /** - * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @param message SegmentParameterFilterScoping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @param message SegmentParameterFilterScoping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterScoping; - - /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterScoping; - - /** - * Verifies a SegmentParameterFilterScoping message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentParameterFilterScoping - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; - - /** - * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. - * @param message SegmentParameterFilterScoping - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentParameterFilterScoping to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SegmentParameterFilterScoping - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelFilterExpression. */ - interface IFunnelFilterExpression { - - /** FunnelFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - - /** FunnelFilterExpression funnelFieldFilter */ - funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); - - /** FunnelFilterExpression funnelEventFilter */ - funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); - } - - /** Represents a FunnelFilterExpression. */ - class FunnelFilterExpression implements IFunnelFilterExpression { - - /** - * Constructs a new FunnelFilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); - - /** FunnelFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - - /** FunnelFilterExpression funnelFieldFilter. */ - public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); - - /** FunnelFilterExpression funnelEventFilter. */ - public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); - - /** FunnelFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); - - /** - * Creates a new FunnelFilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelFilterExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; - - /** - * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @param message FunnelFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @param message FunnelFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpression; - - /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpression; - - /** - * Verifies a FunnelFilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelFilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; - - /** - * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. - * @param message FunnelFilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelFilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelFilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelFilterExpressionList. */ - interface IFunnelFilterExpressionList { - - /** FunnelFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); - } - - /** Represents a FunnelFilterExpressionList. */ - class FunnelFilterExpressionList implements IFunnelFilterExpressionList { - - /** - * Constructs a new FunnelFilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); - - /** FunnelFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; - - /** - * Creates a new FunnelFilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelFilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; - - /** - * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @param message FunnelFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @param message FunnelFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpressionList; - - /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpressionList; - - /** - * Verifies a FunnelFilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelFilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; - - /** - * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. - * @param message FunnelFilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelFilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelFilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelFieldFilter. */ - interface IFunnelFieldFilter { - - /** FunnelFieldFilter fieldName */ - fieldName?: (string|null); - - /** FunnelFieldFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelFieldFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelFieldFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** FunnelFieldFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - } - - /** Represents a FunnelFieldFilter. */ - class FunnelFieldFilter implements IFunnelFieldFilter { - - /** - * Constructs a new FunnelFieldFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); - - /** FunnelFieldFilter fieldName. */ - public fieldName: string; - - /** FunnelFieldFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelFieldFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelFieldFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** FunnelFieldFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** FunnelFieldFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); - - /** - * Creates a new FunnelFieldFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelFieldFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; - - /** - * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @param message FunnelFieldFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @param message FunnelFieldFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelFieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFieldFilter; - - /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelFieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFieldFilter; - - /** - * Verifies a FunnelFieldFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelFieldFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; - - /** - * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. - * @param message FunnelFieldFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelFieldFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelFieldFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelEventFilter. */ - interface IFunnelEventFilter { - - /** FunnelEventFilter eventName */ - eventName?: (string|null); - - /** FunnelEventFilter funnelParameterFilterExpression */ - funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); - } - - /** Represents a FunnelEventFilter. */ - class FunnelEventFilter implements IFunnelEventFilter { - - /** - * Constructs a new FunnelEventFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); - - /** FunnelEventFilter eventName. */ - public eventName?: (string|null); - - /** FunnelEventFilter funnelParameterFilterExpression. */ - public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); - - /** - * Creates a new FunnelEventFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelEventFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; - - /** - * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @param message FunnelEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @param message FunnelEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelEventFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelEventFilter; - - /** - * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelEventFilter; - - /** - * Verifies a FunnelEventFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelEventFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; - - /** - * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. - * @param message FunnelEventFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelEventFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelEventFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelParameterFilterExpression. */ - interface IFunnelParameterFilterExpression { - - /** FunnelParameterFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); - - /** FunnelParameterFilterExpression funnelParameterFilter */ - funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); - } - - /** Represents a FunnelParameterFilterExpression. */ - class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { - - /** - * Constructs a new FunnelParameterFilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); - - /** FunnelParameterFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); - - /** FunnelParameterFilterExpression funnelParameterFilter. */ - public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); - - /** FunnelParameterFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); - - /** - * Creates a new FunnelParameterFilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelParameterFilterExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; - - /** - * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @param message FunnelParameterFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @param message FunnelParameterFilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpression; - - /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpression; - - /** - * Verifies a FunnelParameterFilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelParameterFilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; - - /** - * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. - * @param message FunnelParameterFilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelParameterFilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelParameterFilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelParameterFilterExpressionList. */ - interface IFunnelParameterFilterExpressionList { - - /** FunnelParameterFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); - } - - /** Represents a FunnelParameterFilterExpressionList. */ - class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { - - /** - * Constructs a new FunnelParameterFilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); - - /** FunnelParameterFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; - - /** - * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelParameterFilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; - - /** - * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @param message FunnelParameterFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @param message FunnelParameterFilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; - - /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; - - /** - * Verifies a FunnelParameterFilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelParameterFilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; - - /** - * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. - * @param message FunnelParameterFilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelParameterFilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelParameterFilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelParameterFilter. */ - interface IFunnelParameterFilter { - - /** FunnelParameterFilter eventParameterName */ - eventParameterName?: (string|null); - - /** FunnelParameterFilter itemParameterName */ - itemParameterName?: (string|null); - - /** FunnelParameterFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelParameterFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelParameterFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** FunnelParameterFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - } - - /** Represents a FunnelParameterFilter. */ - class FunnelParameterFilter implements IFunnelParameterFilter { - - /** - * Constructs a new FunnelParameterFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); - - /** FunnelParameterFilter eventParameterName. */ - public eventParameterName?: (string|null); - - /** FunnelParameterFilter itemParameterName. */ - public itemParameterName?: (string|null); - - /** FunnelParameterFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelParameterFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelParameterFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** FunnelParameterFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** FunnelParameterFilter oneParameter. */ - public oneParameter?: ("eventParameterName"|"itemParameterName"); - - /** FunnelParameterFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); - - /** - * Creates a new FunnelParameterFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelParameterFilter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; - - /** - * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @param message FunnelParameterFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @param message FunnelParameterFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilter; - - /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilter; - - /** - * Verifies a FunnelParameterFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelParameterFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; - - /** - * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. - * @param message FunnelParameterFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelParameterFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelParameterFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FunnelResponseMetadata. */ - interface IFunnelResponseMetadata { - - /** FunnelResponseMetadata samplingMetadatas */ - samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); - } - - /** Represents a FunnelResponseMetadata. */ - class FunnelResponseMetadata implements IFunnelResponseMetadata { - - /** - * Constructs a new FunnelResponseMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); - - /** FunnelResponseMetadata samplingMetadatas. */ - public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; - - /** - * Creates a new FunnelResponseMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns FunnelResponseMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; - - /** - * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @param message FunnelResponseMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @param message FunnelResponseMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FunnelResponseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelResponseMetadata; - - /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FunnelResponseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelResponseMetadata; - - /** - * Verifies a FunnelResponseMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FunnelResponseMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; - - /** - * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. - * @param message FunnelResponseMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FunnelResponseMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FunnelResponseMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SamplingMetadata. */ - interface ISamplingMetadata { - - /** SamplingMetadata samplesReadCount */ - samplesReadCount?: (number|Long|string|null); - - /** SamplingMetadata samplingSpaceSize */ - samplingSpaceSize?: (number|Long|string|null); - } - - /** Represents a SamplingMetadata. */ - class SamplingMetadata implements ISamplingMetadata { - - /** - * Constructs a new SamplingMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); - - /** SamplingMetadata samplesReadCount. */ - public samplesReadCount: (number|Long|string); - - /** SamplingMetadata samplingSpaceSize. */ - public samplingSpaceSize: (number|Long|string); - - /** - * Creates a new SamplingMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns SamplingMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; - - /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SamplingMetadata; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SamplingMetadata; - - /** - * Verifies a SamplingMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SamplingMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; - - /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. - * @param message SamplingMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SamplingMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SamplingMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** MetricAggregation enum. */ - enum MetricAggregation { - METRIC_AGGREGATION_UNSPECIFIED = 0, - TOTAL = 1, - MINIMUM = 5, - MAXIMUM = 6, - COUNT = 4 - } - - /** MetricType enum. */ - enum MetricType { - METRIC_TYPE_UNSPECIFIED = 0, - TYPE_INTEGER = 1, - TYPE_FLOAT = 2, - TYPE_SECONDS = 4, - TYPE_MILLISECONDS = 5, - TYPE_MINUTES = 6, - TYPE_HOURS = 7, - TYPE_STANDARD = 8, - TYPE_CURRENCY = 9, - TYPE_FEET = 10, - TYPE_MILES = 11, - TYPE_METERS = 12, - TYPE_KILOMETERS = 13 - } - - /** RestrictedMetricType enum. */ - enum RestrictedMetricType { - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, - COST_DATA = 1, - REVENUE_DATA = 2 - } - - /** SamplingLevel enum. */ - enum SamplingLevel { - SAMPLING_LEVEL_UNSPECIFIED = 0, - LOW = 1, - MEDIUM = 2, - UNSAMPLED = 3 - } - - /** Properties of a ConversionSpec. */ - interface IConversionSpec { - - /** ConversionSpec conversionActions */ - conversionActions?: (string[]|null); - - /** ConversionSpec attributionModel */ - attributionModel?: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null); - } - - /** Represents a ConversionSpec. */ - class ConversionSpec implements IConversionSpec { - - /** - * Constructs a new ConversionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IConversionSpec); - - /** ConversionSpec conversionActions. */ - public conversionActions: string[]; - - /** ConversionSpec attributionModel. */ - public attributionModel: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel); - - /** - * Creates a new ConversionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversionSpec instance - */ - public static create(properties?: google.analytics.data.v1alpha.IConversionSpec): google.analytics.data.v1alpha.ConversionSpec; - - /** - * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. - * @param message ConversionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. - * @param message ConversionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConversionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionSpec; - - /** - * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionSpec; - - /** - * Verifies a ConversionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversionSpec - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionSpec; - - /** - * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. - * @param message ConversionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ConversionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConversionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConversionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ConversionSpec { - - /** AttributionModel enum. */ - enum AttributionModel { - ATTRIBUTION_MODEL_UNSPECIFIED = 0, - DATA_DRIVEN = 1, - LAST_CLICK = 2 - } - } - - /** Properties of a DimensionMetadata. */ - interface IDimensionMetadata { - - /** DimensionMetadata apiName */ - apiName?: (string|null); - - /** DimensionMetadata uiName */ - uiName?: (string|null); - - /** DimensionMetadata description */ - description?: (string|null); - - /** DimensionMetadata deprecatedApiNames */ - deprecatedApiNames?: (string[]|null); - - /** DimensionMetadata customDefinition */ - customDefinition?: (boolean|null); - - /** DimensionMetadata category */ - category?: (string|null); - - /** DimensionMetadata sections */ - sections?: (google.analytics.data.v1alpha.Section[]|null); - } - - /** Represents a DimensionMetadata. */ - class DimensionMetadata implements IDimensionMetadata { - - /** - * Constructs a new DimensionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionMetadata); - - /** DimensionMetadata apiName. */ - public apiName: string; - - /** DimensionMetadata uiName. */ - public uiName: string; - - /** DimensionMetadata description. */ - public description: string; - - /** DimensionMetadata deprecatedApiNames. */ - public deprecatedApiNames: string[]; - - /** DimensionMetadata customDefinition. */ - public customDefinition: boolean; - - /** DimensionMetadata category. */ - public category: string; - - /** DimensionMetadata sections. */ - public sections: google.analytics.data.v1alpha.Section[]; - - /** - * Creates a new DimensionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionMetadata): google.analytics.data.v1alpha.DimensionMetadata; - - /** - * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. - * @param message DimensionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. - * @param message DimensionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionMetadata; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionMetadata; - - /** - * Verifies a DimensionMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionMetadata; - - /** - * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. - * @param message DimensionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricMetadata. */ - interface IMetricMetadata { - - /** MetricMetadata apiName */ - apiName?: (string|null); - - /** MetricMetadata uiName */ - uiName?: (string|null); - - /** MetricMetadata description */ - description?: (string|null); - - /** MetricMetadata deprecatedApiNames */ - deprecatedApiNames?: (string[]|null); - - /** MetricMetadata type */ - type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); - - /** MetricMetadata expression */ - expression?: (string|null); - - /** MetricMetadata customDefinition */ - customDefinition?: (boolean|null); - - /** MetricMetadata blockedReasons */ - blockedReasons?: (google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]|null); - - /** MetricMetadata category */ - category?: (string|null); - - /** MetricMetadata sections */ - sections?: (google.analytics.data.v1alpha.Section[]|null); - } - - /** Represents a MetricMetadata. */ - class MetricMetadata implements IMetricMetadata { - - /** - * Constructs a new MetricMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetricMetadata); - - /** MetricMetadata apiName. */ - public apiName: string; - - /** MetricMetadata uiName. */ - public uiName: string; - - /** MetricMetadata description. */ - public description: string; - - /** MetricMetadata deprecatedApiNames. */ - public deprecatedApiNames: string[]; - - /** MetricMetadata type. */ - public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); - - /** MetricMetadata expression. */ - public expression: string; - - /** MetricMetadata customDefinition. */ - public customDefinition: boolean; - - /** MetricMetadata blockedReasons. */ - public blockedReasons: google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]; - - /** MetricMetadata category. */ - public category: string; - - /** MetricMetadata sections. */ - public sections: google.analytics.data.v1alpha.Section[]; - - /** - * Creates a new MetricMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IMetricMetadata): google.analytics.data.v1alpha.MetricMetadata; - - /** - * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. - * @param message MetricMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. - * @param message MetricMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricMetadata; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricMetadata; - - /** - * Verifies a MetricMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricMetadata; - - /** - * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. - * @param message MetricMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetricMetadata { - - /** BlockedReason enum. */ - enum BlockedReason { - BLOCKED_REASON_UNSPECIFIED = 0, - NO_REVENUE_METRICS = 1, - NO_COST_METRICS = 2 - } - } - - /** Properties of a ComparisonMetadata. */ - interface IComparisonMetadata { - - /** ComparisonMetadata apiName */ - apiName?: (string|null); - - /** ComparisonMetadata uiName */ - uiName?: (string|null); - - /** ComparisonMetadata description */ - description?: (string|null); - } - - /** Represents a ComparisonMetadata. */ - class ComparisonMetadata implements IComparisonMetadata { - - /** - * Constructs a new ComparisonMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IComparisonMetadata); - - /** ComparisonMetadata apiName. */ - public apiName: string; - - /** ComparisonMetadata uiName. */ - public uiName: string; - - /** ComparisonMetadata description. */ - public description: string; - - /** - * Creates a new ComparisonMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ComparisonMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IComparisonMetadata): google.analytics.data.v1alpha.ComparisonMetadata; - - /** - * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. - * @param message ComparisonMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. - * @param message ComparisonMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ComparisonMetadata; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ComparisonMetadata; - - /** - * Verifies a ComparisonMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComparisonMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ComparisonMetadata; - - /** - * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. - * @param message ComparisonMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComparisonMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComparisonMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConversionMetadata. */ - interface IConversionMetadata { - - /** ConversionMetadata conversionAction */ - conversionAction?: (string|null); - - /** ConversionMetadata displayName */ - displayName?: (string|null); - } - - /** Represents a ConversionMetadata. */ - class ConversionMetadata implements IConversionMetadata { - - /** - * Constructs a new ConversionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IConversionMetadata); - - /** ConversionMetadata conversionAction. */ - public conversionAction: string; - - /** ConversionMetadata displayName. */ - public displayName: string; - - /** - * Creates a new ConversionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversionMetadata instance - */ - public static create(properties?: google.analytics.data.v1alpha.IConversionMetadata): google.analytics.data.v1alpha.ConversionMetadata; - - /** - * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. - * @param message ConversionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. - * @param message ConversionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConversionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionMetadata; - - /** - * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionMetadata; - - /** - * Verifies a ConversionMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversionMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionMetadata; - - /** - * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. - * @param message ConversionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ConversionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConversionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConversionMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace v1beta. */ - namespace v1beta { - - /** Represents a BetaAnalyticsData */ - class BetaAnalyticsData extends $protobuf.rpc.Service { - - /** - * Constructs a new BetaAnalyticsData service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new BetaAnalyticsData service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BetaAnalyticsData; - - /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunReportResponse - */ - public runReport(request: google.analytics.data.v1beta.IRunReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback): void; - - /** - * Calls RunReport. - * @param request RunReportRequest message or plain object - * @returns Promise - */ - public runReport(request: google.analytics.data.v1beta.IRunReportRequest): Promise; - - /** - * Calls RunPivotReport. - * @param request RunPivotReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunPivotReportResponse - */ - public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback): void; - - /** - * Calls RunPivotReport. - * @param request RunPivotReportRequest message or plain object - * @returns Promise - */ - public runPivotReport(request: google.analytics.data.v1beta.IRunPivotReportRequest): Promise; - - /** - * Calls BatchRunReports. - * @param request BatchRunReportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchRunReportsResponse - */ - public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback): void; - - /** - * Calls BatchRunReports. - * @param request BatchRunReportsRequest message or plain object - * @returns Promise - */ - public batchRunReports(request: google.analytics.data.v1beta.IBatchRunReportsRequest): Promise; - - /** - * Calls BatchRunPivotReports. - * @param request BatchRunPivotReportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse - */ - public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback): void; - - /** - * Calls BatchRunPivotReports. - * @param request BatchRunPivotReportsRequest message or plain object - * @returns Promise - */ - public batchRunPivotReports(request: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): Promise; - - /** - * Calls GetMetadata. - * @param request GetMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Metadata - */ - public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback): void; - - /** - * Calls GetMetadata. - * @param request GetMetadataRequest message or plain object - * @returns Promise - */ - public getMetadata(request: google.analytics.data.v1beta.IGetMetadataRequest): Promise; - - /** - * Calls RunRealtimeReport. - * @param request RunRealtimeReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunRealtimeReportResponse - */ - public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback): void; - - /** - * Calls RunRealtimeReport. - * @param request RunRealtimeReportRequest message or plain object - * @returns Promise - */ - public runRealtimeReport(request: google.analytics.data.v1beta.IRunRealtimeReportRequest): Promise; - - /** - * Calls CheckCompatibility. - * @param request CheckCompatibilityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CheckCompatibilityResponse - */ - public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback): void; - - /** - * Calls CheckCompatibility. - * @param request CheckCompatibilityRequest message or plain object - * @returns Promise - */ - public checkCompatibility(request: google.analytics.data.v1beta.ICheckCompatibilityRequest): Promise; - - /** - * Calls CreateAudienceExport. - * @param request CreateAudienceExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback): void; - - /** - * Calls CreateAudienceExport. - * @param request CreateAudienceExportRequest message or plain object - * @returns Promise - */ - public createAudienceExport(request: google.analytics.data.v1beta.ICreateAudienceExportRequest): Promise; - - /** - * Calls QueryAudienceExport. - * @param request QueryAudienceExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAudienceExportResponse - */ - public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback): void; - - /** - * Calls QueryAudienceExport. - * @param request QueryAudienceExportRequest message or plain object - * @returns Promise - */ - public queryAudienceExport(request: google.analytics.data.v1beta.IQueryAudienceExportRequest): Promise; - - /** - * Calls GetAudienceExport. - * @param request GetAudienceExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AudienceExport - */ - public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback): void; - - /** - * Calls GetAudienceExport. - * @param request GetAudienceExportRequest message or plain object - * @returns Promise - */ - public getAudienceExport(request: google.analytics.data.v1beta.IGetAudienceExportRequest): Promise; - - /** - * Calls ListAudienceExports. - * @param request ListAudienceExportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAudienceExportsResponse - */ - public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest, callback: google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback): void; - - /** - * Calls ListAudienceExports. - * @param request ListAudienceExportsRequest message or plain object - * @returns Promise - */ - public listAudienceExports(request: google.analytics.data.v1beta.IListAudienceExportsRequest): Promise; - } - - namespace BetaAnalyticsData { - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. - * @param error Error, if any - * @param [response] RunReportResponse - */ - type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunReportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. - * @param error Error, if any - * @param [response] RunPivotReportResponse - */ - type RunPivotReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunPivotReportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. - * @param error Error, if any - * @param [response] BatchRunReportsResponse - */ - type BatchRunReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunReportsResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. - * @param error Error, if any - * @param [response] BatchRunPivotReportsResponse - */ - type BatchRunPivotReportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.BatchRunPivotReportsResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. - * @param error Error, if any - * @param [response] Metadata - */ - type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1beta.Metadata) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. - * @param error Error, if any - * @param [response] RunRealtimeReportResponse - */ - type RunRealtimeReportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.RunRealtimeReportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. - * @param error Error, if any - * @param [response] CheckCompatibilityResponse - */ - type CheckCompatibilityCallback = (error: (Error|null), response?: google.analytics.data.v1beta.CheckCompatibilityResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateAudienceExportCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. - * @param error Error, if any - * @param [response] QueryAudienceExportResponse - */ - type QueryAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.QueryAudienceExportResponse) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. - * @param error Error, if any - * @param [response] AudienceExport - */ - type GetAudienceExportCallback = (error: (Error|null), response?: google.analytics.data.v1beta.AudienceExport) => void; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. - * @param error Error, if any - * @param [response] ListAudienceExportsResponse - */ - type ListAudienceExportsCallback = (error: (Error|null), response?: google.analytics.data.v1beta.ListAudienceExportsResponse) => void; - } - - /** Properties of a CheckCompatibilityRequest. */ - interface ICheckCompatibilityRequest { - - /** CheckCompatibilityRequest property */ - property?: (string|null); - - /** CheckCompatibilityRequest dimensions */ - dimensions?: (google.analytics.data.v1beta.IDimension[]|null); - - /** CheckCompatibilityRequest metrics */ - metrics?: (google.analytics.data.v1beta.IMetric[]|null); - - /** CheckCompatibilityRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** CheckCompatibilityRequest metricFilter */ - metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** CheckCompatibilityRequest compatibilityFilter */ - compatibilityFilter?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); - } - - /** Represents a CheckCompatibilityRequest. */ - class CheckCompatibilityRequest implements ICheckCompatibilityRequest { - - /** - * Constructs a new CheckCompatibilityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest); - - /** CheckCompatibilityRequest property. */ - public property: string; - - /** CheckCompatibilityRequest dimensions. */ - public dimensions: google.analytics.data.v1beta.IDimension[]; - - /** CheckCompatibilityRequest metrics. */ - public metrics: google.analytics.data.v1beta.IMetric[]; - - /** CheckCompatibilityRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** CheckCompatibilityRequest metricFilter. */ - public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** CheckCompatibilityRequest compatibilityFilter. */ - public compatibilityFilter: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility); - - /** - * Creates a new CheckCompatibilityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckCompatibilityRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityRequest): google.analytics.data.v1beta.CheckCompatibilityRequest; - - /** - * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. - * @param message CheckCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. - * @param message CheckCompatibilityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CheckCompatibilityRequest; - - /** - * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CheckCompatibilityRequest; - - /** - * Verifies a CheckCompatibilityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckCompatibilityRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityRequest; - - /** - * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. - * @param message CheckCompatibilityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckCompatibilityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckCompatibilityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CheckCompatibilityResponse. */ - interface ICheckCompatibilityResponse { - - /** CheckCompatibilityResponse dimensionCompatibilities */ - dimensionCompatibilities?: (google.analytics.data.v1beta.IDimensionCompatibility[]|null); - - /** CheckCompatibilityResponse metricCompatibilities */ - metricCompatibilities?: (google.analytics.data.v1beta.IMetricCompatibility[]|null); - } - - /** Represents a CheckCompatibilityResponse. */ - class CheckCompatibilityResponse implements ICheckCompatibilityResponse { - - /** - * Constructs a new CheckCompatibilityResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse); - - /** CheckCompatibilityResponse dimensionCompatibilities. */ - public dimensionCompatibilities: google.analytics.data.v1beta.IDimensionCompatibility[]; - - /** CheckCompatibilityResponse metricCompatibilities. */ - public metricCompatibilities: google.analytics.data.v1beta.IMetricCompatibility[]; - - /** - * Creates a new CheckCompatibilityResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckCompatibilityResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.ICheckCompatibilityResponse): google.analytics.data.v1beta.CheckCompatibilityResponse; - - /** - * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. - * @param message CheckCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. - * @param message CheckCompatibilityResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CheckCompatibilityResponse; - - /** - * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CheckCompatibilityResponse; - - /** - * Verifies a CheckCompatibilityResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckCompatibilityResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CheckCompatibilityResponse; - - /** - * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. - * @param message CheckCompatibilityResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CheckCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckCompatibilityResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckCompatibilityResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata name */ - name?: (string|null); - - /** Metadata dimensions */ - dimensions?: (google.analytics.data.v1beta.IDimensionMetadata[]|null); - - /** Metadata metrics */ - metrics?: (google.analytics.data.v1beta.IMetricMetadata[]|null); - - /** Metadata comparisons */ - comparisons?: (google.analytics.data.v1beta.IComparisonMetadata[]|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetadata); - - /** Metadata name. */ - public name: string; - - /** Metadata dimensions. */ - public dimensions: google.analytics.data.v1beta.IDimensionMetadata[]; - - /** Metadata metrics. */ - public metrics: google.analytics.data.v1beta.IMetricMetadata[]; - - /** Metadata comparisons. */ - public comparisons: google.analytics.data.v1beta.IComparisonMetadata[]; - - /** - * Creates a new Metadata instance using the specified properties. - * @param [properties] Properties to set - * @returns Metadata instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetadata): google.analytics.data.v1beta.Metadata; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunReportRequest. */ - interface IRunReportRequest { - - /** RunReportRequest property */ - property?: (string|null); - - /** RunReportRequest dimensions */ - dimensions?: (google.analytics.data.v1beta.IDimension[]|null); - - /** RunReportRequest metrics */ - metrics?: (google.analytics.data.v1beta.IMetric[]|null); - - /** RunReportRequest dateRanges */ - dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); - - /** RunReportRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunReportRequest metricFilter */ - metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunReportRequest offset */ - offset?: (number|Long|string|null); - - /** RunReportRequest limit */ - limit?: (number|Long|string|null); - - /** RunReportRequest metricAggregations */ - metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); - - /** RunReportRequest orderBys */ - orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); - - /** RunReportRequest currencyCode */ - currencyCode?: (string|null); - - /** RunReportRequest cohortSpec */ - cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); - - /** RunReportRequest keepEmptyRows */ - keepEmptyRows?: (boolean|null); - - /** RunReportRequest returnPropertyQuota */ - returnPropertyQuota?: (boolean|null); - - /** RunReportRequest comparisons */ - comparisons?: (google.analytics.data.v1beta.IComparison[]|null); - } - - /** Represents a RunReportRequest. */ - class RunReportRequest implements IRunReportRequest { - - /** - * Constructs a new RunReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunReportRequest); - - /** RunReportRequest property. */ - public property: string; - - /** RunReportRequest dimensions. */ - public dimensions: google.analytics.data.v1beta.IDimension[]; - - /** RunReportRequest metrics. */ - public metrics: google.analytics.data.v1beta.IMetric[]; - - /** RunReportRequest dateRanges. */ - public dateRanges: google.analytics.data.v1beta.IDateRange[]; - - /** RunReportRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunReportRequest metricFilter. */ - public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunReportRequest offset. */ - public offset: (number|Long|string); - - /** RunReportRequest limit. */ - public limit: (number|Long|string); - - /** RunReportRequest metricAggregations. */ - public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; - - /** RunReportRequest orderBys. */ - public orderBys: google.analytics.data.v1beta.IOrderBy[]; - - /** RunReportRequest currencyCode. */ - public currencyCode: string; - - /** RunReportRequest cohortSpec. */ - public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); - - /** RunReportRequest keepEmptyRows. */ - public keepEmptyRows: boolean; - - /** RunReportRequest returnPropertyQuota. */ - public returnPropertyQuota: boolean; - - /** RunReportRequest comparisons. */ - public comparisons: google.analytics.data.v1beta.IComparison[]; - - /** - * Creates a new RunReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunReportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunReportRequest): google.analytics.data.v1beta.RunReportRequest; - - /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. - * @param message RunReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunReportRequest; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunReportRequest; - - /** - * Verifies a RunReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportRequest; - - /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. - * @param message RunReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunReportResponse. */ - interface IRunReportResponse { - - /** RunReportResponse dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); - - /** RunReportResponse metricHeaders */ - metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); - - /** RunReportResponse rows */ - rows?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunReportResponse totals */ - totals?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunReportResponse maximums */ - maximums?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunReportResponse minimums */ - minimums?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunReportResponse rowCount */ - rowCount?: (number|null); - - /** RunReportResponse metadata */ - metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); - - /** RunReportResponse propertyQuota */ - propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunReportResponse kind */ - kind?: (string|null); - } - - /** Represents a RunReportResponse. */ - class RunReportResponse implements IRunReportResponse { - - /** - * Constructs a new RunReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunReportResponse); - - /** RunReportResponse dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; - - /** RunReportResponse metricHeaders. */ - public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; - - /** RunReportResponse rows. */ - public rows: google.analytics.data.v1beta.IRow[]; - - /** RunReportResponse totals. */ - public totals: google.analytics.data.v1beta.IRow[]; - - /** RunReportResponse maximums. */ - public maximums: google.analytics.data.v1beta.IRow[]; - - /** RunReportResponse minimums. */ - public minimums: google.analytics.data.v1beta.IRow[]; - - /** RunReportResponse rowCount. */ - public rowCount: number; - - /** RunReportResponse metadata. */ - public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); - - /** RunReportResponse propertyQuota. */ - public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunReportResponse kind. */ - public kind: string; - - /** - * Creates a new RunReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunReportResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunReportResponse): google.analytics.data.v1beta.RunReportResponse; - - /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. - * @param message RunReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunReportResponse; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunReportResponse; - - /** - * Verifies a RunReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunReportResponse; - - /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. - * @param message RunReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunPivotReportRequest. */ - interface IRunPivotReportRequest { - - /** RunPivotReportRequest property */ - property?: (string|null); - - /** RunPivotReportRequest dimensions */ - dimensions?: (google.analytics.data.v1beta.IDimension[]|null); - - /** RunPivotReportRequest metrics */ - metrics?: (google.analytics.data.v1beta.IMetric[]|null); - - /** RunPivotReportRequest dateRanges */ - dateRanges?: (google.analytics.data.v1beta.IDateRange[]|null); - - /** RunPivotReportRequest pivots */ - pivots?: (google.analytics.data.v1beta.IPivot[]|null); - - /** RunPivotReportRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunPivotReportRequest metricFilter */ - metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunPivotReportRequest currencyCode */ - currencyCode?: (string|null); - - /** RunPivotReportRequest cohortSpec */ - cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); - - /** RunPivotReportRequest keepEmptyRows */ - keepEmptyRows?: (boolean|null); - - /** RunPivotReportRequest returnPropertyQuota */ - returnPropertyQuota?: (boolean|null); - - /** RunPivotReportRequest comparisons */ - comparisons?: (google.analytics.data.v1beta.IComparison[]|null); - } - - /** Represents a RunPivotReportRequest. */ - class RunPivotReportRequest implements IRunPivotReportRequest { - - /** - * Constructs a new RunPivotReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunPivotReportRequest); - - /** RunPivotReportRequest property. */ - public property: string; - - /** RunPivotReportRequest dimensions. */ - public dimensions: google.analytics.data.v1beta.IDimension[]; - - /** RunPivotReportRequest metrics. */ - public metrics: google.analytics.data.v1beta.IMetric[]; - - /** RunPivotReportRequest dateRanges. */ - public dateRanges: google.analytics.data.v1beta.IDateRange[]; - - /** RunPivotReportRequest pivots. */ - public pivots: google.analytics.data.v1beta.IPivot[]; - - /** RunPivotReportRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunPivotReportRequest metricFilter. */ - public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunPivotReportRequest currencyCode. */ - public currencyCode: string; - - /** RunPivotReportRequest cohortSpec. */ - public cohortSpec?: (google.analytics.data.v1beta.ICohortSpec|null); - - /** RunPivotReportRequest keepEmptyRows. */ - public keepEmptyRows: boolean; - - /** RunPivotReportRequest returnPropertyQuota. */ - public returnPropertyQuota: boolean; - - /** RunPivotReportRequest comparisons. */ - public comparisons: google.analytics.data.v1beta.IComparison[]; - - /** - * Creates a new RunPivotReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunPivotReportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunPivotReportRequest): google.analytics.data.v1beta.RunPivotReportRequest; - - /** - * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. - * @param message RunPivotReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. - * @param message RunPivotReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunPivotReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunPivotReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunPivotReportRequest; - - /** - * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunPivotReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunPivotReportRequest; - - /** - * Verifies a RunPivotReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunPivotReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportRequest; - - /** - * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. - * @param message RunPivotReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunPivotReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunPivotReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunPivotReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunPivotReportResponse. */ - interface IRunPivotReportResponse { - - /** RunPivotReportResponse pivotHeaders */ - pivotHeaders?: (google.analytics.data.v1beta.IPivotHeader[]|null); - - /** RunPivotReportResponse dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); - - /** RunPivotReportResponse metricHeaders */ - metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); - - /** RunPivotReportResponse rows */ - rows?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunPivotReportResponse aggregates */ - aggregates?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunPivotReportResponse metadata */ - metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); - - /** RunPivotReportResponse propertyQuota */ - propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunPivotReportResponse kind */ - kind?: (string|null); - } - - /** Represents a RunPivotReportResponse. */ - class RunPivotReportResponse implements IRunPivotReportResponse { - - /** - * Constructs a new RunPivotReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunPivotReportResponse); - - /** RunPivotReportResponse pivotHeaders. */ - public pivotHeaders: google.analytics.data.v1beta.IPivotHeader[]; - - /** RunPivotReportResponse dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; - - /** RunPivotReportResponse metricHeaders. */ - public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; - - /** RunPivotReportResponse rows. */ - public rows: google.analytics.data.v1beta.IRow[]; - - /** RunPivotReportResponse aggregates. */ - public aggregates: google.analytics.data.v1beta.IRow[]; - - /** RunPivotReportResponse metadata. */ - public metadata?: (google.analytics.data.v1beta.IResponseMetaData|null); - - /** RunPivotReportResponse propertyQuota. */ - public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunPivotReportResponse kind. */ - public kind: string; - - /** - * Creates a new RunPivotReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunPivotReportResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunPivotReportResponse): google.analytics.data.v1beta.RunPivotReportResponse; - - /** - * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. - * @param message RunPivotReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. - * @param message RunPivotReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunPivotReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunPivotReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunPivotReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunPivotReportResponse; - - /** - * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunPivotReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunPivotReportResponse; - - /** - * Verifies a RunPivotReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunPivotReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunPivotReportResponse; - - /** - * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. - * @param message RunPivotReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunPivotReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunPivotReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunPivotReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchRunReportsRequest. */ - interface IBatchRunReportsRequest { - - /** BatchRunReportsRequest property */ - property?: (string|null); - - /** BatchRunReportsRequest requests */ - requests?: (google.analytics.data.v1beta.IRunReportRequest[]|null); - } - - /** Represents a BatchRunReportsRequest. */ - class BatchRunReportsRequest implements IBatchRunReportsRequest { - - /** - * Constructs a new BatchRunReportsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest); - - /** BatchRunReportsRequest property. */ - public property: string; - - /** BatchRunReportsRequest requests. */ - public requests: google.analytics.data.v1beta.IRunReportRequest[]; - - /** - * Creates a new BatchRunReportsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchRunReportsRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsRequest): google.analytics.data.v1beta.BatchRunReportsRequest; - - /** - * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. - * @param message BatchRunReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. - * @param message BatchRunReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchRunReportsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchRunReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunReportsRequest; - - /** - * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchRunReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunReportsRequest; - - /** - * Verifies a BatchRunReportsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchRunReportsRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsRequest; - - /** - * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. - * @param message BatchRunReportsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.BatchRunReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchRunReportsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchRunReportsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchRunReportsResponse. */ - interface IBatchRunReportsResponse { - - /** BatchRunReportsResponse reports */ - reports?: (google.analytics.data.v1beta.IRunReportResponse[]|null); - - /** BatchRunReportsResponse kind */ - kind?: (string|null); - } - - /** Represents a BatchRunReportsResponse. */ - class BatchRunReportsResponse implements IBatchRunReportsResponse { - - /** - * Constructs a new BatchRunReportsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse); - - /** BatchRunReportsResponse reports. */ - public reports: google.analytics.data.v1beta.IRunReportResponse[]; - - /** BatchRunReportsResponse kind. */ - public kind: string; - - /** - * Creates a new BatchRunReportsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchRunReportsResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IBatchRunReportsResponse): google.analytics.data.v1beta.BatchRunReportsResponse; - - /** - * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. - * @param message BatchRunReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. - * @param message BatchRunReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchRunReportsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchRunReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunReportsResponse; - - /** - * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchRunReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunReportsResponse; - - /** - * Verifies a BatchRunReportsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchRunReportsResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunReportsResponse; - - /** - * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. - * @param message BatchRunReportsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.BatchRunReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchRunReportsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchRunReportsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchRunPivotReportsRequest. */ - interface IBatchRunPivotReportsRequest { - - /** BatchRunPivotReportsRequest property */ - property?: (string|null); - - /** BatchRunPivotReportsRequest requests */ - requests?: (google.analytics.data.v1beta.IRunPivotReportRequest[]|null); - } - - /** Represents a BatchRunPivotReportsRequest. */ - class BatchRunPivotReportsRequest implements IBatchRunPivotReportsRequest { - - /** - * Constructs a new BatchRunPivotReportsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest); - - /** BatchRunPivotReportsRequest property. */ - public property: string; - - /** BatchRunPivotReportsRequest requests. */ - public requests: google.analytics.data.v1beta.IRunPivotReportRequest[]; - - /** - * Creates a new BatchRunPivotReportsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchRunPivotReportsRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsRequest): google.analytics.data.v1beta.BatchRunPivotReportsRequest; - - /** - * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. - * @param message BatchRunPivotReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. - * @param message BatchRunPivotReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchRunPivotReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunPivotReportsRequest; - - /** - * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchRunPivotReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunPivotReportsRequest; - - /** - * Verifies a BatchRunPivotReportsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchRunPivotReportsRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsRequest; - - /** - * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. - * @param message BatchRunPivotReportsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchRunPivotReportsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchRunPivotReportsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BatchRunPivotReportsResponse. */ - interface IBatchRunPivotReportsResponse { - - /** BatchRunPivotReportsResponse pivotReports */ - pivotReports?: (google.analytics.data.v1beta.IRunPivotReportResponse[]|null); - - /** BatchRunPivotReportsResponse kind */ - kind?: (string|null); - } - - /** Represents a BatchRunPivotReportsResponse. */ - class BatchRunPivotReportsResponse implements IBatchRunPivotReportsResponse { - - /** - * Constructs a new BatchRunPivotReportsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse); - - /** BatchRunPivotReportsResponse pivotReports. */ - public pivotReports: google.analytics.data.v1beta.IRunPivotReportResponse[]; - - /** BatchRunPivotReportsResponse kind. */ - public kind: string; - - /** - * Creates a new BatchRunPivotReportsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchRunPivotReportsResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IBatchRunPivotReportsResponse): google.analytics.data.v1beta.BatchRunPivotReportsResponse; - - /** - * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. - * @param message BatchRunPivotReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. - * @param message BatchRunPivotReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IBatchRunPivotReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchRunPivotReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.BatchRunPivotReportsResponse; - - /** - * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchRunPivotReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.BatchRunPivotReportsResponse; - - /** - * Verifies a BatchRunPivotReportsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchRunPivotReportsResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.BatchRunPivotReportsResponse; - - /** - * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. - * @param message BatchRunPivotReportsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.BatchRunPivotReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchRunPivotReportsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchRunPivotReportsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMetadataRequest. */ - interface IGetMetadataRequest { - - /** GetMetadataRequest name */ - name?: (string|null); - } - - /** Represents a GetMetadataRequest. */ - class GetMetadataRequest implements IGetMetadataRequest { - - /** - * Constructs a new GetMetadataRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IGetMetadataRequest); - - /** GetMetadataRequest name. */ - public name: string; - - /** - * Creates a new GetMetadataRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMetadataRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IGetMetadataRequest): google.analytics.data.v1beta.GetMetadataRequest; - - /** - * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. - * @param message GetMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. - * @param message GetMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.GetMetadataRequest; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.GetMetadataRequest; - - /** - * Verifies a GetMetadataRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMetadataRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetMetadataRequest; - - /** - * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. - * @param message GetMetadataRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMetadataRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMetadataRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunRealtimeReportRequest. */ - interface IRunRealtimeReportRequest { - - /** RunRealtimeReportRequest property */ - property?: (string|null); - - /** RunRealtimeReportRequest dimensions */ - dimensions?: (google.analytics.data.v1beta.IDimension[]|null); - - /** RunRealtimeReportRequest metrics */ - metrics?: (google.analytics.data.v1beta.IMetric[]|null); - - /** RunRealtimeReportRequest dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunRealtimeReportRequest metricFilter */ - metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunRealtimeReportRequest limit */ - limit?: (number|Long|string|null); - - /** RunRealtimeReportRequest metricAggregations */ - metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); - - /** RunRealtimeReportRequest orderBys */ - orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); - - /** RunRealtimeReportRequest returnPropertyQuota */ - returnPropertyQuota?: (boolean|null); - - /** RunRealtimeReportRequest minuteRanges */ - minuteRanges?: (google.analytics.data.v1beta.IMinuteRange[]|null); - } - - /** Represents a RunRealtimeReportRequest. */ - class RunRealtimeReportRequest implements IRunRealtimeReportRequest { - - /** - * Constructs a new RunRealtimeReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest); - - /** RunRealtimeReportRequest property. */ - public property: string; - - /** RunRealtimeReportRequest dimensions. */ - public dimensions: google.analytics.data.v1beta.IDimension[]; - - /** RunRealtimeReportRequest metrics. */ - public metrics: google.analytics.data.v1beta.IMetric[]; - - /** RunRealtimeReportRequest dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunRealtimeReportRequest metricFilter. */ - public metricFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** RunRealtimeReportRequest limit. */ - public limit: (number|Long|string); - - /** RunRealtimeReportRequest metricAggregations. */ - public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; - - /** RunRealtimeReportRequest orderBys. */ - public orderBys: google.analytics.data.v1beta.IOrderBy[]; - - /** RunRealtimeReportRequest returnPropertyQuota. */ - public returnPropertyQuota: boolean; - - /** RunRealtimeReportRequest minuteRanges. */ - public minuteRanges: google.analytics.data.v1beta.IMinuteRange[]; - - /** - * Creates a new RunRealtimeReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunRealtimeReportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportRequest): google.analytics.data.v1beta.RunRealtimeReportRequest; - - /** - * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. - * @param message RunRealtimeReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. - * @param message RunRealtimeReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunRealtimeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunRealtimeReportRequest; - - /** - * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunRealtimeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunRealtimeReportRequest; - - /** - * Verifies a RunRealtimeReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunRealtimeReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportRequest; - - /** - * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. - * @param message RunRealtimeReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunRealtimeReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunRealtimeReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunRealtimeReportResponse. */ - interface IRunRealtimeReportResponse { - - /** RunRealtimeReportResponse dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1beta.IDimensionHeader[]|null); - - /** RunRealtimeReportResponse metricHeaders */ - metricHeaders?: (google.analytics.data.v1beta.IMetricHeader[]|null); - - /** RunRealtimeReportResponse rows */ - rows?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunRealtimeReportResponse totals */ - totals?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunRealtimeReportResponse maximums */ - maximums?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunRealtimeReportResponse minimums */ - minimums?: (google.analytics.data.v1beta.IRow[]|null); - - /** RunRealtimeReportResponse rowCount */ - rowCount?: (number|null); - - /** RunRealtimeReportResponse propertyQuota */ - propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunRealtimeReportResponse kind */ - kind?: (string|null); - } - - /** Represents a RunRealtimeReportResponse. */ - class RunRealtimeReportResponse implements IRunRealtimeReportResponse { - - /** - * Constructs a new RunRealtimeReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse); - - /** RunRealtimeReportResponse dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1beta.IDimensionHeader[]; - - /** RunRealtimeReportResponse metricHeaders. */ - public metricHeaders: google.analytics.data.v1beta.IMetricHeader[]; - - /** RunRealtimeReportResponse rows. */ - public rows: google.analytics.data.v1beta.IRow[]; - - /** RunRealtimeReportResponse totals. */ - public totals: google.analytics.data.v1beta.IRow[]; - - /** RunRealtimeReportResponse maximums. */ - public maximums: google.analytics.data.v1beta.IRow[]; - - /** RunRealtimeReportResponse minimums. */ - public minimums: google.analytics.data.v1beta.IRow[]; - - /** RunRealtimeReportResponse rowCount. */ - public rowCount: number; - - /** RunRealtimeReportResponse propertyQuota. */ - public propertyQuota?: (google.analytics.data.v1beta.IPropertyQuota|null); - - /** RunRealtimeReportResponse kind. */ - public kind: string; - - /** - * Creates a new RunRealtimeReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunRealtimeReportResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IRunRealtimeReportResponse): google.analytics.data.v1beta.RunRealtimeReportResponse; - - /** - * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. - * @param message RunRealtimeReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. - * @param message RunRealtimeReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRunRealtimeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunRealtimeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.RunRealtimeReportResponse; - - /** - * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunRealtimeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.RunRealtimeReportResponse; - - /** - * Verifies a RunRealtimeReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunRealtimeReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.RunRealtimeReportResponse; - - /** - * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. - * @param message RunRealtimeReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.RunRealtimeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunRealtimeReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunRealtimeReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAudienceExportRequest. */ - interface IGetAudienceExportRequest { - - /** GetAudienceExportRequest name */ - name?: (string|null); - } - - /** Represents a GetAudienceExportRequest. */ - class GetAudienceExportRequest implements IGetAudienceExportRequest { - - /** - * Constructs a new GetAudienceExportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest); - - /** GetAudienceExportRequest name. */ - public name: string; - - /** - * Creates a new GetAudienceExportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAudienceExportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IGetAudienceExportRequest): google.analytics.data.v1beta.GetAudienceExportRequest; - - /** - * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. - * @param message GetAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. - * @param message GetAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IGetAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAudienceExportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.GetAudienceExportRequest; - - /** - * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.GetAudienceExportRequest; - - /** - * Verifies a GetAudienceExportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAudienceExportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.GetAudienceExportRequest; - - /** - * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. - * @param message GetAudienceExportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.GetAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAudienceExportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAudienceExportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAudienceExportsRequest. */ - interface IListAudienceExportsRequest { - - /** ListAudienceExportsRequest parent */ - parent?: (string|null); - - /** ListAudienceExportsRequest pageSize */ - pageSize?: (number|null); - - /** ListAudienceExportsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListAudienceExportsRequest. */ - class ListAudienceExportsRequest implements IListAudienceExportsRequest { - - /** - * Constructs a new ListAudienceExportsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest); - - /** ListAudienceExportsRequest parent. */ - public parent: string; - - /** ListAudienceExportsRequest pageSize. */ - public pageSize: number; - - /** ListAudienceExportsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListAudienceExportsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAudienceExportsRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsRequest): google.analytics.data.v1beta.ListAudienceExportsRequest; - - /** - * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. - * @param message ListAudienceExportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. - * @param message ListAudienceExportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAudienceExportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ListAudienceExportsRequest; - - /** - * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAudienceExportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ListAudienceExportsRequest; - - /** - * Verifies a ListAudienceExportsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAudienceExportsRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsRequest; - - /** - * Creates a plain object from a ListAudienceExportsRequest message. Also converts values to other types if specified. - * @param message ListAudienceExportsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAudienceExportsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAudienceExportsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAudienceExportsResponse. */ - interface IListAudienceExportsResponse { - - /** ListAudienceExportsResponse audienceExports */ - audienceExports?: (google.analytics.data.v1beta.IAudienceExport[]|null); - - /** ListAudienceExportsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListAudienceExportsResponse. */ - class ListAudienceExportsResponse implements IListAudienceExportsResponse { - - /** - * Constructs a new ListAudienceExportsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse); - - /** ListAudienceExportsResponse audienceExports. */ - public audienceExports: google.analytics.data.v1beta.IAudienceExport[]; - - /** ListAudienceExportsResponse nextPageToken. */ - public nextPageToken?: (string|null); - - /** - * Creates a new ListAudienceExportsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAudienceExportsResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IListAudienceExportsResponse): google.analytics.data.v1beta.ListAudienceExportsResponse; - - /** - * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. - * @param message ListAudienceExportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. - * @param message ListAudienceExportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IListAudienceExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAudienceExportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ListAudienceExportsResponse; - - /** - * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAudienceExportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ListAudienceExportsResponse; - - /** - * Verifies a ListAudienceExportsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAudienceExportsResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ListAudienceExportsResponse; - - /** - * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. - * @param message ListAudienceExportsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ListAudienceExportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAudienceExportsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAudienceExportsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAudienceExportRequest. */ - interface ICreateAudienceExportRequest { - - /** CreateAudienceExportRequest parent */ - parent?: (string|null); - - /** CreateAudienceExportRequest audienceExport */ - audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); - } - - /** Represents a CreateAudienceExportRequest. */ - class CreateAudienceExportRequest implements ICreateAudienceExportRequest { - - /** - * Constructs a new CreateAudienceExportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest); - - /** CreateAudienceExportRequest parent. */ - public parent: string; - - /** CreateAudienceExportRequest audienceExport. */ - public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); - - /** - * Creates a new CreateAudienceExportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAudienceExportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.ICreateAudienceExportRequest): google.analytics.data.v1beta.CreateAudienceExportRequest; - - /** - * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. - * @param message CreateAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. - * @param message CreateAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICreateAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CreateAudienceExportRequest; - - /** - * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CreateAudienceExportRequest; - - /** - * Verifies a CreateAudienceExportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAudienceExportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CreateAudienceExportRequest; - - /** - * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. - * @param message CreateAudienceExportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CreateAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateAudienceExportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateAudienceExportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceExport. */ - interface IAudienceExport { - - /** AudienceExport name */ - name?: (string|null); - - /** AudienceExport audience */ - audience?: (string|null); - - /** AudienceExport audienceDisplayName */ - audienceDisplayName?: (string|null); - - /** AudienceExport dimensions */ - dimensions?: (google.analytics.data.v1beta.IAudienceDimension[]|null); - - /** AudienceExport state */ - state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); - - /** AudienceExport beginCreatingTime */ - beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** AudienceExport creationQuotaTokensCharged */ - creationQuotaTokensCharged?: (number|null); - - /** AudienceExport rowCount */ - rowCount?: (number|null); - - /** AudienceExport errorMessage */ - errorMessage?: (string|null); - - /** AudienceExport percentageCompleted */ - percentageCompleted?: (number|null); - } - - /** Represents an AudienceExport. */ - class AudienceExport implements IAudienceExport { - - /** - * Constructs a new AudienceExport. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IAudienceExport); - - /** AudienceExport name. */ - public name: string; - - /** AudienceExport audience. */ - public audience: string; - - /** AudienceExport audienceDisplayName. */ - public audienceDisplayName: string; - - /** AudienceExport dimensions. */ - public dimensions: google.analytics.data.v1beta.IAudienceDimension[]; - - /** AudienceExport state. */ - public state?: (google.analytics.data.v1beta.AudienceExport.State|keyof typeof google.analytics.data.v1beta.AudienceExport.State|null); - - /** AudienceExport beginCreatingTime. */ - public beginCreatingTime?: (google.protobuf.ITimestamp|null); - - /** AudienceExport creationQuotaTokensCharged. */ - public creationQuotaTokensCharged: number; - - /** AudienceExport rowCount. */ - public rowCount?: (number|null); - - /** AudienceExport errorMessage. */ - public errorMessage?: (string|null); - - /** AudienceExport percentageCompleted. */ - public percentageCompleted?: (number|null); - - /** - * Creates a new AudienceExport instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceExport instance - */ - public static create(properties?: google.analytics.data.v1beta.IAudienceExport): google.analytics.data.v1beta.AudienceExport; - - /** - * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. - * @param message AudienceExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. - * @param message AudienceExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceExport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceExport; - - /** - * Decodes an AudienceExport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceExport; - - /** - * Verifies an AudienceExport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceExport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceExport - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExport; - - /** - * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. - * @param message AudienceExport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.AudienceExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceExport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceExport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AudienceExport { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - FAILED = 3 - } - } - - /** Properties of an AudienceExportMetadata. */ - interface IAudienceExportMetadata { - } - - /** Represents an AudienceExportMetadata. */ - class AudienceExportMetadata implements IAudienceExportMetadata { - - /** - * Constructs a new AudienceExportMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IAudienceExportMetadata); - - /** - * Creates a new AudienceExportMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceExportMetadata instance - */ - public static create(properties?: google.analytics.data.v1beta.IAudienceExportMetadata): google.analytics.data.v1beta.AudienceExportMetadata; - - /** - * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. - * @param message AudienceExportMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. - * @param message AudienceExportMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceExportMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceExportMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceExportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceExportMetadata; - - /** - * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceExportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceExportMetadata; - - /** - * Verifies an AudienceExportMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceExportMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceExportMetadata; - - /** - * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. - * @param message AudienceExportMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.AudienceExportMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceExportMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceExportMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryAudienceExportRequest. */ - interface IQueryAudienceExportRequest { - - /** QueryAudienceExportRequest name */ - name?: (string|null); - - /** QueryAudienceExportRequest offset */ - offset?: (number|Long|string|null); - - /** QueryAudienceExportRequest limit */ - limit?: (number|Long|string|null); - } - - /** Represents a QueryAudienceExportRequest. */ - class QueryAudienceExportRequest implements IQueryAudienceExportRequest { - - /** - * Constructs a new QueryAudienceExportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest); - - /** QueryAudienceExportRequest name. */ - public name: string; - - /** QueryAudienceExportRequest offset. */ - public offset: (number|Long|string); - - /** QueryAudienceExportRequest limit. */ - public limit: (number|Long|string); - - /** - * Creates a new QueryAudienceExportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAudienceExportRequest instance - */ - public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportRequest): google.analytics.data.v1beta.QueryAudienceExportRequest; - - /** - * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. - * @param message QueryAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. - * @param message QueryAudienceExportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QueryAudienceExportRequest; - - /** - * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QueryAudienceExportRequest; - - /** - * Verifies a QueryAudienceExportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAudienceExportRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportRequest; - - /** - * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. - * @param message QueryAudienceExportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAudienceExportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryAudienceExportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryAudienceExportResponse. */ - interface IQueryAudienceExportResponse { - - /** QueryAudienceExportResponse audienceExport */ - audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); - - /** QueryAudienceExportResponse audienceRows */ - audienceRows?: (google.analytics.data.v1beta.IAudienceRow[]|null); - - /** QueryAudienceExportResponse rowCount */ - rowCount?: (number|null); - } - - /** Represents a QueryAudienceExportResponse. */ - class QueryAudienceExportResponse implements IQueryAudienceExportResponse { - - /** - * Constructs a new QueryAudienceExportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse); - - /** QueryAudienceExportResponse audienceExport. */ - public audienceExport?: (google.analytics.data.v1beta.IAudienceExport|null); - - /** QueryAudienceExportResponse audienceRows. */ - public audienceRows: google.analytics.data.v1beta.IAudienceRow[]; - - /** QueryAudienceExportResponse rowCount. */ - public rowCount?: (number|null); - - /** - * Creates a new QueryAudienceExportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAudienceExportResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.IQueryAudienceExportResponse): google.analytics.data.v1beta.QueryAudienceExportResponse; - - /** - * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. - * @param message QueryAudienceExportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. - * @param message QueryAudienceExportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IQueryAudienceExportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAudienceExportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QueryAudienceExportResponse; - - /** - * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAudienceExportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QueryAudienceExportResponse; - - /** - * Verifies a QueryAudienceExportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAudienceExportResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QueryAudienceExportResponse; - - /** - * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. - * @param message QueryAudienceExportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.QueryAudienceExportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAudienceExportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryAudienceExportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceRow. */ - interface IAudienceRow { - - /** AudienceRow dimensionValues */ - dimensionValues?: (google.analytics.data.v1beta.IAudienceDimensionValue[]|null); - } - - /** Represents an AudienceRow. */ - class AudienceRow implements IAudienceRow { - - /** - * Constructs a new AudienceRow. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IAudienceRow); - - /** AudienceRow dimensionValues. */ - public dimensionValues: google.analytics.data.v1beta.IAudienceDimensionValue[]; - - /** - * Creates a new AudienceRow instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceRow instance - */ - public static create(properties?: google.analytics.data.v1beta.IAudienceRow): google.analytics.data.v1beta.AudienceRow; - - /** - * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. - * @param message AudienceRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. - * @param message AudienceRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceRow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceRow; - - /** - * Decodes an AudienceRow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceRow; - - /** - * Verifies an AudienceRow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceRow - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceRow; - - /** - * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. - * @param message AudienceRow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.AudienceRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceRow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceRow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceDimension. */ - interface IAudienceDimension { - - /** AudienceDimension dimensionName */ - dimensionName?: (string|null); - } - - /** Represents an AudienceDimension. */ - class AudienceDimension implements IAudienceDimension { - - /** - * Constructs a new AudienceDimension. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IAudienceDimension); - - /** AudienceDimension dimensionName. */ - public dimensionName: string; - - /** - * Creates a new AudienceDimension instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceDimension instance - */ - public static create(properties?: google.analytics.data.v1beta.IAudienceDimension): google.analytics.data.v1beta.AudienceDimension; - - /** - * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. - * @param message AudienceDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. - * @param message AudienceDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceDimension; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceDimension; - - /** - * Verifies an AudienceDimension message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceDimension - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimension; - - /** - * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. - * @param message AudienceDimension - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.AudienceDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceDimension to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceDimension - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceDimensionValue. */ - interface IAudienceDimensionValue { - - /** AudienceDimensionValue value */ - value?: (string|null); - } - - /** Represents an AudienceDimensionValue. */ - class AudienceDimensionValue implements IAudienceDimensionValue { - - /** - * Constructs a new AudienceDimensionValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IAudienceDimensionValue); - - /** AudienceDimensionValue value. */ - public value?: (string|null); - - /** AudienceDimensionValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new AudienceDimensionValue instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceDimensionValue instance - */ - public static create(properties?: google.analytics.data.v1beta.IAudienceDimensionValue): google.analytics.data.v1beta.AudienceDimensionValue; - - /** - * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. - * @param message AudienceDimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. - * @param message AudienceDimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IAudienceDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.AudienceDimensionValue; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.AudienceDimensionValue; - - /** - * Verifies an AudienceDimensionValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceDimensionValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.AudienceDimensionValue; - - /** - * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. - * @param message AudienceDimensionValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.AudienceDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceDimensionValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceDimensionValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DateRange. */ - interface IDateRange { - - /** DateRange startDate */ - startDate?: (string|null); - - /** DateRange endDate */ - endDate?: (string|null); - - /** DateRange name */ - name?: (string|null); - } - - /** Represents a DateRange. */ - class DateRange implements IDateRange { - - /** - * Constructs a new DateRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDateRange); - - /** DateRange startDate. */ - public startDate: string; - - /** DateRange endDate. */ - public endDate: string; - - /** DateRange name. */ - public name: string; - - /** - * Creates a new DateRange instance using the specified properties. - * @param [properties] Properties to set - * @returns DateRange instance - */ - public static create(properties?: google.analytics.data.v1beta.IDateRange): google.analytics.data.v1beta.DateRange; - - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DateRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DateRange; - - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DateRange; - - /** - * Verifies a DateRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DateRange - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DateRange; - - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @param message DateRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DateRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DateRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MinuteRange. */ - interface IMinuteRange { - - /** MinuteRange startMinutesAgo */ - startMinutesAgo?: (number|null); - - /** MinuteRange endMinutesAgo */ - endMinutesAgo?: (number|null); - - /** MinuteRange name */ - name?: (string|null); - } - - /** Represents a MinuteRange. */ - class MinuteRange implements IMinuteRange { - - /** - * Constructs a new MinuteRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMinuteRange); - - /** MinuteRange startMinutesAgo. */ - public startMinutesAgo?: (number|null); - - /** MinuteRange endMinutesAgo. */ - public endMinutesAgo?: (number|null); - - /** MinuteRange name. */ - public name: string; - - /** - * Creates a new MinuteRange instance using the specified properties. - * @param [properties] Properties to set - * @returns MinuteRange instance - */ - public static create(properties?: google.analytics.data.v1beta.IMinuteRange): google.analytics.data.v1beta.MinuteRange; - - /** - * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. - * @param message MinuteRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. - * @param message MinuteRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMinuteRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MinuteRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MinuteRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MinuteRange; - - /** - * Decodes a MinuteRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MinuteRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MinuteRange; - - /** - * Verifies a MinuteRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MinuteRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MinuteRange - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MinuteRange; - - /** - * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. - * @param message MinuteRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.MinuteRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MinuteRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MinuteRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Dimension. */ - interface IDimension { - - /** Dimension name */ - name?: (string|null); - - /** Dimension dimensionExpression */ - dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); - } - - /** Represents a Dimension. */ - class Dimension implements IDimension { - - /** - * Constructs a new Dimension. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimension); - - /** Dimension name. */ - public name: string; - - /** Dimension dimensionExpression. */ - public dimensionExpression?: (google.analytics.data.v1beta.IDimensionExpression|null); - - /** - * Creates a new Dimension instance using the specified properties. - * @param [properties] Properties to set - * @returns Dimension instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimension): google.analytics.data.v1beta.Dimension; - - /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Dimension message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Dimension; - - /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Dimension; - - /** - * Verifies a Dimension message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dimension - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Dimension; - - /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @param message Dimension - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Dimension to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Dimension - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionExpression. */ - interface IDimensionExpression { - - /** DimensionExpression lowerCase */ - lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase */ - upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression concatenate */ - concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); - } - - /** Represents a DimensionExpression. */ - class DimensionExpression implements IDimensionExpression { - - /** - * Constructs a new DimensionExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimensionExpression); - - /** DimensionExpression lowerCase. */ - public lowerCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase. */ - public upperCase?: (google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression concatenate. */ - public concatenate?: (google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null); - - /** DimensionExpression oneExpression. */ - public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); - - /** - * Creates a new DimensionExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionExpression instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimensionExpression): google.analytics.data.v1beta.DimensionExpression; - - /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression; - - /** - * Verifies a DimensionExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression; - - /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. - * @param message DimensionExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DimensionExpression { - - /** Properties of a CaseExpression. */ - interface ICaseExpression { - - /** CaseExpression dimensionName */ - dimensionName?: (string|null); - } - - /** Represents a CaseExpression. */ - class CaseExpression implements ICaseExpression { - - /** - * Constructs a new CaseExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression); - - /** CaseExpression dimensionName. */ - public dimensionName: string; - - /** - * Creates a new CaseExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns CaseExpression instance - */ - public static create(properties?: google.analytics.data.v1beta.DimensionExpression.ICaseExpression): google.analytics.data.v1beta.DimensionExpression.CaseExpression; - - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression.CaseExpression; - - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression.CaseExpression; - - /** - * Verifies a CaseExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CaseExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.CaseExpression; - - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @param message CaseExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CaseExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CaseExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConcatenateExpression. */ - interface IConcatenateExpression { - - /** ConcatenateExpression dimensionNames */ - dimensionNames?: (string[]|null); - - /** ConcatenateExpression delimiter */ - delimiter?: (string|null); - } - - /** Represents a ConcatenateExpression. */ - class ConcatenateExpression implements IConcatenateExpression { - - /** - * Constructs a new ConcatenateExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression); - - /** ConcatenateExpression dimensionNames. */ - public dimensionNames: string[]; - - /** ConcatenateExpression delimiter. */ - public delimiter: string; - - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns ConcatenateExpression instance - */ - public static create(properties?: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; - - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; - - /** - * Verifies a ConcatenateExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConcatenateExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @param message ConcatenateExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConcatenateExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConcatenateExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric expression */ - expression?: (string|null); - - /** Metric invisible */ - invisible?: (boolean|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetric); - - /** Metric name. */ - public name: string; - - /** Metric expression. */ - public expression: string; - - /** Metric invisible. */ - public invisible: boolean; - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetric): google.analytics.data.v1beta.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Metric; - - /** - * Verifies a Metric message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Comparison. */ - interface IComparison { - - /** Comparison name */ - name?: (string|null); - - /** Comparison dimensionFilter */ - dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** Comparison comparison */ - comparison?: (string|null); - } - - /** Represents a Comparison. */ - class Comparison implements IComparison { - - /** - * Constructs a new Comparison. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IComparison); - - /** Comparison name. */ - public name?: (string|null); - - /** Comparison dimensionFilter. */ - public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** Comparison comparison. */ - public comparison?: (string|null); - - /** Comparison oneComparison. */ - public oneComparison?: ("dimensionFilter"|"comparison"); - - /** - * Creates a new Comparison instance using the specified properties. - * @param [properties] Properties to set - * @returns Comparison instance - */ - public static create(properties?: google.analytics.data.v1beta.IComparison): google.analytics.data.v1beta.Comparison; - - /** - * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. - * @param message Comparison message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. - * @param message Comparison message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Comparison message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Comparison; - - /** - * Decodes a Comparison message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Comparison; - - /** - * Verifies a Comparison message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Comparison message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Comparison - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Comparison; - - /** - * Creates a plain object from a Comparison message. Also converts values to other types if specified. - * @param message Comparison - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Comparison to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Comparison - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FilterExpression. */ - interface IFilterExpression { - - /** FilterExpression andGroup */ - andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); - - /** FilterExpression orGroup */ - orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); - - /** FilterExpression notExpression */ - notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** FilterExpression filter */ - filter?: (google.analytics.data.v1beta.IFilter|null); - } - - /** Represents a FilterExpression. */ - class FilterExpression implements IFilterExpression { - - /** - * Constructs a new FilterExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IFilterExpression); - - /** FilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); - - /** FilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1beta.IFilterExpressionList|null); - - /** FilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1beta.IFilterExpression|null); - - /** FilterExpression filter. */ - public filter?: (google.analytics.data.v1beta.IFilter|null); - - /** FilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); - - /** - * Creates a new FilterExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterExpression instance - */ - public static create(properties?: google.analytics.data.v1beta.IFilterExpression): google.analytics.data.v1beta.FilterExpression; - - /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.FilterExpression; - - /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.FilterExpression; - - /** - * Verifies a FilterExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpression; - - /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. - * @param message FilterExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilterExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FilterExpressionList. */ - interface IFilterExpressionList { - - /** FilterExpressionList expressions */ - expressions?: (google.analytics.data.v1beta.IFilterExpression[]|null); - } - - /** Represents a FilterExpressionList. */ - class FilterExpressionList implements IFilterExpressionList { - - /** - * Constructs a new FilterExpressionList. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IFilterExpressionList); - - /** FilterExpressionList expressions. */ - public expressions: google.analytics.data.v1beta.IFilterExpression[]; - - /** - * Creates a new FilterExpressionList instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterExpressionList instance - */ - public static create(properties?: google.analytics.data.v1beta.IFilterExpressionList): google.analytics.data.v1beta.FilterExpressionList; - - /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.FilterExpressionList; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.FilterExpressionList; - - /** - * Verifies a FilterExpressionList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.FilterExpressionList; - - /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. - * @param message FilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterExpressionList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter fieldName */ - fieldName?: (string|null); - - /** Filter stringFilter */ - stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); - - /** Filter inListFilter */ - inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); - - /** Filter numericFilter */ - numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); - - /** Filter betweenFilter */ - betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); - - /** Filter emptyFilter */ - emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IFilter); - - /** Filter fieldName. */ - public fieldName: string; - - /** Filter stringFilter. */ - public stringFilter?: (google.analytics.data.v1beta.Filter.IStringFilter|null); - - /** Filter inListFilter. */ - public inListFilter?: (google.analytics.data.v1beta.Filter.IInListFilter|null); - - /** Filter numericFilter. */ - public numericFilter?: (google.analytics.data.v1beta.Filter.INumericFilter|null); - - /** Filter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1beta.Filter.IBetweenFilter|null); - - /** Filter emptyFilter. */ - public emptyFilter?: (google.analytics.data.v1beta.Filter.IEmptyFilter|null); - - /** Filter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.analytics.data.v1beta.IFilter): google.analytics.data.v1beta.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Filter { - - /** Properties of a StringFilter. */ - interface IStringFilter { - - /** StringFilter matchType */ - matchType?: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType|null); - - /** StringFilter value */ - value?: (string|null); - - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); - } - - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { - - /** - * Constructs a new StringFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.Filter.IStringFilter); - - /** StringFilter matchType. */ - public matchType: (google.analytics.data.v1beta.Filter.StringFilter.MatchType|keyof typeof google.analytics.data.v1beta.Filter.StringFilter.MatchType); - - /** StringFilter value. */ - public value: string; - - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; - - /** - * Creates a new StringFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFilter instance - */ - public static create(properties?: google.analytics.data.v1beta.Filter.IStringFilter): google.analytics.data.v1beta.Filter.StringFilter; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.StringFilter; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.StringFilter; - - /** - * Verifies a StringFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.StringFilter; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StringFilter { - - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - BEGINS_WITH = 2, - ENDS_WITH = 3, - CONTAINS = 4, - FULL_REGEXP = 5, - PARTIAL_REGEXP = 6 - } - } - - /** Properties of an InListFilter. */ - interface IInListFilter { - - /** InListFilter values */ - values?: (string[]|null); - - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); - } - - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { - - /** - * Constructs a new InListFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.Filter.IInListFilter); - - /** InListFilter values. */ - public values: string[]; - - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; - - /** - * Creates a new InListFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InListFilter instance - */ - public static create(properties?: google.analytics.data.v1beta.Filter.IInListFilter): google.analytics.data.v1beta.Filter.InListFilter; - - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.InListFilter; - - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.InListFilter; - - /** - * Verifies an InListFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InListFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.InListFilter; - - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InListFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InListFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NumericFilter. */ - interface INumericFilter { - - /** NumericFilter operation */ - operation?: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation|null); - - /** NumericFilter value */ - value?: (google.analytics.data.v1beta.INumericValue|null); - } - - /** Represents a NumericFilter. */ - class NumericFilter implements INumericFilter { - - /** - * Constructs a new NumericFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.Filter.INumericFilter); - - /** NumericFilter operation. */ - public operation: (google.analytics.data.v1beta.Filter.NumericFilter.Operation|keyof typeof google.analytics.data.v1beta.Filter.NumericFilter.Operation); - - /** NumericFilter value. */ - public value?: (google.analytics.data.v1beta.INumericValue|null); - - /** - * Creates a new NumericFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericFilter instance - */ - public static create(properties?: google.analytics.data.v1beta.Filter.INumericFilter): google.analytics.data.v1beta.Filter.NumericFilter; - - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.Filter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.NumericFilter; - - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.NumericFilter; - - /** - * Verifies a NumericFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.NumericFilter; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @param message NumericFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NumericFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NumericFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NumericFilter { - - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - EQUAL = 1, - LESS_THAN = 2, - LESS_THAN_OR_EQUAL = 3, - GREATER_THAN = 4, - GREATER_THAN_OR_EQUAL = 5 - } - } - - /** Properties of a BetweenFilter. */ - interface IBetweenFilter { - - /** BetweenFilter fromValue */ - fromValue?: (google.analytics.data.v1beta.INumericValue|null); - - /** BetweenFilter toValue */ - toValue?: (google.analytics.data.v1beta.INumericValue|null); - } - - /** Represents a BetweenFilter. */ - class BetweenFilter implements IBetweenFilter { - - /** - * Constructs a new BetweenFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter); - - /** BetweenFilter fromValue. */ - public fromValue?: (google.analytics.data.v1beta.INumericValue|null); - - /** BetweenFilter toValue. */ - public toValue?: (google.analytics.data.v1beta.INumericValue|null); - - /** - * Creates a new BetweenFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns BetweenFilter instance - */ - public static create(properties?: google.analytics.data.v1beta.Filter.IBetweenFilter): google.analytics.data.v1beta.Filter.BetweenFilter; - - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.BetweenFilter; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.BetweenFilter; - - /** - * Verifies a BetweenFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BetweenFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.BetweenFilter; - - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @param message BetweenFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BetweenFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BetweenFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EmptyFilter. */ - interface IEmptyFilter { - } - - /** Represents an EmptyFilter. */ - class EmptyFilter implements IEmptyFilter { - - /** - * Constructs a new EmptyFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter); - - /** - * Creates a new EmptyFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns EmptyFilter instance - */ - public static create(properties?: google.analytics.data.v1beta.Filter.IEmptyFilter): google.analytics.data.v1beta.Filter.EmptyFilter; - - /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.Filter.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Filter.EmptyFilter; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Filter.EmptyFilter; - - /** - * Verifies an EmptyFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EmptyFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Filter.EmptyFilter; - - /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. - * @param message EmptyFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Filter.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EmptyFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EmptyFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OrderBy. */ - interface IOrderBy { - - /** OrderBy metric */ - metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension */ - dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); - - /** OrderBy pivot */ - pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); - - /** OrderBy desc */ - desc?: (boolean|null); - } - - /** Represents an OrderBy. */ - class OrderBy implements IOrderBy { - - /** - * Constructs a new OrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IOrderBy); - - /** OrderBy metric. */ - public metric?: (google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension. */ - public dimension?: (google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null); - - /** OrderBy pivot. */ - public pivot?: (google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null); - - /** OrderBy desc. */ - public desc: boolean; - - /** OrderBy oneOrderBy. */ - public oneOrderBy?: ("metric"|"dimension"|"pivot"); - - /** - * Creates a new OrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns OrderBy instance - */ - public static create(properties?: google.analytics.data.v1beta.IOrderBy): google.analytics.data.v1beta.OrderBy; - - /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy; - - /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy; - - /** - * Verifies an OrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy; - - /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. - * @param message OrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OrderBy { - - /** Properties of a MetricOrderBy. */ - interface IMetricOrderBy { - - /** MetricOrderBy metricName */ - metricName?: (string|null); - } - - /** Represents a MetricOrderBy. */ - class MetricOrderBy implements IMetricOrderBy { - - /** - * Constructs a new MetricOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy); - - /** MetricOrderBy metricName. */ - public metricName: string; - - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricOrderBy instance - */ - public static create(properties?: google.analytics.data.v1beta.OrderBy.IMetricOrderBy): google.analytics.data.v1beta.OrderBy.MetricOrderBy; - - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.MetricOrderBy; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.MetricOrderBy; - - /** - * Verifies a MetricOrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.MetricOrderBy; - - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @param message MetricOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricOrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionOrderBy. */ - interface IDimensionOrderBy { - - /** DimensionOrderBy dimensionName */ - dimensionName?: (string|null); - - /** DimensionOrderBy orderType */ - orderType?: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null); - } - - /** Represents a DimensionOrderBy. */ - class DimensionOrderBy implements IDimensionOrderBy { - - /** - * Constructs a new DimensionOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy); - - /** DimensionOrderBy dimensionName. */ - public dimensionName: string; - - /** DimensionOrderBy orderType. */ - public orderType: (google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType); - - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionOrderBy instance - */ - public static create(properties?: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; - - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; - - /** - * Verifies a DimensionOrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.DimensionOrderBy; - - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @param message DimensionOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionOrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DimensionOrderBy { - - /** OrderType enum. */ - enum OrderType { - ORDER_TYPE_UNSPECIFIED = 0, - ALPHANUMERIC = 1, - CASE_INSENSITIVE_ALPHANUMERIC = 2, - NUMERIC = 3 - } - } - - /** Properties of a PivotOrderBy. */ - interface IPivotOrderBy { - - /** PivotOrderBy metricName */ - metricName?: (string|null); - - /** PivotOrderBy pivotSelections */ - pivotSelections?: (google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]|null); - } - - /** Represents a PivotOrderBy. */ - class PivotOrderBy implements IPivotOrderBy { - - /** - * Constructs a new PivotOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy); - - /** PivotOrderBy metricName. */ - public metricName: string; - - /** PivotOrderBy pivotSelections. */ - public pivotSelections: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection[]; - - /** - * Creates a new PivotOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns PivotOrderBy instance - */ - public static create(properties?: google.analytics.data.v1beta.OrderBy.IPivotOrderBy): google.analytics.data.v1beta.OrderBy.PivotOrderBy; - - /** - * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. - * @param message PivotOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. - * @param message PivotOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.IPivotOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PivotOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PivotOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.PivotOrderBy; - - /** - * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PivotOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.PivotOrderBy; - - /** - * Verifies a PivotOrderBy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PivotOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PivotOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy; - - /** - * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. - * @param message PivotOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PivotOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PivotOrderBy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PivotOrderBy { - - /** Properties of a PivotSelection. */ - interface IPivotSelection { - - /** PivotSelection dimensionName */ - dimensionName?: (string|null); - - /** PivotSelection dimensionValue */ - dimensionValue?: (string|null); - } - - /** Represents a PivotSelection. */ - class PivotSelection implements IPivotSelection { - - /** - * Constructs a new PivotSelection. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection); - - /** PivotSelection dimensionName. */ - public dimensionName: string; - - /** PivotSelection dimensionValue. */ - public dimensionValue: string; - - /** - * Creates a new PivotSelection instance using the specified properties. - * @param [properties] Properties to set - * @returns PivotSelection instance - */ - public static create(properties?: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; - - /** - * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. - * @param message PivotSelection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. - * @param message PivotSelection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PivotSelection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PivotSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; - - /** - * Decodes a PivotSelection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PivotSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; - - /** - * Verifies a PivotSelection message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PivotSelection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PivotSelection - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection; - - /** - * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. - * @param message PivotSelection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PivotSelection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PivotSelection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a Pivot. */ - interface IPivot { - - /** Pivot fieldNames */ - fieldNames?: (string[]|null); - - /** Pivot orderBys */ - orderBys?: (google.analytics.data.v1beta.IOrderBy[]|null); - - /** Pivot offset */ - offset?: (number|Long|string|null); - - /** Pivot limit */ - limit?: (number|Long|string|null); - - /** Pivot metricAggregations */ - metricAggregations?: (google.analytics.data.v1beta.MetricAggregation[]|null); - } - - /** Represents a Pivot. */ - class Pivot implements IPivot { - - /** - * Constructs a new Pivot. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IPivot); - - /** Pivot fieldNames. */ - public fieldNames: string[]; - - /** Pivot orderBys. */ - public orderBys: google.analytics.data.v1beta.IOrderBy[]; - - /** Pivot offset. */ - public offset: (number|Long|string); - - /** Pivot limit. */ - public limit: (number|Long|string); - - /** Pivot metricAggregations. */ - public metricAggregations: google.analytics.data.v1beta.MetricAggregation[]; - - /** - * Creates a new Pivot instance using the specified properties. - * @param [properties] Properties to set - * @returns Pivot instance - */ - public static create(properties?: google.analytics.data.v1beta.IPivot): google.analytics.data.v1beta.Pivot; - - /** - * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. - * @param message Pivot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. - * @param message Pivot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IPivot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Pivot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Pivot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Pivot; - - /** - * Decodes a Pivot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Pivot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Pivot; - - /** - * Verifies a Pivot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Pivot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Pivot - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Pivot; - - /** - * Creates a plain object from a Pivot message. Also converts values to other types if specified. - * @param message Pivot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Pivot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Pivot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Pivot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CohortSpec. */ - interface ICohortSpec { - - /** CohortSpec cohorts */ - cohorts?: (google.analytics.data.v1beta.ICohort[]|null); - - /** CohortSpec cohortsRange */ - cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); - - /** CohortSpec cohortReportSettings */ - cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); - } - - /** Represents a CohortSpec. */ - class CohortSpec implements ICohortSpec { - - /** - * Constructs a new CohortSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICohortSpec); - - /** CohortSpec cohorts. */ - public cohorts: google.analytics.data.v1beta.ICohort[]; - - /** CohortSpec cohortsRange. */ - public cohortsRange?: (google.analytics.data.v1beta.ICohortsRange|null); - - /** CohortSpec cohortReportSettings. */ - public cohortReportSettings?: (google.analytics.data.v1beta.ICohortReportSettings|null); - - /** - * Creates a new CohortSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortSpec instance - */ - public static create(properties?: google.analytics.data.v1beta.ICohortSpec): google.analytics.data.v1beta.CohortSpec; - - /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortSpec; - - /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortSpec; - - /** - * Verifies a CohortSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortSpec - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortSpec; - - /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. - * @param message CohortSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Cohort. */ - interface ICohort { - - /** Cohort name */ - name?: (string|null); - - /** Cohort dimension */ - dimension?: (string|null); - - /** Cohort dateRange */ - dateRange?: (google.analytics.data.v1beta.IDateRange|null); - } - - /** Represents a Cohort. */ - class Cohort implements ICohort { - - /** - * Constructs a new Cohort. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICohort); - - /** Cohort name. */ - public name: string; - - /** Cohort dimension. */ - public dimension: string; - - /** Cohort dateRange. */ - public dateRange?: (google.analytics.data.v1beta.IDateRange|null); - - /** - * Creates a new Cohort instance using the specified properties. - * @param [properties] Properties to set - * @returns Cohort instance - */ - public static create(properties?: google.analytics.data.v1beta.ICohort): google.analytics.data.v1beta.Cohort; - - /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cohort message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Cohort; - - /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Cohort; - - /** - * Verifies a Cohort message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cohort - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Cohort; - - /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. - * @param message Cohort - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cohort to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Cohort - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CohortsRange. */ - interface ICohortsRange { - - /** CohortsRange granularity */ - granularity?: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity|null); - - /** CohortsRange startOffset */ - startOffset?: (number|null); - - /** CohortsRange endOffset */ - endOffset?: (number|null); - } - - /** Represents a CohortsRange. */ - class CohortsRange implements ICohortsRange { - - /** - * Constructs a new CohortsRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICohortsRange); - - /** CohortsRange granularity. */ - public granularity: (google.analytics.data.v1beta.CohortsRange.Granularity|keyof typeof google.analytics.data.v1beta.CohortsRange.Granularity); - - /** CohortsRange startOffset. */ - public startOffset: number; - - /** CohortsRange endOffset. */ - public endOffset: number; - - /** - * Creates a new CohortsRange instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortsRange instance - */ - public static create(properties?: google.analytics.data.v1beta.ICohortsRange): google.analytics.data.v1beta.CohortsRange; - - /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortsRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortsRange; - - /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortsRange; - - /** - * Verifies a CohortsRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortsRange - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortsRange; - - /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. - * @param message CohortsRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortsRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortsRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CohortsRange { - - /** Granularity enum. */ - enum Granularity { - GRANULARITY_UNSPECIFIED = 0, - DAILY = 1, - WEEKLY = 2, - MONTHLY = 3 - } - } - - /** Properties of a CohortReportSettings. */ - interface ICohortReportSettings { - - /** CohortReportSettings accumulate */ - accumulate?: (boolean|null); - } - - /** Represents a CohortReportSettings. */ - class CohortReportSettings implements ICohortReportSettings { - - /** - * Constructs a new CohortReportSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ICohortReportSettings); - - /** CohortReportSettings accumulate. */ - public accumulate: boolean; - - /** - * Creates a new CohortReportSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CohortReportSettings instance - */ - public static create(properties?: google.analytics.data.v1beta.ICohortReportSettings): google.analytics.data.v1beta.CohortReportSettings; - - /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.CohortReportSettings; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.CohortReportSettings; - - /** - * Verifies a CohortReportSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CohortReportSettings - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.CohortReportSettings; - - /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. - * @param message CohortReportSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CohortReportSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CohortReportSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResponseMetaData. */ - interface IResponseMetaData { - - /** ResponseMetaData dataLossFromOtherRow */ - dataLossFromOtherRow?: (boolean|null); - - /** ResponseMetaData schemaRestrictionResponse */ - schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode */ - currencyCode?: (string|null); - - /** ResponseMetaData timeZone */ - timeZone?: (string|null); - - /** ResponseMetaData emptyReason */ - emptyReason?: (string|null); - - /** ResponseMetaData subjectToThresholding */ - subjectToThresholding?: (boolean|null); - - /** ResponseMetaData samplingMetadatas */ - samplingMetadatas?: (google.analytics.data.v1beta.ISamplingMetadata[]|null); - } - - /** Represents a ResponseMetaData. */ - class ResponseMetaData implements IResponseMetaData { - - /** - * Constructs a new ResponseMetaData. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IResponseMetaData); - - /** ResponseMetaData dataLossFromOtherRow. */ - public dataLossFromOtherRow: boolean; - - /** ResponseMetaData schemaRestrictionResponse. */ - public schemaRestrictionResponse?: (google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode. */ - public currencyCode?: (string|null); - - /** ResponseMetaData timeZone. */ - public timeZone?: (string|null); - - /** ResponseMetaData emptyReason. */ - public emptyReason?: (string|null); - - /** ResponseMetaData subjectToThresholding. */ - public subjectToThresholding?: (boolean|null); - - /** ResponseMetaData samplingMetadatas. */ - public samplingMetadatas: google.analytics.data.v1beta.ISamplingMetadata[]; - - /** - * Creates a new ResponseMetaData instance using the specified properties. - * @param [properties] Properties to set - * @returns ResponseMetaData instance - */ - public static create(properties?: google.analytics.data.v1beta.IResponseMetaData): google.analytics.data.v1beta.ResponseMetaData; - - /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData; - - /** - * Verifies a ResponseMetaData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseMetaData - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData; - - /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. - * @param message ResponseMetaData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseMetaData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResponseMetaData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResponseMetaData { - - /** Properties of a SchemaRestrictionResponse. */ - interface ISchemaRestrictionResponse { - - /** SchemaRestrictionResponse activeMetricRestrictions */ - activeMetricRestrictions?: (google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); - } - - /** Represents a SchemaRestrictionResponse. */ - class SchemaRestrictionResponse implements ISchemaRestrictionResponse { - - /** - * Constructs a new SchemaRestrictionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse); - - /** SchemaRestrictionResponse activeMetricRestrictions. */ - public activeMetricRestrictions: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; - - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaRestrictionResponse instance - */ - public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Verifies a SchemaRestrictionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaRestrictionResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @param message SchemaRestrictionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaRestrictionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchemaRestrictionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SchemaRestrictionResponse { - - /** Properties of an ActiveMetricRestriction. */ - interface IActiveMetricRestriction { - - /** ActiveMetricRestriction metricName */ - metricName?: (string|null); - - /** ActiveMetricRestriction restrictedMetricTypes */ - restrictedMetricTypes?: (google.analytics.data.v1beta.RestrictedMetricType[]|null); - } - - /** Represents an ActiveMetricRestriction. */ - class ActiveMetricRestriction implements IActiveMetricRestriction { - - /** - * Constructs a new ActiveMetricRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); - - /** ActiveMetricRestriction metricName. */ - public metricName?: (string|null); - - /** ActiveMetricRestriction restrictedMetricTypes. */ - public restrictedMetricTypes: google.analytics.data.v1beta.RestrictedMetricType[]; - - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns ActiveMetricRestriction instance - */ - public static create(properties?: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Verifies an ActiveMetricRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActiveMetricRestriction - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; - - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @param message ActiveMetricRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActiveMetricRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActiveMetricRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a SamplingMetadata. */ - interface ISamplingMetadata { - - /** SamplingMetadata samplesReadCount */ - samplesReadCount?: (number|Long|string|null); - - /** SamplingMetadata samplingSpaceSize */ - samplingSpaceSize?: (number|Long|string|null); - } - - /** Represents a SamplingMetadata. */ - class SamplingMetadata implements ISamplingMetadata { - - /** - * Constructs a new SamplingMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.ISamplingMetadata); - - /** SamplingMetadata samplesReadCount. */ - public samplesReadCount: (number|Long|string); - - /** SamplingMetadata samplingSpaceSize. */ - public samplingSpaceSize: (number|Long|string); - - /** - * Creates a new SamplingMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns SamplingMetadata instance - */ - public static create(properties?: google.analytics.data.v1beta.ISamplingMetadata): google.analytics.data.v1beta.SamplingMetadata; - - /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.SamplingMetadata; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.SamplingMetadata; - - /** - * Verifies a SamplingMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SamplingMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.SamplingMetadata; - - /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. - * @param message SamplingMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SamplingMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SamplingMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionHeader. */ - interface IDimensionHeader { - - /** DimensionHeader name */ - name?: (string|null); - } - - /** Represents a DimensionHeader. */ - class DimensionHeader implements IDimensionHeader { - - /** - * Constructs a new DimensionHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimensionHeader); - - /** DimensionHeader name. */ - public name: string; - - /** - * Creates a new DimensionHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionHeader instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimensionHeader): google.analytics.data.v1beta.DimensionHeader; - - /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionHeader; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionHeader; - - /** - * Verifies a DimensionHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionHeader; - - /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. - * @param message DimensionHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricHeader. */ - interface IMetricHeader { - - /** MetricHeader name */ - name?: (string|null); - - /** MetricHeader type */ - type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); - } - - /** Represents a MetricHeader. */ - class MetricHeader implements IMetricHeader { - - /** - * Constructs a new MetricHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetricHeader); - - /** MetricHeader name. */ - public name: string; - - /** MetricHeader type. */ - public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); - - /** - * Creates a new MetricHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricHeader instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetricHeader): google.analytics.data.v1beta.MetricHeader; - - /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricHeader; - - /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricHeader; - - /** - * Verifies a MetricHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricHeader; - - /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. - * @param message MetricHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PivotHeader. */ - interface IPivotHeader { - - /** PivotHeader pivotDimensionHeaders */ - pivotDimensionHeaders?: (google.analytics.data.v1beta.IPivotDimensionHeader[]|null); - - /** PivotHeader rowCount */ - rowCount?: (number|null); - } - - /** Represents a PivotHeader. */ - class PivotHeader implements IPivotHeader { - - /** - * Constructs a new PivotHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IPivotHeader); - - /** PivotHeader pivotDimensionHeaders. */ - public pivotDimensionHeaders: google.analytics.data.v1beta.IPivotDimensionHeader[]; - - /** PivotHeader rowCount. */ - public rowCount: number; - - /** - * Creates a new PivotHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns PivotHeader instance - */ - public static create(properties?: google.analytics.data.v1beta.IPivotHeader): google.analytics.data.v1beta.PivotHeader; - - /** - * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. - * @param message PivotHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. - * @param message PivotHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IPivotHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PivotHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PivotHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PivotHeader; - - /** - * Decodes a PivotHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PivotHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PivotHeader; - - /** - * Verifies a PivotHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PivotHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PivotHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotHeader; - - /** - * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. - * @param message PivotHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.PivotHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PivotHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PivotHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PivotDimensionHeader. */ - interface IPivotDimensionHeader { - - /** PivotDimensionHeader dimensionValues */ - dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); - } - - /** Represents a PivotDimensionHeader. */ - class PivotDimensionHeader implements IPivotDimensionHeader { - - /** - * Constructs a new PivotDimensionHeader. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IPivotDimensionHeader); - - /** PivotDimensionHeader dimensionValues. */ - public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; - - /** - * Creates a new PivotDimensionHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns PivotDimensionHeader instance - */ - public static create(properties?: google.analytics.data.v1beta.IPivotDimensionHeader): google.analytics.data.v1beta.PivotDimensionHeader; - - /** - * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. - * @param message PivotDimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. - * @param message PivotDimensionHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IPivotDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PivotDimensionHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PivotDimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PivotDimensionHeader; - - /** - * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PivotDimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PivotDimensionHeader; - - /** - * Verifies a PivotDimensionHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PivotDimensionHeader - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PivotDimensionHeader; - - /** - * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. - * @param message PivotDimensionHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.PivotDimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PivotDimensionHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PivotDimensionHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Row. */ - interface IRow { - - /** Row dimensionValues */ - dimensionValues?: (google.analytics.data.v1beta.IDimensionValue[]|null); - - /** Row metricValues */ - metricValues?: (google.analytics.data.v1beta.IMetricValue[]|null); - } - - /** Represents a Row. */ - class Row implements IRow { - - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IRow); - - /** Row dimensionValues. */ - public dimensionValues: google.analytics.data.v1beta.IDimensionValue[]; - - /** Row metricValues. */ - public metricValues: google.analytics.data.v1beta.IMetricValue[]; - - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.analytics.data.v1beta.IRow): google.analytics.data.v1beta.Row; - - /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Row; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Row; - - /** - * Verifies a Row message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Row; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Row - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionValue. */ - interface IDimensionValue { - - /** DimensionValue value */ - value?: (string|null); - } - - /** Represents a DimensionValue. */ - class DimensionValue implements IDimensionValue { - - /** - * Constructs a new DimensionValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimensionValue); - - /** DimensionValue value. */ - public value?: (string|null); - - /** DimensionValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new DimensionValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionValue instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimensionValue): google.analytics.data.v1beta.DimensionValue; - - /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionValue; - - /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionValue; - - /** - * Verifies a DimensionValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionValue; - - /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. - * @param message DimensionValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricValue. */ - interface IMetricValue { - - /** MetricValue value */ - value?: (string|null); - } - - /** Represents a MetricValue. */ - class MetricValue implements IMetricValue { - - /** - * Constructs a new MetricValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetricValue); - - /** MetricValue value. */ - public value?: (string|null); - - /** MetricValue oneValue. */ - public oneValue?: "value"; - - /** - * Creates a new MetricValue instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricValue instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetricValue): google.analytics.data.v1beta.MetricValue; - - /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricValue; - - /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricValue; - - /** - * Verifies a MetricValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricValue; - - /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. - * @param message MetricValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NumericValue. */ - interface INumericValue { - - /** NumericValue int64Value */ - int64Value?: (number|Long|string|null); - - /** NumericValue doubleValue */ - doubleValue?: (number|null); - } - - /** Represents a NumericValue. */ - class NumericValue implements INumericValue { - - /** - * Constructs a new NumericValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.INumericValue); - - /** NumericValue int64Value. */ - public int64Value?: (number|Long|string|null); - - /** NumericValue doubleValue. */ - public doubleValue?: (number|null); - - /** NumericValue oneValue. */ - public oneValue?: ("int64Value"|"doubleValue"); - - /** - * Creates a new NumericValue instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericValue instance - */ - public static create(properties?: google.analytics.data.v1beta.INumericValue): google.analytics.data.v1beta.NumericValue; - - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.NumericValue; - - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.NumericValue; - - /** - * Verifies a NumericValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.NumericValue; - - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @param message NumericValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NumericValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NumericValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PropertyQuota. */ - interface IPropertyQuota { - - /** PropertyQuota tokensPerDay */ - tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour */ - tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota concurrentRequests */ - concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota serverErrorsPerProjectPerHour */ - serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota potentiallyThresholdedRequestsPerHour */ - potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota tokensPerProjectPerHour */ - tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - } - - /** Represents a PropertyQuota. */ - class PropertyQuota implements IPropertyQuota { - - /** - * Constructs a new PropertyQuota. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IPropertyQuota); - - /** PropertyQuota tokensPerDay. */ - public tokensPerDay?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour. */ - public tokensPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota concurrentRequests. */ - public concurrentRequests?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota serverErrorsPerProjectPerHour. */ - public serverErrorsPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ - public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** PropertyQuota tokensPerProjectPerHour. */ - public tokensPerProjectPerHour?: (google.analytics.data.v1beta.IQuotaStatus|null); - - /** - * Creates a new PropertyQuota instance using the specified properties. - * @param [properties] Properties to set - * @returns PropertyQuota instance - */ - public static create(properties?: google.analytics.data.v1beta.IPropertyQuota): google.analytics.data.v1beta.PropertyQuota; - - /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.PropertyQuota; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.PropertyQuota; - - /** - * Verifies a PropertyQuota message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PropertyQuota - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.PropertyQuota; - - /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. - * @param message PropertyQuota - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PropertyQuota to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PropertyQuota - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QuotaStatus. */ - interface IQuotaStatus { - - /** QuotaStatus consumed */ - consumed?: (number|null); - - /** QuotaStatus remaining */ - remaining?: (number|null); - } - - /** Represents a QuotaStatus. */ - class QuotaStatus implements IQuotaStatus { - - /** - * Constructs a new QuotaStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IQuotaStatus); - - /** QuotaStatus consumed. */ - public consumed?: (number|null); - - /** QuotaStatus remaining. */ - public remaining?: (number|null); - - /** - * Creates a new QuotaStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns QuotaStatus instance - */ - public static create(properties?: google.analytics.data.v1beta.IQuotaStatus): google.analytics.data.v1beta.QuotaStatus; - - /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.QuotaStatus; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.QuotaStatus; - - /** - * Verifies a QuotaStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuotaStatus - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.QuotaStatus; - - /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. - * @param message QuotaStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuotaStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QuotaStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionMetadata. */ - interface IDimensionMetadata { - - /** DimensionMetadata apiName */ - apiName?: (string|null); - - /** DimensionMetadata uiName */ - uiName?: (string|null); - - /** DimensionMetadata description */ - description?: (string|null); - - /** DimensionMetadata deprecatedApiNames */ - deprecatedApiNames?: (string[]|null); - - /** DimensionMetadata customDefinition */ - customDefinition?: (boolean|null); - - /** DimensionMetadata category */ - category?: (string|null); - } - - /** Represents a DimensionMetadata. */ - class DimensionMetadata implements IDimensionMetadata { - - /** - * Constructs a new DimensionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimensionMetadata); - - /** DimensionMetadata apiName. */ - public apiName: string; - - /** DimensionMetadata uiName. */ - public uiName: string; - - /** DimensionMetadata description. */ - public description: string; - - /** DimensionMetadata deprecatedApiNames. */ - public deprecatedApiNames: string[]; - - /** DimensionMetadata customDefinition. */ - public customDefinition: boolean; - - /** DimensionMetadata category. */ - public category: string; - - /** - * Creates a new DimensionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionMetadata instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimensionMetadata): google.analytics.data.v1beta.DimensionMetadata; - - /** - * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. - * @param message DimensionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. - * @param message DimensionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionMetadata; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionMetadata; - - /** - * Verifies a DimensionMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionMetadata; - - /** - * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. - * @param message DimensionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricMetadata. */ - interface IMetricMetadata { - - /** MetricMetadata apiName */ - apiName?: (string|null); - - /** MetricMetadata uiName */ - uiName?: (string|null); - - /** MetricMetadata description */ - description?: (string|null); - - /** MetricMetadata deprecatedApiNames */ - deprecatedApiNames?: (string[]|null); - - /** MetricMetadata type */ - type?: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType|null); - - /** MetricMetadata expression */ - expression?: (string|null); - - /** MetricMetadata customDefinition */ - customDefinition?: (boolean|null); - - /** MetricMetadata blockedReasons */ - blockedReasons?: (google.analytics.data.v1beta.MetricMetadata.BlockedReason[]|null); - - /** MetricMetadata category */ - category?: (string|null); - } - - /** Represents a MetricMetadata. */ - class MetricMetadata implements IMetricMetadata { - - /** - * Constructs a new MetricMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetricMetadata); - - /** MetricMetadata apiName. */ - public apiName: string; - - /** MetricMetadata uiName. */ - public uiName: string; - - /** MetricMetadata description. */ - public description: string; - - /** MetricMetadata deprecatedApiNames. */ - public deprecatedApiNames: string[]; - - /** MetricMetadata type. */ - public type: (google.analytics.data.v1beta.MetricType|keyof typeof google.analytics.data.v1beta.MetricType); - - /** MetricMetadata expression. */ - public expression: string; - - /** MetricMetadata customDefinition. */ - public customDefinition: boolean; - - /** MetricMetadata blockedReasons. */ - public blockedReasons: google.analytics.data.v1beta.MetricMetadata.BlockedReason[]; - - /** MetricMetadata category. */ - public category: string; - - /** - * Creates a new MetricMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricMetadata instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetricMetadata): google.analytics.data.v1beta.MetricMetadata; - - /** - * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. - * @param message MetricMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. - * @param message MetricMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricMetadata; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricMetadata; - - /** - * Verifies a MetricMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricMetadata; - - /** - * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. - * @param message MetricMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetricMetadata { - - /** BlockedReason enum. */ - enum BlockedReason { - BLOCKED_REASON_UNSPECIFIED = 0, - NO_REVENUE_METRICS = 1, - NO_COST_METRICS = 2 - } - } - - /** Properties of a ComparisonMetadata. */ - interface IComparisonMetadata { - - /** ComparisonMetadata apiName */ - apiName?: (string|null); - - /** ComparisonMetadata uiName */ - uiName?: (string|null); - - /** ComparisonMetadata description */ - description?: (string|null); - } - - /** Represents a ComparisonMetadata. */ - class ComparisonMetadata implements IComparisonMetadata { - - /** - * Constructs a new ComparisonMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IComparisonMetadata); - - /** ComparisonMetadata apiName. */ - public apiName: string; - - /** ComparisonMetadata uiName. */ - public uiName: string; - - /** ComparisonMetadata description. */ - public description: string; - - /** - * Creates a new ComparisonMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns ComparisonMetadata instance - */ - public static create(properties?: google.analytics.data.v1beta.IComparisonMetadata): google.analytics.data.v1beta.ComparisonMetadata; - - /** - * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. - * @param message ComparisonMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. - * @param message ComparisonMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ComparisonMetadata; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ComparisonMetadata; - - /** - * Verifies a ComparisonMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComparisonMetadata - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ComparisonMetadata; - - /** - * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. - * @param message ComparisonMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComparisonMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComparisonMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DimensionCompatibility. */ - interface IDimensionCompatibility { - - /** DimensionCompatibility dimensionMetadata */ - dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); - - /** DimensionCompatibility compatibility */ - compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); - } - - /** Represents a DimensionCompatibility. */ - class DimensionCompatibility implements IDimensionCompatibility { - - /** - * Constructs a new DimensionCompatibility. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IDimensionCompatibility); - - /** DimensionCompatibility dimensionMetadata. */ - public dimensionMetadata?: (google.analytics.data.v1beta.IDimensionMetadata|null); - - /** DimensionCompatibility compatibility. */ - public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); - - /** - * Creates a new DimensionCompatibility instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionCompatibility instance - */ - public static create(properties?: google.analytics.data.v1beta.IDimensionCompatibility): google.analytics.data.v1beta.DimensionCompatibility; - - /** - * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. - * @param message DimensionCompatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. - * @param message DimensionCompatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IDimensionCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DimensionCompatibility message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.DimensionCompatibility; - - /** - * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.DimensionCompatibility; - - /** - * Verifies a DimensionCompatibility message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DimensionCompatibility message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionCompatibility - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.DimensionCompatibility; - - /** - * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. - * @param message DimensionCompatibility - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.DimensionCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DimensionCompatibility to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DimensionCompatibility - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetricCompatibility. */ - interface IMetricCompatibility { - - /** MetricCompatibility metricMetadata */ - metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); - - /** MetricCompatibility compatibility */ - compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); - } - - /** Represents a MetricCompatibility. */ - class MetricCompatibility implements IMetricCompatibility { - - /** - * Constructs a new MetricCompatibility. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1beta.IMetricCompatibility); - - /** MetricCompatibility metricMetadata. */ - public metricMetadata?: (google.analytics.data.v1beta.IMetricMetadata|null); - - /** MetricCompatibility compatibility. */ - public compatibility?: (google.analytics.data.v1beta.Compatibility|keyof typeof google.analytics.data.v1beta.Compatibility|null); - - /** - * Creates a new MetricCompatibility instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricCompatibility instance - */ - public static create(properties?: google.analytics.data.v1beta.IMetricCompatibility): google.analytics.data.v1beta.MetricCompatibility; - - /** - * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. - * @param message MetricCompatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. - * @param message MetricCompatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1beta.IMetricCompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricCompatibility message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.MetricCompatibility; - - /** - * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.MetricCompatibility; - - /** - * Verifies a MetricCompatibility message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricCompatibility message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricCompatibility - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.MetricCompatibility; - - /** - * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. - * @param message MetricCompatibility - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1beta.MetricCompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricCompatibility to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricCompatibility - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** MetricAggregation enum. */ - enum MetricAggregation { - METRIC_AGGREGATION_UNSPECIFIED = 0, - TOTAL = 1, - MINIMUM = 5, - MAXIMUM = 6, - COUNT = 4 - } - - /** MetricType enum. */ - enum MetricType { - METRIC_TYPE_UNSPECIFIED = 0, - TYPE_INTEGER = 1, - TYPE_FLOAT = 2, - TYPE_SECONDS = 4, - TYPE_MILLISECONDS = 5, - TYPE_MINUTES = 6, - TYPE_HOURS = 7, - TYPE_STANDARD = 8, - TYPE_CURRENCY = 9, - TYPE_FEET = 10, - TYPE_MILES = 11, - TYPE_METERS = 12, - TYPE_KILOMETERS = 13 - } - - /** RestrictedMetricType enum. */ - enum RestrictedMetricType { - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, - COST_DATA = 1, - REVENUE_DATA = 2 - } - - /** Compatibility enum. */ - enum Compatibility { - COMPATIBILITY_UNSPECIFIED = 0, - COMPATIBLE = 1, - INCOMPATIBLE = 2 - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Operations service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-analytics-data/protos/protos.js b/owl-bot-staging/google-analytics-data/protos/protos.js deleted file mode 100644 index c5814ccb74ed..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/protos.js +++ /dev/null @@ -1,75986 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_analytics_data_protos || ($protobuf.roots._google_analytics_data_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - return protobuf; - })(); - - google.analytics = (function() { - - /** - * Namespace analytics. - * @memberof google - * @namespace - */ - var analytics = {}; - - analytics.data = (function() { - - /** - * Namespace data. - * @memberof google.analytics - * @namespace - */ - var data = {}; - - data.v1alpha = (function() { - - /** - * Namespace v1alpha. - * @memberof google.analytics.data - * @namespace - */ - var v1alpha = {}; - - v1alpha.AlphaAnalyticsData = (function() { - - /** - * Constructs a new AlphaAnalyticsData service. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AlphaAnalyticsData - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function AlphaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AlphaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlphaAnalyticsData; - - /** - * Creates new AlphaAnalyticsData service using the specified rpc implementation. - * @function create - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AlphaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. - */ - AlphaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runFunnelReport}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef RunFunnelReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} [response] RunFunnelReportResponse - */ - - /** - * Calls RunFunnelReport. - * @function runFunnelReport - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReportCallback} callback Node-style callback called with the error, if any, and RunFunnelReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.runFunnelReport = function runFunnelReport(request, callback) { - return this.rpcCall(runFunnelReport, $root.google.analytics.data.v1alpha.RunFunnelReportRequest, $root.google.analytics.data.v1alpha.RunFunnelReportResponse, request, callback); - }, "name", { value: "RunFunnelReport" }); - - /** - * Calls RunFunnelReport. - * @function runFunnelReport - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} request RunFunnelReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef CreateAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateAudienceList. - * @function createAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceListCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.createAudienceList = function createAudienceList(request, callback) { - return this.rpcCall(createAudienceList, $root.google.analytics.data.v1alpha.CreateAudienceListRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAudienceList" }); - - /** - * Calls CreateAudienceList. - * @function createAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} request CreateAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef QueryAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} [response] QueryAudienceListResponse - */ - - /** - * Calls QueryAudienceList. - * @function queryAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceListCallback} callback Node-style callback called with the error, if any, and QueryAudienceListResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.queryAudienceList = function queryAudienceList(request, callback) { - return this.rpcCall(queryAudienceList, $root.google.analytics.data.v1alpha.QueryAudienceListRequest, $root.google.analytics.data.v1alpha.QueryAudienceListResponse, request, callback); - }, "name", { value: "QueryAudienceList" }); - - /** - * Calls QueryAudienceList. - * @function queryAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} request QueryAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef GetAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.AudienceList} [response] AudienceList - */ - - /** - * Calls GetAudienceList. - * @function getAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceListCallback} callback Node-style callback called with the error, if any, and AudienceList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.getAudienceList = function getAudienceList(request, callback) { - return this.rpcCall(getAudienceList, $root.google.analytics.data.v1alpha.GetAudienceListRequest, $root.google.analytics.data.v1alpha.AudienceList, request, callback); - }, "name", { value: "GetAudienceList" }); - - /** - * Calls GetAudienceList. - * @function getAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} request GetAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listAudienceLists}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef ListAudienceListsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} [response] ListAudienceListsResponse - */ - - /** - * Calls ListAudienceLists. - * @function listAudienceLists - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceListsCallback} callback Node-style callback called with the error, if any, and ListAudienceListsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.listAudienceLists = function listAudienceLists(request, callback) { - return this.rpcCall(listAudienceLists, $root.google.analytics.data.v1alpha.ListAudienceListsRequest, $root.google.analytics.data.v1alpha.ListAudienceListsResponse, request, callback); - }, "name", { value: "ListAudienceLists" }); - - /** - * Calls ListAudienceLists. - * @function listAudienceLists - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} request ListAudienceListsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createRecurringAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef CreateRecurringAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList - */ - - /** - * Calls CreateRecurringAudienceList. - * @function createRecurringAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.createRecurringAudienceList = function createRecurringAudienceList(request, callback) { - return this.rpcCall(createRecurringAudienceList, $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); - }, "name", { value: "CreateRecurringAudienceList" }); - - /** - * Calls CreateRecurringAudienceList. - * @function createRecurringAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} request CreateRecurringAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getRecurringAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef GetRecurringAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.RecurringAudienceList} [response] RecurringAudienceList - */ - - /** - * Calls GetRecurringAudienceList. - * @function getRecurringAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceListCallback} callback Node-style callback called with the error, if any, and RecurringAudienceList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.getRecurringAudienceList = function getRecurringAudienceList(request, callback) { - return this.rpcCall(getRecurringAudienceList, $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest, $root.google.analytics.data.v1alpha.RecurringAudienceList, request, callback); - }, "name", { value: "GetRecurringAudienceList" }); - - /** - * Calls GetRecurringAudienceList. - * @function getRecurringAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} request GetRecurringAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listRecurringAudienceLists}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef ListRecurringAudienceListsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} [response] ListRecurringAudienceListsResponse - */ - - /** - * Calls ListRecurringAudienceLists. - * @function listRecurringAudienceLists - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceListsCallback} callback Node-style callback called with the error, if any, and ListRecurringAudienceListsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.listRecurringAudienceLists = function listRecurringAudienceLists(request, callback) { - return this.rpcCall(listRecurringAudienceLists, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest, $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse, request, callback); - }, "name", { value: "ListRecurringAudienceLists" }); - - /** - * Calls ListRecurringAudienceLists. - * @function listRecurringAudienceLists - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} request ListRecurringAudienceListsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getPropertyQuotasSnapshot}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef GetPropertyQuotasSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} [response] PropertyQuotasSnapshot - */ - - /** - * Calls GetPropertyQuotasSnapshot. - * @function getPropertyQuotasSnapshot - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshotCallback} callback Node-style callback called with the error, if any, and PropertyQuotasSnapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.getPropertyQuotasSnapshot = function getPropertyQuotasSnapshot(request, callback) { - return this.rpcCall(getPropertyQuotasSnapshot, $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest, $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot, request, callback); - }, "name", { value: "GetPropertyQuotasSnapshot" }); - - /** - * Calls GetPropertyQuotasSnapshot. - * @function getPropertyQuotasSnapshot - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} request GetPropertyQuotasSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|createReportTask}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef CreateReportTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateReportTask. - * @function createReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.createReportTask = function createReportTask(request, callback) { - return this.rpcCall(createReportTask, $root.google.analytics.data.v1alpha.CreateReportTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateReportTask" }); - - /** - * Calls CreateReportTask. - * @function createReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} request CreateReportTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|queryReportTask}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef QueryReportTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} [response] QueryReportTaskResponse - */ - - /** - * Calls QueryReportTask. - * @function queryReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTaskCallback} callback Node-style callback called with the error, if any, and QueryReportTaskResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.queryReportTask = function queryReportTask(request, callback) { - return this.rpcCall(queryReportTask, $root.google.analytics.data.v1alpha.QueryReportTaskRequest, $root.google.analytics.data.v1alpha.QueryReportTaskResponse, request, callback); - }, "name", { value: "QueryReportTask" }); - - /** - * Calls QueryReportTask. - * @function queryReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} request QueryReportTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getReportTask}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef GetReportTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.ReportTask} [response] ReportTask - */ - - /** - * Calls GetReportTask. - * @function getReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTaskCallback} callback Node-style callback called with the error, if any, and ReportTask - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.getReportTask = function getReportTask(request, callback) { - return this.rpcCall(getReportTask, $root.google.analytics.data.v1alpha.GetReportTaskRequest, $root.google.analytics.data.v1alpha.ReportTask, request, callback); - }, "name", { value: "GetReportTask" }); - - /** - * Calls GetReportTask. - * @function getReportTask - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} request GetReportTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|listReportTasks}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef ListReportTasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.ListReportTasksResponse} [response] ListReportTasksResponse - */ - - /** - * Calls ListReportTasks. - * @function listReportTasks - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasksCallback} callback Node-style callback called with the error, if any, and ListReportTasksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.listReportTasks = function listReportTasks(request, callback) { - return this.rpcCall(listReportTasks, $root.google.analytics.data.v1alpha.ListReportTasksRequest, $root.google.analytics.data.v1alpha.ListReportTasksResponse, request, callback); - }, "name", { value: "ListReportTasks" }); - - /** - * Calls ListReportTasks. - * @function listReportTasks - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IListReportTasksRequest} request ListReportTasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef RunReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.RunReportResponse} [response] RunReportResponse - */ - - /** - * Calls RunReport. - * @function runReport - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.runReport = function runReport(request, callback) { - return this.rpcCall(runReport, $root.google.analytics.data.v1alpha.RunReportRequest, $root.google.analytics.data.v1alpha.RunReportResponse, request, callback); - }, "name", { value: "RunReport" }); - - /** - * Calls RunReport. - * @function runReport - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef GetMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.Metadata} [response] Metadata - */ - - /** - * Calls GetMetadata. - * @function getMetadata - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { - return this.rpcCall(getMetadata, $root.google.analytics.data.v1alpha.GetMetadataRequest, $root.google.analytics.data.v1alpha.Metadata, request, callback); - }, "name", { value: "GetMetadata" }); - - /** - * Calls GetMetadata. - * @function getMetadata - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return AlphaAnalyticsData; - })(); - - v1alpha.CreateRecurringAudienceListRequest = (function() { - - /** - * Properties of a CreateRecurringAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @interface ICreateRecurringAudienceListRequest - * @property {string|null} [parent] CreateRecurringAudienceListRequest parent - * @property {google.analytics.data.v1alpha.IRecurringAudienceList|null} [recurringAudienceList] CreateRecurringAudienceListRequest recurringAudienceList - */ - - /** - * Constructs a new CreateRecurringAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CreateRecurringAudienceListRequest. - * @implements ICreateRecurringAudienceListRequest - * @constructor - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set - */ - function CreateRecurringAudienceListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateRecurringAudienceListRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @instance - */ - CreateRecurringAudienceListRequest.prototype.parent = ""; - - /** - * CreateRecurringAudienceListRequest recurringAudienceList. - * @member {google.analytics.data.v1alpha.IRecurringAudienceList|null|undefined} recurringAudienceList - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @instance - */ - CreateRecurringAudienceListRequest.prototype.recurringAudienceList = null; - - /** - * Creates a new CreateRecurringAudienceListRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest instance - */ - CreateRecurringAudienceListRequest.create = function create(properties) { - return new CreateRecurringAudienceListRequest(properties); - }; - - /** - * Encodes the specified CreateRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRecurringAudienceListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) - $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRecurringAudienceListRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateRecurringAudienceListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateRecurringAudienceListRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateRecurringAudienceListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { - var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceList); - if (error) - return "recurringAudienceList." + error; - } - return null; - }; - - /** - * Creates a CreateRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} CreateRecurringAudienceListRequest - */ - CreateRecurringAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.recurringAudienceList != null) { - if (typeof object.recurringAudienceList !== "object") - throw TypeError(".google.analytics.data.v1alpha.CreateRecurringAudienceListRequest.recurringAudienceList: object expected"); - message.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceList); - } - return message; - }; - - /** - * Creates a plain object from a CreateRecurringAudienceListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.CreateRecurringAudienceListRequest} message CreateRecurringAudienceListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRecurringAudienceListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.recurringAudienceList = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) - object.recurringAudienceList = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceList, options); - return object; - }; - - /** - * Converts this CreateRecurringAudienceListRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @instance - * @returns {Object.} JSON object - */ - CreateRecurringAudienceListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateRecurringAudienceListRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CreateRecurringAudienceListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateRecurringAudienceListRequest"; - }; - - return CreateRecurringAudienceListRequest; - })(); - - v1alpha.RecurringAudienceList = (function() { - - /** - * Properties of a RecurringAudienceList. - * @memberof google.analytics.data.v1alpha - * @interface IRecurringAudienceList - * @property {string|null} [name] RecurringAudienceList name - * @property {string|null} [audience] RecurringAudienceList audience - * @property {string|null} [audienceDisplayName] RecurringAudienceList audienceDisplayName - * @property {Array.|null} [dimensions] RecurringAudienceList dimensions - * @property {number|null} [activeDaysRemaining] RecurringAudienceList activeDaysRemaining - * @property {Array.|null} [audienceLists] RecurringAudienceList audienceLists - * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] RecurringAudienceList webhookNotification - */ - - /** - * Constructs a new RecurringAudienceList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RecurringAudienceList. - * @implements IRecurringAudienceList - * @constructor - * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set - */ - function RecurringAudienceList(properties) { - this.dimensions = []; - this.audienceLists = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecurringAudienceList name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.name = ""; - - /** - * RecurringAudienceList audience. - * @member {string} audience - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.audience = ""; - - /** - * RecurringAudienceList audienceDisplayName. - * @member {string} audienceDisplayName - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.audienceDisplayName = ""; - - /** - * RecurringAudienceList dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.dimensions = $util.emptyArray; - - /** - * RecurringAudienceList activeDaysRemaining. - * @member {number|null|undefined} activeDaysRemaining - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.activeDaysRemaining = null; - - /** - * RecurringAudienceList audienceLists. - * @member {Array.} audienceLists - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.audienceLists = $util.emptyArray; - - /** - * RecurringAudienceList webhookNotification. - * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - */ - RecurringAudienceList.prototype.webhookNotification = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(RecurringAudienceList.prototype, "_activeDaysRemaining", { - get: $util.oneOfGetter($oneOfFields = ["activeDaysRemaining"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(RecurringAudienceList.prototype, "_webhookNotification", { - get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RecurringAudienceList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {google.analytics.data.v1alpha.IRecurringAudienceList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList instance - */ - RecurringAudienceList.create = function create(properties) { - return new RecurringAudienceList(properties); - }; - - /** - * Encodes the specified RecurringAudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringAudienceList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); - if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.activeDaysRemaining != null && Object.hasOwnProperty.call(message, "activeDaysRemaining")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activeDaysRemaining); - if (message.audienceLists != null && message.audienceLists.length) - for (var i = 0; i < message.audienceLists.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.audienceLists[i]); - if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) - $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RecurringAudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RecurringAudienceList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {google.analytics.data.v1alpha.IRecurringAudienceList} message RecurringAudienceList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringAudienceList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecurringAudienceList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringAudienceList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.audience = reader.string(); - break; - } - case 3: { - message.audienceDisplayName = reader.string(); - break; - } - case 4: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); - break; - } - case 5: { - message.activeDaysRemaining = reader.int32(); - break; - } - case 6: { - if (!(message.audienceLists && message.audienceLists.length)) - message.audienceLists = []; - message.audienceLists.push(reader.string()); - break; - } - case 8: { - message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecurringAudienceList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringAudienceList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecurringAudienceList message. - * @function verify - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecurringAudienceList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.audience != null && message.hasOwnProperty("audience")) - if (!$util.isString(message.audience)) - return "audience: string expected"; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - if (!$util.isString(message.audienceDisplayName)) - return "audienceDisplayName: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { - properties._activeDaysRemaining = 1; - if (!$util.isInteger(message.activeDaysRemaining)) - return "activeDaysRemaining: integer expected"; - } - if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { - if (!Array.isArray(message.audienceLists)) - return "audienceLists: array expected"; - for (var i = 0; i < message.audienceLists.length; ++i) - if (!$util.isString(message.audienceLists[i])) - return "audienceLists: string[] expected"; - } - if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { - properties._webhookNotification = 1; - { - var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); - if (error) - return "webhookNotification." + error; - } - } - return null; - }; - - /** - * Creates a RecurringAudienceList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RecurringAudienceList} RecurringAudienceList - */ - RecurringAudienceList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RecurringAudienceList) - return object; - var message = new $root.google.analytics.data.v1alpha.RecurringAudienceList(); - if (object.name != null) - message.name = String(object.name); - if (object.audience != null) - message.audience = String(object.audience); - if (object.audienceDisplayName != null) - message.audienceDisplayName = String(object.audienceDisplayName); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); - } - } - if (object.activeDaysRemaining != null) - message.activeDaysRemaining = object.activeDaysRemaining | 0; - if (object.audienceLists) { - if (!Array.isArray(object.audienceLists)) - throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.audienceLists: array expected"); - message.audienceLists = []; - for (var i = 0; i < object.audienceLists.length; ++i) - message.audienceLists[i] = String(object.audienceLists[i]); - } - if (object.webhookNotification != null) { - if (typeof object.webhookNotification !== "object") - throw TypeError(".google.analytics.data.v1alpha.RecurringAudienceList.webhookNotification: object expected"); - message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); - } - return message; - }; - - /** - * Creates a plain object from a RecurringAudienceList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {google.analytics.data.v1alpha.RecurringAudienceList} message RecurringAudienceList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecurringAudienceList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.audienceLists = []; - } - if (options.defaults) { - object.name = ""; - object.audience = ""; - object.audienceDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.audience != null && message.hasOwnProperty("audience")) - object.audience = message.audience; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - object.audienceDisplayName = message.audienceDisplayName; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); - } - if (message.activeDaysRemaining != null && message.hasOwnProperty("activeDaysRemaining")) { - object.activeDaysRemaining = message.activeDaysRemaining; - if (options.oneofs) - object._activeDaysRemaining = "activeDaysRemaining"; - } - if (message.audienceLists && message.audienceLists.length) { - object.audienceLists = []; - for (var j = 0; j < message.audienceLists.length; ++j) - object.audienceLists[j] = message.audienceLists[j]; - } - if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { - object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); - if (options.oneofs) - object._webhookNotification = "webhookNotification"; - } - return object; - }; - - /** - * Converts this RecurringAudienceList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @instance - * @returns {Object.} JSON object - */ - RecurringAudienceList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RecurringAudienceList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RecurringAudienceList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecurringAudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RecurringAudienceList"; - }; - - return RecurringAudienceList; - })(); - - v1alpha.WebhookNotification = (function() { - - /** - * Properties of a WebhookNotification. - * @memberof google.analytics.data.v1alpha - * @interface IWebhookNotification - * @property {string|null} [uri] WebhookNotification uri - * @property {string|null} [channelToken] WebhookNotification channelToken - */ - - /** - * Constructs a new WebhookNotification. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a WebhookNotification. - * @implements IWebhookNotification - * @constructor - * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set - */ - function WebhookNotification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebhookNotification uri. - * @member {string|null|undefined} uri - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @instance - */ - WebhookNotification.prototype.uri = null; - - /** - * WebhookNotification channelToken. - * @member {string|null|undefined} channelToken - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @instance - */ - WebhookNotification.prototype.channelToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WebhookNotification.prototype, "_uri", { - get: $util.oneOfGetter($oneOfFields = ["uri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WebhookNotification.prototype, "_channelToken", { - get: $util.oneOfGetter($oneOfFields = ["channelToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WebhookNotification instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {google.analytics.data.v1alpha.IWebhookNotification=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification instance - */ - WebhookNotification.create = function create(properties) { - return new WebhookNotification(properties); - }; - - /** - * Encodes the specified WebhookNotification message. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebhookNotification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.channelToken != null && Object.hasOwnProperty.call(message, "channelToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelToken); - return writer; - }; - - /** - * Encodes the specified WebhookNotification message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.WebhookNotification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {google.analytics.data.v1alpha.IWebhookNotification} message WebhookNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebhookNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebhookNotification message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebhookNotification.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.WebhookNotification(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - case 2: { - message.channelToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebhookNotification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebhookNotification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebhookNotification message. - * @function verify - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebhookNotification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - properties._uri = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.channelToken != null && message.hasOwnProperty("channelToken")) { - properties._channelToken = 1; - if (!$util.isString(message.channelToken)) - return "channelToken: string expected"; - } - return null; - }; - - /** - * Creates a WebhookNotification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.WebhookNotification} WebhookNotification - */ - WebhookNotification.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.WebhookNotification) - return object; - var message = new $root.google.analytics.data.v1alpha.WebhookNotification(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.channelToken != null) - message.channelToken = String(object.channelToken); - return message; - }; - - /** - * Creates a plain object from a WebhookNotification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {google.analytics.data.v1alpha.WebhookNotification} message WebhookNotification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebhookNotification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object._uri = "uri"; - } - if (message.channelToken != null && message.hasOwnProperty("channelToken")) { - object.channelToken = message.channelToken; - if (options.oneofs) - object._channelToken = "channelToken"; - } - return object; - }; - - /** - * Converts this WebhookNotification to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @instance - * @returns {Object.} JSON object - */ - WebhookNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebhookNotification - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.WebhookNotification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebhookNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.WebhookNotification"; - }; - - return WebhookNotification; - })(); - - v1alpha.GetRecurringAudienceListRequest = (function() { - - /** - * Properties of a GetRecurringAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @interface IGetRecurringAudienceListRequest - * @property {string|null} [name] GetRecurringAudienceListRequest name - */ - - /** - * Constructs a new GetRecurringAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a GetRecurringAudienceListRequest. - * @implements IGetRecurringAudienceListRequest - * @constructor - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set - */ - function GetRecurringAudienceListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetRecurringAudienceListRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @instance - */ - GetRecurringAudienceListRequest.prototype.name = ""; - - /** - * Creates a new GetRecurringAudienceListRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest instance - */ - GetRecurringAudienceListRequest.create = function create(properties) { - return new GetRecurringAudienceListRequest(properties); - }; - - /** - * Encodes the specified GetRecurringAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRecurringAudienceListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetRecurringAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetRecurringAudienceListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetRecurringAudienceListRequest} message GetRecurringAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRecurringAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRecurringAudienceListRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRecurringAudienceListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRecurringAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRecurringAudienceListRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRecurringAudienceListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetRecurringAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} GetRecurringAudienceListRequest - */ - GetRecurringAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.GetRecurringAudienceListRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRecurringAudienceListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.GetRecurringAudienceListRequest} message GetRecurringAudienceListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRecurringAudienceListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetRecurringAudienceListRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @instance - * @returns {Object.} JSON object - */ - GetRecurringAudienceListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRecurringAudienceListRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.GetRecurringAudienceListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRecurringAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.GetRecurringAudienceListRequest"; - }; - - return GetRecurringAudienceListRequest; - })(); - - v1alpha.ListRecurringAudienceListsRequest = (function() { - - /** - * Properties of a ListRecurringAudienceListsRequest. - * @memberof google.analytics.data.v1alpha - * @interface IListRecurringAudienceListsRequest - * @property {string|null} [parent] ListRecurringAudienceListsRequest parent - * @property {number|null} [pageSize] ListRecurringAudienceListsRequest pageSize - * @property {string|null} [pageToken] ListRecurringAudienceListsRequest pageToken - */ - - /** - * Constructs a new ListRecurringAudienceListsRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListRecurringAudienceListsRequest. - * @implements IListRecurringAudienceListsRequest - * @constructor - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set - */ - function ListRecurringAudienceListsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRecurringAudienceListsRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @instance - */ - ListRecurringAudienceListsRequest.prototype.parent = ""; - - /** - * ListRecurringAudienceListsRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @instance - */ - ListRecurringAudienceListsRequest.prototype.pageSize = 0; - - /** - * ListRecurringAudienceListsRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @instance - */ - ListRecurringAudienceListsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListRecurringAudienceListsRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest instance - */ - ListRecurringAudienceListsRequest.create = function create(properties) { - return new ListRecurringAudienceListsRequest(properties); - }; - - /** - * Encodes the specified ListRecurringAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRecurringAudienceListsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListRecurringAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRecurringAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRecurringAudienceListsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRecurringAudienceListsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRecurringAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRecurringAudienceListsRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRecurringAudienceListsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListRecurringAudienceListsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} ListRecurringAudienceListsRequest - */ - ListRecurringAudienceListsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListRecurringAudienceListsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsRequest} message ListRecurringAudienceListsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRecurringAudienceListsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListRecurringAudienceListsRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @instance - * @returns {Object.} JSON object - */ - ListRecurringAudienceListsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRecurringAudienceListsRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRecurringAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsRequest"; - }; - - return ListRecurringAudienceListsRequest; - })(); - - v1alpha.ListRecurringAudienceListsResponse = (function() { - - /** - * Properties of a ListRecurringAudienceListsResponse. - * @memberof google.analytics.data.v1alpha - * @interface IListRecurringAudienceListsResponse - * @property {Array.|null} [recurringAudienceLists] ListRecurringAudienceListsResponse recurringAudienceLists - * @property {string|null} [nextPageToken] ListRecurringAudienceListsResponse nextPageToken - */ - - /** - * Constructs a new ListRecurringAudienceListsResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListRecurringAudienceListsResponse. - * @implements IListRecurringAudienceListsResponse - * @constructor - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set - */ - function ListRecurringAudienceListsResponse(properties) { - this.recurringAudienceLists = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRecurringAudienceListsResponse recurringAudienceLists. - * @member {Array.} recurringAudienceLists - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @instance - */ - ListRecurringAudienceListsResponse.prototype.recurringAudienceLists = $util.emptyArray; - - /** - * ListRecurringAudienceListsResponse nextPageToken. - * @member {string|null|undefined} nextPageToken - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @instance - */ - ListRecurringAudienceListsResponse.prototype.nextPageToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ListRecurringAudienceListsResponse.prototype, "_nextPageToken", { - get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListRecurringAudienceListsResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse instance - */ - ListRecurringAudienceListsResponse.create = function create(properties) { - return new ListRecurringAudienceListsResponse(properties); - }; - - /** - * Encodes the specified ListRecurringAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRecurringAudienceListsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recurringAudienceLists != null && message.recurringAudienceLists.length) - for (var i = 0; i < message.recurringAudienceLists.length; ++i) - $root.google.analytics.data.v1alpha.RecurringAudienceList.encode(message.recurringAudienceLists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListRecurringAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRecurringAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRecurringAudienceListsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.recurringAudienceLists && message.recurringAudienceLists.length)) - message.recurringAudienceLists = []; - message.recurringAudienceLists.push($root.google.analytics.data.v1alpha.RecurringAudienceList.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRecurringAudienceListsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRecurringAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRecurringAudienceListsResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRecurringAudienceListsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.recurringAudienceLists != null && message.hasOwnProperty("recurringAudienceLists")) { - if (!Array.isArray(message.recurringAudienceLists)) - return "recurringAudienceLists: array expected"; - for (var i = 0; i < message.recurringAudienceLists.length; ++i) { - var error = $root.google.analytics.data.v1alpha.RecurringAudienceList.verify(message.recurringAudienceLists[i]); - if (error) - return "recurringAudienceLists." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - properties._nextPageToken = 1; - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - } - return null; - }; - - /** - * Creates a ListRecurringAudienceListsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} ListRecurringAudienceListsResponse - */ - ListRecurringAudienceListsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.ListRecurringAudienceListsResponse(); - if (object.recurringAudienceLists) { - if (!Array.isArray(object.recurringAudienceLists)) - throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: array expected"); - message.recurringAudienceLists = []; - for (var i = 0; i < object.recurringAudienceLists.length; ++i) { - if (typeof object.recurringAudienceLists[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse.recurringAudienceLists: object expected"); - message.recurringAudienceLists[i] = $root.google.analytics.data.v1alpha.RecurringAudienceList.fromObject(object.recurringAudienceLists[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListRecurringAudienceListsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.ListRecurringAudienceListsResponse} message ListRecurringAudienceListsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRecurringAudienceListsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.recurringAudienceLists = []; - if (message.recurringAudienceLists && message.recurringAudienceLists.length) { - object.recurringAudienceLists = []; - for (var j = 0; j < message.recurringAudienceLists.length; ++j) - object.recurringAudienceLists[j] = $root.google.analytics.data.v1alpha.RecurringAudienceList.toObject(message.recurringAudienceLists[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - object.nextPageToken = message.nextPageToken; - if (options.oneofs) - object._nextPageToken = "nextPageToken"; - } - return object; - }; - - /** - * Converts this ListRecurringAudienceListsResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @instance - * @returns {Object.} JSON object - */ - ListRecurringAudienceListsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRecurringAudienceListsResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListRecurringAudienceListsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRecurringAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListRecurringAudienceListsResponse"; - }; - - return ListRecurringAudienceListsResponse; - })(); - - v1alpha.GetPropertyQuotasSnapshotRequest = (function() { - - /** - * Properties of a GetPropertyQuotasSnapshotRequest. - * @memberof google.analytics.data.v1alpha - * @interface IGetPropertyQuotasSnapshotRequest - * @property {string|null} [name] GetPropertyQuotasSnapshotRequest name - */ - - /** - * Constructs a new GetPropertyQuotasSnapshotRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a GetPropertyQuotasSnapshotRequest. - * @implements IGetPropertyQuotasSnapshotRequest - * @constructor - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set - */ - function GetPropertyQuotasSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPropertyQuotasSnapshotRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @instance - */ - GetPropertyQuotasSnapshotRequest.prototype.name = ""; - - /** - * Creates a new GetPropertyQuotasSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest instance - */ - GetPropertyQuotasSnapshotRequest.create = function create(properties) { - return new GetPropertyQuotasSnapshotRequest(properties); - }; - - /** - * Encodes the specified GetPropertyQuotasSnapshotRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPropertyQuotasSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetPropertyQuotasSnapshotRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPropertyQuotasSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPropertyQuotasSnapshotRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPropertyQuotasSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPropertyQuotasSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPropertyQuotasSnapshotRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPropertyQuotasSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetPropertyQuotasSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} GetPropertyQuotasSnapshotRequest - */ - GetPropertyQuotasSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPropertyQuotasSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest} message GetPropertyQuotasSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPropertyQuotasSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetPropertyQuotasSnapshotRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - GetPropertyQuotasSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPropertyQuotasSnapshotRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPropertyQuotasSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest"; - }; - - return GetPropertyQuotasSnapshotRequest; - })(); - - v1alpha.PropertyQuotasSnapshot = (function() { - - /** - * Properties of a PropertyQuotasSnapshot. - * @memberof google.analytics.data.v1alpha - * @interface IPropertyQuotasSnapshot - * @property {string|null} [name] PropertyQuotasSnapshot name - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [corePropertyQuota] PropertyQuotasSnapshot corePropertyQuota - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [realtimePropertyQuota] PropertyQuotasSnapshot realtimePropertyQuota - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [funnelPropertyQuota] PropertyQuotasSnapshot funnelPropertyQuota - */ - - /** - * Constructs a new PropertyQuotasSnapshot. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a PropertyQuotasSnapshot. - * @implements IPropertyQuotasSnapshot - * @constructor - * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set - */ - function PropertyQuotasSnapshot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PropertyQuotasSnapshot name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @instance - */ - PropertyQuotasSnapshot.prototype.name = ""; - - /** - * PropertyQuotasSnapshot corePropertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} corePropertyQuota - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @instance - */ - PropertyQuotasSnapshot.prototype.corePropertyQuota = null; - - /** - * PropertyQuotasSnapshot realtimePropertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} realtimePropertyQuota - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @instance - */ - PropertyQuotasSnapshot.prototype.realtimePropertyQuota = null; - - /** - * PropertyQuotasSnapshot funnelPropertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} funnelPropertyQuota - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @instance - */ - PropertyQuotasSnapshot.prototype.funnelPropertyQuota = null; - - /** - * Creates a new PropertyQuotasSnapshot instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot instance - */ - PropertyQuotasSnapshot.create = function create(properties) { - return new PropertyQuotasSnapshot(properties); - }; - - /** - * Encodes the specified PropertyQuotasSnapshot message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuotasSnapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.corePropertyQuota != null && Object.hasOwnProperty.call(message, "corePropertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.corePropertyQuota, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.realtimePropertyQuota != null && Object.hasOwnProperty.call(message, "realtimePropertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.realtimePropertyQuota, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.funnelPropertyQuota != null && Object.hasOwnProperty.call(message, "funnelPropertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.funnelPropertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified PropertyQuotasSnapshot message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuotasSnapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuotasSnapshot} message PropertyQuotasSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuotasSnapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuotasSnapshot.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 2: { - message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 3: { - message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PropertyQuotasSnapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuotasSnapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PropertyQuotasSnapshot message. - * @function verify - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PropertyQuotasSnapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.corePropertyQuota); - if (error) - return "corePropertyQuota." + error; - } - if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.realtimePropertyQuota); - if (error) - return "realtimePropertyQuota." + error; - } - if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.funnelPropertyQuota); - if (error) - return "funnelPropertyQuota." + error; - } - return null; - }; - - /** - * Creates a PropertyQuotasSnapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.PropertyQuotasSnapshot} PropertyQuotasSnapshot - */ - PropertyQuotasSnapshot.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot) - return object; - var message = new $root.google.analytics.data.v1alpha.PropertyQuotasSnapshot(); - if (object.name != null) - message.name = String(object.name); - if (object.corePropertyQuota != null) { - if (typeof object.corePropertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.corePropertyQuota: object expected"); - message.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.corePropertyQuota); - } - if (object.realtimePropertyQuota != null) { - if (typeof object.realtimePropertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.realtimePropertyQuota: object expected"); - message.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.realtimePropertyQuota); - } - if (object.funnelPropertyQuota != null) { - if (typeof object.funnelPropertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuotasSnapshot.funnelPropertyQuota: object expected"); - message.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.funnelPropertyQuota); - } - return message; - }; - - /** - * Creates a plain object from a PropertyQuotasSnapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {google.analytics.data.v1alpha.PropertyQuotasSnapshot} message PropertyQuotasSnapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PropertyQuotasSnapshot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.corePropertyQuota = null; - object.realtimePropertyQuota = null; - object.funnelPropertyQuota = null; - object.name = ""; - } - if (message.corePropertyQuota != null && message.hasOwnProperty("corePropertyQuota")) - object.corePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.corePropertyQuota, options); - if (message.realtimePropertyQuota != null && message.hasOwnProperty("realtimePropertyQuota")) - object.realtimePropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.realtimePropertyQuota, options); - if (message.funnelPropertyQuota != null && message.hasOwnProperty("funnelPropertyQuota")) - object.funnelPropertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.funnelPropertyQuota, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this PropertyQuotasSnapshot to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @instance - * @returns {Object.} JSON object - */ - PropertyQuotasSnapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PropertyQuotasSnapshot - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.PropertyQuotasSnapshot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PropertyQuotasSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuotasSnapshot"; - }; - - return PropertyQuotasSnapshot; - })(); - - v1alpha.GetAudienceListRequest = (function() { - - /** - * Properties of a GetAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @interface IGetAudienceListRequest - * @property {string|null} [name] GetAudienceListRequest name - */ - - /** - * Constructs a new GetAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a GetAudienceListRequest. - * @implements IGetAudienceListRequest - * @constructor - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set - */ - function GetAudienceListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAudienceListRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @instance - */ - GetAudienceListRequest.prototype.name = ""; - - /** - * Creates a new GetAudienceListRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest instance - */ - GetAudienceListRequest.create = function create(properties) { - return new GetAudienceListRequest(properties); - }; - - /** - * Encodes the specified GetAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAudienceListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetAudienceListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IGetAudienceListRequest} message GetAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAudienceListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAudienceListRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetAudienceListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAudienceListRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAudienceListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.GetAudienceListRequest} GetAudienceListRequest - */ - GetAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.GetAudienceListRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.GetAudienceListRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAudienceListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.GetAudienceListRequest} message GetAudienceListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAudienceListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetAudienceListRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @instance - * @returns {Object.} JSON object - */ - GetAudienceListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAudienceListRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.GetAudienceListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.GetAudienceListRequest"; - }; - - return GetAudienceListRequest; - })(); - - v1alpha.ListAudienceListsRequest = (function() { - - /** - * Properties of a ListAudienceListsRequest. - * @memberof google.analytics.data.v1alpha - * @interface IListAudienceListsRequest - * @property {string|null} [parent] ListAudienceListsRequest parent - * @property {number|null} [pageSize] ListAudienceListsRequest pageSize - * @property {string|null} [pageToken] ListAudienceListsRequest pageToken - */ - - /** - * Constructs a new ListAudienceListsRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListAudienceListsRequest. - * @implements IListAudienceListsRequest - * @constructor - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set - */ - function ListAudienceListsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAudienceListsRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @instance - */ - ListAudienceListsRequest.prototype.parent = ""; - - /** - * ListAudienceListsRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @instance - */ - ListAudienceListsRequest.prototype.pageSize = 0; - - /** - * ListAudienceListsRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @instance - */ - ListAudienceListsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAudienceListsRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest instance - */ - ListAudienceListsRequest.create = function create(properties) { - return new ListAudienceListsRequest(properties); - }; - - /** - * Encodes the specified ListAudienceListsRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceListsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListAudienceListsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsRequest} message ListAudienceListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceListsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAudienceListsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceListsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAudienceListsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceListsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAudienceListsRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAudienceListsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListAudienceListsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListAudienceListsRequest} ListAudienceListsRequest - */ - ListAudienceListsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.ListAudienceListsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListAudienceListsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {google.analytics.data.v1alpha.ListAudienceListsRequest} message ListAudienceListsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAudienceListsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListAudienceListsRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAudienceListsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAudienceListsRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListAudienceListsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAudienceListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsRequest"; - }; - - return ListAudienceListsRequest; - })(); - - v1alpha.ListAudienceListsResponse = (function() { - - /** - * Properties of a ListAudienceListsResponse. - * @memberof google.analytics.data.v1alpha - * @interface IListAudienceListsResponse - * @property {Array.|null} [audienceLists] ListAudienceListsResponse audienceLists - * @property {string|null} [nextPageToken] ListAudienceListsResponse nextPageToken - */ - - /** - * Constructs a new ListAudienceListsResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListAudienceListsResponse. - * @implements IListAudienceListsResponse - * @constructor - * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set - */ - function ListAudienceListsResponse(properties) { - this.audienceLists = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAudienceListsResponse audienceLists. - * @member {Array.} audienceLists - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @instance - */ - ListAudienceListsResponse.prototype.audienceLists = $util.emptyArray; - - /** - * ListAudienceListsResponse nextPageToken. - * @member {string|null|undefined} nextPageToken - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @instance - */ - ListAudienceListsResponse.prototype.nextPageToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ListAudienceListsResponse.prototype, "_nextPageToken", { - get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListAudienceListsResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse instance - */ - ListAudienceListsResponse.create = function create(properties) { - return new ListAudienceListsResponse(properties); - }; - - /** - * Encodes the specified ListAudienceListsResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceListsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.audienceLists != null && message.audienceLists.length) - for (var i = 0; i < message.audienceLists.length; ++i) - $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceLists[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListAudienceListsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListAudienceListsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.IListAudienceListsResponse} message ListAudienceListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceListsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAudienceListsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceListsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.audienceLists && message.audienceLists.length)) - message.audienceLists = []; - message.audienceLists.push($root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAudienceListsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceListsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAudienceListsResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAudienceListsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.audienceLists != null && message.hasOwnProperty("audienceLists")) { - if (!Array.isArray(message.audienceLists)) - return "audienceLists: array expected"; - for (var i = 0; i < message.audienceLists.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceLists[i]); - if (error) - return "audienceLists." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - properties._nextPageToken = 1; - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - } - return null; - }; - - /** - * Creates a ListAudienceListsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListAudienceListsResponse} ListAudienceListsResponse - */ - ListAudienceListsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListAudienceListsResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.ListAudienceListsResponse(); - if (object.audienceLists) { - if (!Array.isArray(object.audienceLists)) - throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: array expected"); - message.audienceLists = []; - for (var i = 0; i < object.audienceLists.length; ++i) { - if (typeof object.audienceLists[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ListAudienceListsResponse.audienceLists: object expected"); - message.audienceLists[i] = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceLists[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListAudienceListsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {google.analytics.data.v1alpha.ListAudienceListsResponse} message ListAudienceListsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAudienceListsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.audienceLists = []; - if (message.audienceLists && message.audienceLists.length) { - object.audienceLists = []; - for (var j = 0; j < message.audienceLists.length; ++j) - object.audienceLists[j] = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceLists[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - object.nextPageToken = message.nextPageToken; - if (options.oneofs) - object._nextPageToken = "nextPageToken"; - } - return object; - }; - - /** - * Converts this ListAudienceListsResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAudienceListsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAudienceListsResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListAudienceListsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAudienceListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListAudienceListsResponse"; - }; - - return ListAudienceListsResponse; - })(); - - v1alpha.CreateAudienceListRequest = (function() { - - /** - * Properties of a CreateAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @interface ICreateAudienceListRequest - * @property {string|null} [parent] CreateAudienceListRequest parent - * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] CreateAudienceListRequest audienceList - */ - - /** - * Constructs a new CreateAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CreateAudienceListRequest. - * @implements ICreateAudienceListRequest - * @constructor - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set - */ - function CreateAudienceListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateAudienceListRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @instance - */ - CreateAudienceListRequest.prototype.parent = ""; - - /** - * CreateAudienceListRequest audienceList. - * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @instance - */ - CreateAudienceListRequest.prototype.audienceList = null; - - /** - * Creates a new CreateAudienceListRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest instance - */ - CreateAudienceListRequest.create = function create(properties) { - return new CreateAudienceListRequest(properties); - }; - - /** - * Encodes the specified CreateAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAudienceListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) - $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateAudienceListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateAudienceListRequest} message CreateAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateAudienceListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAudienceListRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateAudienceListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateAudienceListRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateAudienceListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.audienceList != null && message.hasOwnProperty("audienceList")) { - var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); - if (error) - return "audienceList." + error; - } - return null; - }; - - /** - * Creates a CreateAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CreateAudienceListRequest} CreateAudienceListRequest - */ - CreateAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CreateAudienceListRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.CreateAudienceListRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.audienceList != null) { - if (typeof object.audienceList !== "object") - throw TypeError(".google.analytics.data.v1alpha.CreateAudienceListRequest.audienceList: object expected"); - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); - } - return message; - }; - - /** - * Creates a plain object from a CreateAudienceListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.CreateAudienceListRequest} message CreateAudienceListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAudienceListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.audienceList = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.audienceList != null && message.hasOwnProperty("audienceList")) - object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); - return object; - }; - - /** - * Converts this CreateAudienceListRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAudienceListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAudienceListRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CreateAudienceListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateAudienceListRequest"; - }; - - return CreateAudienceListRequest; - })(); - - v1alpha.AudienceList = (function() { - - /** - * Properties of an AudienceList. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceList - * @property {string|null} [name] AudienceList name - * @property {string|null} [audience] AudienceList audience - * @property {string|null} [audienceDisplayName] AudienceList audienceDisplayName - * @property {Array.|null} [dimensions] AudienceList dimensions - * @property {google.analytics.data.v1alpha.AudienceList.State|null} [state] AudienceList state - * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceList beginCreatingTime - * @property {number|null} [creationQuotaTokensCharged] AudienceList creationQuotaTokensCharged - * @property {number|null} [rowCount] AudienceList rowCount - * @property {string|null} [errorMessage] AudienceList errorMessage - * @property {number|null} [percentageCompleted] AudienceList percentageCompleted - * @property {string|null} [recurringAudienceList] AudienceList recurringAudienceList - * @property {google.analytics.data.v1alpha.IWebhookNotification|null} [webhookNotification] AudienceList webhookNotification - */ - - /** - * Constructs a new AudienceList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceList. - * @implements IAudienceList - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set - */ - function AudienceList(properties) { - this.dimensions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceList name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.name = ""; - - /** - * AudienceList audience. - * @member {string} audience - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.audience = ""; - - /** - * AudienceList audienceDisplayName. - * @member {string} audienceDisplayName - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.audienceDisplayName = ""; - - /** - * AudienceList dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.dimensions = $util.emptyArray; - - /** - * AudienceList state. - * @member {google.analytics.data.v1alpha.AudienceList.State|null|undefined} state - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.state = null; - - /** - * AudienceList beginCreatingTime. - * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.beginCreatingTime = null; - - /** - * AudienceList creationQuotaTokensCharged. - * @member {number} creationQuotaTokensCharged - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.creationQuotaTokensCharged = 0; - - /** - * AudienceList rowCount. - * @member {number|null|undefined} rowCount - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.rowCount = null; - - /** - * AudienceList errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.errorMessage = null; - - /** - * AudienceList percentageCompleted. - * @member {number|null|undefined} percentageCompleted - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.percentageCompleted = null; - - /** - * AudienceList recurringAudienceList. - * @member {string|null|undefined} recurringAudienceList - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.recurringAudienceList = null; - - /** - * AudienceList webhookNotification. - * @member {google.analytics.data.v1alpha.IWebhookNotification|null|undefined} webhookNotification - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - */ - AudienceList.prototype.webhookNotification = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_state", { - get: $util.oneOfGetter($oneOfFields = ["state"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_beginCreatingTime", { - get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_errorMessage", { - get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_percentageCompleted", { - get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_recurringAudienceList", { - get: $util.oneOfGetter($oneOfFields = ["recurringAudienceList"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceList.prototype, "_webhookNotification", { - get: $util.oneOfGetter($oneOfFields = ["webhookNotification"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AudienceList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {google.analytics.data.v1alpha.IAudienceList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList instance - */ - AudienceList.create = function create(properties) { - return new AudienceList(properties); - }; - - /** - * Encodes the specified AudienceList message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); - if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1alpha.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) - $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); - if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) - writer.uint32(/* id 11, wireType 1 =*/89).double(message.percentageCompleted); - if (message.recurringAudienceList != null && Object.hasOwnProperty.call(message, "recurringAudienceList")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.recurringAudienceList); - if (message.webhookNotification != null && Object.hasOwnProperty.call(message, "webhookNotification")) - $root.google.analytics.data.v1alpha.WebhookNotification.encode(message.webhookNotification, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {google.analytics.data.v1alpha.IAudienceList} message AudienceList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.audience = reader.string(); - break; - } - case 3: { - message.audienceDisplayName = reader.string(); - break; - } - case 4: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1alpha.AudienceDimension.decode(reader, reader.uint32())); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.creationQuotaTokensCharged = reader.int32(); - break; - } - case 8: { - message.rowCount = reader.int32(); - break; - } - case 9: { - message.errorMessage = reader.string(); - break; - } - case 11: { - message.percentageCompleted = reader.double(); - break; - } - case 12: { - message.recurringAudienceList = reader.string(); - break; - } - case 13: { - message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceList message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.audience != null && message.hasOwnProperty("audience")) - if (!$util.isString(message.audience)) - return "audience: string expected"; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - if (!$util.isString(message.audienceDisplayName)) - return "audienceDisplayName: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceDimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) { - properties._state = 1; - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - properties._beginCreatingTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); - if (error) - return "beginCreatingTime." + error; - } - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - if (!$util.isInteger(message.creationQuotaTokensCharged)) - return "creationQuotaTokensCharged: integer expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - properties._rowCount = 1; - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - properties._errorMessage = 1; - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - } - if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { - properties._percentageCompleted = 1; - if (typeof message.percentageCompleted !== "number") - return "percentageCompleted: number expected"; - } - if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { - properties._recurringAudienceList = 1; - if (!$util.isString(message.recurringAudienceList)) - return "recurringAudienceList: string expected"; - } - if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { - properties._webhookNotification = 1; - { - var error = $root.google.analytics.data.v1alpha.WebhookNotification.verify(message.webhookNotification); - if (error) - return "webhookNotification." + error; - } - } - return null; - }; - - /** - * Creates an AudienceList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceList} AudienceList - */ - AudienceList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceList) - return object; - var message = new $root.google.analytics.data.v1alpha.AudienceList(); - if (object.name != null) - message.name = String(object.name); - if (object.audience != null) - message.audience = String(object.audience); - if (object.audienceDisplayName != null) - message.audienceDisplayName = String(object.audienceDisplayName); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.AudienceList.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1alpha.AudienceDimension.fromObject(object.dimensions[i]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.beginCreatingTime != null) { - if (typeof object.beginCreatingTime !== "object") - throw TypeError(".google.analytics.data.v1alpha.AudienceList.beginCreatingTime: object expected"); - message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); - } - if (object.creationQuotaTokensCharged != null) - message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.percentageCompleted != null) - message.percentageCompleted = Number(object.percentageCompleted); - if (object.recurringAudienceList != null) - message.recurringAudienceList = String(object.recurringAudienceList); - if (object.webhookNotification != null) { - if (typeof object.webhookNotification !== "object") - throw TypeError(".google.analytics.data.v1alpha.AudienceList.webhookNotification: object expected"); - message.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.fromObject(object.webhookNotification); - } - return message; - }; - - /** - * Creates a plain object from an AudienceList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {google.analytics.data.v1alpha.AudienceList} message AudienceList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensions = []; - if (options.defaults) { - object.name = ""; - object.audience = ""; - object.audienceDisplayName = ""; - object.creationQuotaTokensCharged = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.audience != null && message.hasOwnProperty("audience")) - object.audience = message.audience; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - object.audienceDisplayName = message.audienceDisplayName; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1alpha.AudienceDimension.toObject(message.dimensions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) { - object.state = options.enums === String ? $root.google.analytics.data.v1alpha.AudienceList.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.AudienceList.State[message.state] : message.state; - if (options.oneofs) - object._state = "state"; - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); - if (options.oneofs) - object._beginCreatingTime = "beginCreatingTime"; - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - object.rowCount = message.rowCount; - if (options.oneofs) - object._rowCount = "rowCount"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - object.errorMessage = message.errorMessage; - if (options.oneofs) - object._errorMessage = "errorMessage"; - } - if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { - object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; - if (options.oneofs) - object._percentageCompleted = "percentageCompleted"; - } - if (message.recurringAudienceList != null && message.hasOwnProperty("recurringAudienceList")) { - object.recurringAudienceList = message.recurringAudienceList; - if (options.oneofs) - object._recurringAudienceList = "recurringAudienceList"; - } - if (message.webhookNotification != null && message.hasOwnProperty("webhookNotification")) { - object.webhookNotification = $root.google.analytics.data.v1alpha.WebhookNotification.toObject(message.webhookNotification, options); - if (options.oneofs) - object._webhookNotification = "webhookNotification"; - } - return object; - }; - - /** - * Converts this AudienceList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceList - * @instance - * @returns {Object.} JSON object - */ - AudienceList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceList"; - }; - - /** - * State enum. - * @name google.analytics.data.v1alpha.AudienceList.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} FAILED=3 FAILED value - */ - AudienceList.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return AudienceList; - })(); - - v1alpha.AudienceListMetadata = (function() { - - /** - * Properties of an AudienceListMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceListMetadata - */ - - /** - * Constructs a new AudienceListMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceListMetadata. - * @implements IAudienceListMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set - */ - function AudienceListMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new AudienceListMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {google.analytics.data.v1alpha.IAudienceListMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata instance - */ - AudienceListMetadata.create = function create(properties) { - return new AudienceListMetadata(properties); - }; - - /** - * Encodes the specified AudienceListMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceListMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AudienceListMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceListMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {google.analytics.data.v1alpha.IAudienceListMetadata} message AudienceListMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceListMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceListMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceListMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceListMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceListMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceListMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceListMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceListMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AudienceListMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceListMetadata} AudienceListMetadata - */ - AudienceListMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceListMetadata) - return object; - return new $root.google.analytics.data.v1alpha.AudienceListMetadata(); - }; - - /** - * Creates a plain object from an AudienceListMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {google.analytics.data.v1alpha.AudienceListMetadata} message AudienceListMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceListMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AudienceListMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @instance - * @returns {Object.} JSON object - */ - AudienceListMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceListMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceListMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceListMetadata"; - }; - - return AudienceListMetadata; - })(); - - v1alpha.QueryAudienceListRequest = (function() { - - /** - * Properties of a QueryAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @interface IQueryAudienceListRequest - * @property {string|null} [name] QueryAudienceListRequest name - * @property {number|Long|null} [offset] QueryAudienceListRequest offset - * @property {number|Long|null} [limit] QueryAudienceListRequest limit - */ - - /** - * Constructs a new QueryAudienceListRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QueryAudienceListRequest. - * @implements IQueryAudienceListRequest - * @constructor - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set - */ - function QueryAudienceListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAudienceListRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @instance - */ - QueryAudienceListRequest.prototype.name = ""; - - /** - * QueryAudienceListRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @instance - */ - QueryAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QueryAudienceListRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @instance - */ - QueryAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new QueryAudienceListRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest instance - */ - QueryAudienceListRequest.create = function create(properties) { - return new QueryAudienceListRequest(properties); - }; - - /** - * Encodes the specified QueryAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); - return writer; - }; - - /** - * Encodes the specified QueryAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListRequest} message QueryAudienceListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAudienceListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceListRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.offset = reader.int64(); - break; - } - case 3: { - message.limit = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAudienceListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAudienceListRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAudienceListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QueryAudienceListRequest} QueryAudienceListRequest - */ - QueryAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.QueryAudienceListRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryAudienceListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {google.analytics.data.v1alpha.QueryAudienceListRequest} message QueryAudienceListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAudienceListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - return object; - }; - - /** - * Converts this QueryAudienceListRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAudienceListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryAudienceListRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QueryAudienceListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListRequest"; - }; - - return QueryAudienceListRequest; - })(); - - v1alpha.QueryAudienceListResponse = (function() { - - /** - * Properties of a QueryAudienceListResponse. - * @memberof google.analytics.data.v1alpha - * @interface IQueryAudienceListResponse - * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] QueryAudienceListResponse audienceList - * @property {Array.|null} [audienceRows] QueryAudienceListResponse audienceRows - * @property {number|null} [rowCount] QueryAudienceListResponse rowCount - */ - - /** - * Constructs a new QueryAudienceListResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QueryAudienceListResponse. - * @implements IQueryAudienceListResponse - * @constructor - * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set - */ - function QueryAudienceListResponse(properties) { - this.audienceRows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAudienceListResponse audienceList. - * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @instance - */ - QueryAudienceListResponse.prototype.audienceList = null; - - /** - * QueryAudienceListResponse audienceRows. - * @member {Array.} audienceRows - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @instance - */ - QueryAudienceListResponse.prototype.audienceRows = $util.emptyArray; - - /** - * QueryAudienceListResponse rowCount. - * @member {number|null|undefined} rowCount - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @instance - */ - QueryAudienceListResponse.prototype.rowCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QueryAudienceListResponse.prototype, "_audienceList", { - get: $util.oneOfGetter($oneOfFields = ["audienceList"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QueryAudienceListResponse.prototype, "_rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new QueryAudienceListResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse instance - */ - QueryAudienceListResponse.create = function create(properties) { - return new QueryAudienceListResponse(properties); - }; - - /** - * Encodes the specified QueryAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceListResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) - $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.audienceRows != null && message.audienceRows.length) - for (var i = 0; i < message.audienceRows.length; ++i) - $root.google.analytics.data.v1alpha.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); - return writer; - }; - - /** - * Encodes the specified QueryAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryAudienceListResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryAudienceListResponse} message QueryAudienceListResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAudienceListResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceListResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.audienceRows && message.audienceRows.length)) - message.audienceRows = []; - message.audienceRows.push($root.google.analytics.data.v1alpha.AudienceRow.decode(reader, reader.uint32())); - break; - } - case 3: { - message.rowCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAudienceListResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAudienceListResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAudienceListResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.audienceList != null && message.hasOwnProperty("audienceList")) { - properties._audienceList = 1; - { - var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); - if (error) - return "audienceList." + error; - } - } - if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { - if (!Array.isArray(message.audienceRows)) - return "audienceRows: array expected"; - for (var i = 0; i < message.audienceRows.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceRow.verify(message.audienceRows[i]); - if (error) - return "audienceRows." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - properties._rowCount = 1; - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - } - return null; - }; - - /** - * Creates a QueryAudienceListResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QueryAudienceListResponse} QueryAudienceListResponse - */ - QueryAudienceListResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QueryAudienceListResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.QueryAudienceListResponse(); - if (object.audienceList != null) { - if (typeof object.audienceList !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceList: object expected"); - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); - } - if (object.audienceRows) { - if (!Array.isArray(object.audienceRows)) - throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: array expected"); - message.audienceRows = []; - for (var i = 0; i < object.audienceRows.length; ++i) { - if (typeof object.audienceRows[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryAudienceListResponse.audienceRows: object expected"); - message.audienceRows[i] = $root.google.analytics.data.v1alpha.AudienceRow.fromObject(object.audienceRows[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - return message; - }; - - /** - * Creates a plain object from a QueryAudienceListResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {google.analytics.data.v1alpha.QueryAudienceListResponse} message QueryAudienceListResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAudienceListResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.audienceRows = []; - if (message.audienceList != null && message.hasOwnProperty("audienceList")) { - object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); - if (options.oneofs) - object._audienceList = "audienceList"; - } - if (message.audienceRows && message.audienceRows.length) { - object.audienceRows = []; - for (var j = 0; j < message.audienceRows.length; ++j) - object.audienceRows[j] = $root.google.analytics.data.v1alpha.AudienceRow.toObject(message.audienceRows[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - object.rowCount = message.rowCount; - if (options.oneofs) - object._rowCount = "rowCount"; - } - return object; - }; - - /** - * Converts this QueryAudienceListResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAudienceListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryAudienceListResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QueryAudienceListResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryAudienceListResponse"; - }; - - return QueryAudienceListResponse; - })(); - - v1alpha.AudienceRow = (function() { - - /** - * Properties of an AudienceRow. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceRow - * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues - */ - - /** - * Constructs a new AudienceRow. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceRow. - * @implements IAudienceRow - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set - */ - function AudienceRow(properties) { - this.dimensionValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceRow dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1alpha.AudienceRow - * @instance - */ - AudienceRow.prototype.dimensionValues = $util.emptyArray; - - /** - * Creates a new AudienceRow instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance - */ - AudienceRow.create = function create(properties) { - return new AudienceRow(properties); - }; - - /** - * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceRow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceRow message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceRow.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceRow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceRow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceRow message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceRow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - return null; - }; - - /** - * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow - */ - AudienceRow.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) - return object; - var message = new $root.google.analytics.data.v1alpha.AudienceRow(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceRow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionValues = []; - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); - } - return object; - }; - - /** - * Converts this AudienceRow to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceRow - * @instance - * @returns {Object.} JSON object - */ - AudienceRow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceRow - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceRow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; - }; - - return AudienceRow; - })(); - - v1alpha.AudienceDimension = (function() { - - /** - * Properties of an AudienceDimension. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceDimension - * @property {string|null} [dimensionName] AudienceDimension dimensionName - */ - - /** - * Constructs a new AudienceDimension. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceDimension. - * @implements IAudienceDimension - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set - */ - function AudienceDimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceDimension dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @instance - */ - AudienceDimension.prototype.dimensionName = ""; - - /** - * Creates a new AudienceDimension instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance - */ - AudienceDimension.create = function create(properties) { - return new AudienceDimension(properties); - }; - - /** - * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimension.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - return writer; - }; - - /** - * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimension.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceDimension message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceDimension.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; - - /** - * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension - */ - AudienceDimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) - return object; - var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; - - /** - * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceDimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - return object; - }; - - /** - * Converts this AudienceDimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @instance - * @returns {Object.} JSON object - */ - AudienceDimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceDimension - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; - }; - - return AudienceDimension; - })(); - - v1alpha.AudienceDimensionValue = (function() { - - /** - * Properties of an AudienceDimensionValue. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceDimensionValue - * @property {string|null} [value] AudienceDimensionValue value - */ - - /** - * Constructs a new AudienceDimensionValue. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceDimensionValue. - * @implements IAudienceDimensionValue - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set - */ - function AudienceDimensionValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceDimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @instance - */ - AudienceDimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AudienceDimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @instance - */ - Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AudienceDimensionValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance - */ - AudienceDimensionValue.create = function create(properties) { - return new AudienceDimensionValue(properties); - }; - - /** - * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimensionValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceDimensionValue message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceDimensionValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue - */ - AudienceDimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) - return object; - var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceDimensionValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this AudienceDimensionValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @instance - * @returns {Object.} JSON object - */ - AudienceDimensionValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceDimensionValue - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; - }; - - return AudienceDimensionValue; - })(); - - v1alpha.RunFunnelReportRequest = (function() { - - /** - * Properties of a RunFunnelReportRequest. - * @memberof google.analytics.data.v1alpha - * @interface IRunFunnelReportRequest - * @property {string|null} [property] RunFunnelReportRequest property - * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges - * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel - * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown - * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction - * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType - * @property {Array.|null} [segments] RunFunnelReportRequest segments - * @property {number|Long|null} [limit] RunFunnelReportRequest limit - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter - * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota - */ - - /** - * Constructs a new RunFunnelReportRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunFunnelReportRequest. - * @implements IRunFunnelReportRequest - * @constructor - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set - */ - function RunFunnelReportRequest(properties) { - this.dateRanges = []; - this.segments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunFunnelReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.property = ""; - - /** - * RunFunnelReportRequest dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; - - /** - * RunFunnelReportRequest funnel. - * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnel = null; - - /** - * RunFunnelReportRequest funnelBreakdown. - * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelBreakdown = null; - - /** - * RunFunnelReportRequest funnelNextAction. - * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelNextAction = null; - - /** - * RunFunnelReportRequest funnelVisualizationType. - * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelVisualizationType = 0; - - /** - * RunFunnelReportRequest segments. - * @member {Array.} segments - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.segments = $util.emptyArray; - - /** - * RunFunnelReportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunFunnelReportRequest dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.dimensionFilter = null; - - /** - * RunFunnelReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.returnPropertyQuota = false; - - /** - * Creates a new RunFunnelReportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance - */ - RunFunnelReportRequest.create = function create(properties) { - return new RunFunnelReportRequest(properties); - }; - - /** - * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunFunnelReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) - $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) - $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) - $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); - if (message.segments != null && message.segments.length) - for (var i = 0; i < message.segments.length; ++i) - $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); - return writer; - }; - - /** - * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunFunnelReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); - break; - } - case 3: { - message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); - break; - } - case 4: { - message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); - break; - } - case 5: { - message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); - break; - } - case 6: { - message.funnelVisualizationType = reader.int32(); - break; - } - case 7: { - if (!(message.segments && message.segments.length)) - message.segments = []; - message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); - break; - } - case 9: { - message.limit = reader.int64(); - break; - } - case 10: { - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 12: { - message.returnPropertyQuota = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunFunnelReportRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunFunnelReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.funnel != null && message.hasOwnProperty("funnel")) { - var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); - if (error) - return "funnel." + error; - } - if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { - var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); - if (error) - return "funnelBreakdown." + error; - } - if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { - var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); - if (error) - return "funnelNextAction." + error; - } - if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) - switch (message.funnelVisualizationType) { - default: - return "funnelVisualizationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.segments != null && message.hasOwnProperty("segments")) { - if (!Array.isArray(message.segments)) - return "segments: array expected"; - for (var i = 0; i < message.segments.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); - if (error) - return "segments." + error; - } - } - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; - return null; - }; - - /** - * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest - */ - RunFunnelReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.funnel != null) { - if (typeof object.funnel !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); - message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); - } - if (object.funnelBreakdown != null) { - if (typeof object.funnelBreakdown !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); - message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); - } - if (object.funnelNextAction != null) { - if (typeof object.funnelNextAction !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); - message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); - } - switch (object.funnelVisualizationType) { - default: - if (typeof object.funnelVisualizationType === "number") { - message.funnelVisualizationType = object.funnelVisualizationType; - break; - } - break; - case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": - case 0: - message.funnelVisualizationType = 0; - break; - case "STANDARD_FUNNEL": - case 1: - message.funnelVisualizationType = 1; - break; - case "TRENDED_FUNNEL": - case 2: - message.funnelVisualizationType = 2; - break; - } - if (object.segments) { - if (!Array.isArray(object.segments)) - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); - message.segments = []; - for (var i = 0; i < object.segments.length; ++i) { - if (typeof object.segments[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); - message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); - } - } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); - return message; - }; - - /** - * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunFunnelReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dateRanges = []; - object.segments = []; - } - if (options.defaults) { - object.property = ""; - object.funnel = null; - object.funnelBreakdown = null; - object.funnelNextAction = null; - object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.dimensionFilter = null; - object.returnPropertyQuota = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); - } - if (message.funnel != null && message.hasOwnProperty("funnel")) - object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); - if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) - object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); - if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) - object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); - if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) - object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; - if (message.segments && message.segments.length) { - object.segments = []; - for (var j = 0; j < message.segments.length; ++j) - object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); - } - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; - return object; - }; - - /** - * Converts this RunFunnelReportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - * @returns {Object.} JSON object - */ - RunFunnelReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunFunnelReportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; - }; - - /** - * FunnelVisualizationType enum. - * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType - * @enum {number} - * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value - * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value - * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value - */ - RunFunnelReportRequest.FunnelVisualizationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD_FUNNEL"] = 1; - values[valuesById[2] = "TRENDED_FUNNEL"] = 2; - return values; - })(); - - return RunFunnelReportRequest; - })(); - - v1alpha.RunFunnelReportResponse = (function() { - - /** - * Properties of a RunFunnelReportResponse. - * @memberof google.analytics.data.v1alpha - * @interface IRunFunnelReportResponse - * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable - * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota - * @property {string|null} [kind] RunFunnelReportResponse kind - */ - - /** - * Constructs a new RunFunnelReportResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunFunnelReportResponse. - * @implements IRunFunnelReportResponse - * @constructor - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set - */ - function RunFunnelReportResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunFunnelReportResponse funnelTable. - * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - */ - RunFunnelReportResponse.prototype.funnelTable = null; - - /** - * RunFunnelReportResponse funnelVisualization. - * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - */ - RunFunnelReportResponse.prototype.funnelVisualization = null; - - /** - * RunFunnelReportResponse propertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - */ - RunFunnelReportResponse.prototype.propertyQuota = null; - - /** - * RunFunnelReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - */ - RunFunnelReportResponse.prototype.kind = ""; - - /** - * Creates a new RunFunnelReportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance - */ - RunFunnelReportResponse.create = function create(properties) { - return new RunFunnelReportResponse(properties); - }; - - /** - * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunFunnelReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) - $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) - $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); - return writer; - }; - - /** - * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunFunnelReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); - break; - } - case 3: { - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 4: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunFunnelReportResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunFunnelReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { - var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); - if (error) - return "funnelTable." + error; - } - if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { - var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); - if (error) - return "funnelVisualization." + error; - } - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); - if (error) - return "propertyQuota." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse - */ - RunFunnelReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); - if (object.funnelTable != null) { - if (typeof object.funnelTable !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); - message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); - } - if (object.funnelVisualization != null) { - if (typeof object.funnelVisualization !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); - message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); - } - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunFunnelReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.funnelTable = null; - object.funnelVisualization = null; - object.propertyQuota = null; - object.kind = ""; - } - if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) - object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); - if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) - object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this RunFunnelReportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - * @returns {Object.} JSON object - */ - RunFunnelReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunFunnelReportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; - }; - - return RunFunnelReportResponse; - })(); - - v1alpha.ReportTask = (function() { - - /** - * Properties of a ReportTask. - * @memberof google.analytics.data.v1alpha - * @interface IReportTask - * @property {string|null} [name] ReportTask name - * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition - * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata - */ - - /** - * Constructs a new ReportTask. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ReportTask. - * @implements IReportTask - * @constructor - * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set - */ - function ReportTask(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReportTask name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.name = ""; - - /** - * ReportTask reportDefinition. - * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.reportDefinition = null; - - /** - * ReportTask reportMetadata. - * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.reportMetadata = null; - - /** - * Creates a new ReportTask instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance - */ - ReportTask.create = function create(properties) { - return new ReportTask(properties); - }; - - /** - * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) - $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) - $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReportTask message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); - break; - } - case 3: { - message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReportTask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReportTask message. - * @function verify - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportTask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { - var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); - if (error) - return "reportDefinition." + error; - } - if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { - var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); - if (error) - return "reportMetadata." + error; - } - return null; - }; - - /** - * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - */ - ReportTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) - return object; - var message = new $root.google.analytics.data.v1alpha.ReportTask(); - if (object.name != null) - message.name = String(object.name); - if (object.reportDefinition != null) { - if (typeof object.reportDefinition !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); - message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); - } - if (object.reportMetadata != null) { - if (typeof object.reportMetadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); - message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); - } - return message; - }; - - /** - * Creates a plain object from a ReportTask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportTask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.reportDefinition = null; - object.reportMetadata = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) - object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); - if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) - object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); - return object; - }; - - /** - * Converts this ReportTask to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - * @returns {Object.} JSON object - */ - ReportTask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportTask - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; - }; - - ReportTask.ReportDefinition = (function() { - - /** - * Properties of a ReportDefinition. - * @memberof google.analytics.data.v1alpha.ReportTask - * @interface IReportDefinition - * @property {Array.|null} [dimensions] ReportDefinition dimensions - * @property {Array.|null} [metrics] ReportDefinition metrics - * @property {Array.|null} [dateRanges] ReportDefinition dateRanges - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter - * @property {number|Long|null} [offset] ReportDefinition offset - * @property {number|Long|null} [limit] ReportDefinition limit - * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations - * @property {Array.|null} [orderBys] ReportDefinition orderBys - * @property {string|null} [currencyCode] ReportDefinition currencyCode - * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec - * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows - * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel - */ - - /** - * Constructs a new ReportDefinition. - * @memberof google.analytics.data.v1alpha.ReportTask - * @classdesc Represents a ReportDefinition. - * @implements IReportDefinition - * @constructor - * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set - */ - function ReportDefinition(properties) { - this.dimensions = []; - this.metrics = []; - this.dateRanges = []; - this.metricAggregations = []; - this.orderBys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReportDefinition dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dimensions = $util.emptyArray; - - /** - * ReportDefinition metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metrics = $util.emptyArray; - - /** - * ReportDefinition dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dateRanges = $util.emptyArray; - - /** - * ReportDefinition dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dimensionFilter = null; - - /** - * ReportDefinition metricFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metricFilter = null; - - /** - * ReportDefinition offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReportDefinition limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReportDefinition metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metricAggregations = $util.emptyArray; - - /** - * ReportDefinition orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.orderBys = $util.emptyArray; - - /** - * ReportDefinition currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.currencyCode = ""; - - /** - * ReportDefinition cohortSpec. - * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.cohortSpec = null; - - /** - * ReportDefinition keepEmptyRows. - * @member {boolean} keepEmptyRows - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.keepEmptyRows = false; - - /** - * ReportDefinition samplingLevel. - * @member {google.analytics.data.v1alpha.SamplingLevel|null|undefined} samplingLevel - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.samplingLevel = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportDefinition.prototype, "_samplingLevel", { - get: $util.oneOfGetter($oneOfFields = ["samplingLevel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ReportDefinition instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition instance - */ - ReportDefinition.create = function create(properties) { - return new ReportDefinition(properties); - }; - - /** - * Encodes the specified ReportDefinition message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportDefinition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); - if (message.metricAggregations != null && message.metricAggregations.length) { - writer.uint32(/* id 9, wireType 2 =*/74).fork(); - for (var i = 0; i < message.metricAggregations.length; ++i) - writer.int32(message.metricAggregations[i]); - writer.ldelim(); - } - if (message.orderBys != null && message.orderBys.length) - for (var i = 0; i < message.orderBys.length; ++i) - $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); - if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) - $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); - if (message.samplingLevel != null && Object.hasOwnProperty.call(message, "samplingLevel")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.samplingLevel); - return writer; - }; - - /** - * Encodes the specified ReportDefinition message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition} message ReportDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReportDefinition message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportDefinition.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); - break; - } - case 5: { - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 7: { - message.offset = reader.int64(); - break; - } - case 8: { - message.limit = reader.int64(); - break; - } - case 9: { - if (!(message.metricAggregations && message.metricAggregations.length)) - message.metricAggregations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metricAggregations.push(reader.int32()); - } else - message.metricAggregations.push(reader.int32()); - break; - } - case 10: { - if (!(message.orderBys && message.orderBys.length)) - message.orderBys = []; - message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); - break; - } - case 11: { - message.currencyCode = reader.string(); - break; - } - case 12: { - message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); - break; - } - case 13: { - message.keepEmptyRows = reader.bool(); - break; - } - case 14: { - message.samplingLevel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReportDefinition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportDefinition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReportDefinition message. - * @function verify - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportDefinition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { - if (!Array.isArray(message.metricAggregations)) - return "metricAggregations: array expected"; - for (var i = 0; i < message.metricAggregations.length; ++i) - switch (message.metricAggregations[i]) { - default: - return "metricAggregations: enum value[] expected"; - case 0: - case 1: - case 5: - case 6: - case 4: - break; - } - } - if (message.orderBys != null && message.hasOwnProperty("orderBys")) { - if (!Array.isArray(message.orderBys)) - return "orderBys: array expected"; - for (var i = 0; i < message.orderBys.length; ++i) { - var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); - if (error) - return "orderBys." + error; - } - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { - var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); - if (error) - return "cohortSpec." + error; - } - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - if (typeof message.keepEmptyRows !== "boolean") - return "keepEmptyRows: boolean expected"; - if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { - properties._samplingLevel = 1; - switch (message.samplingLevel) { - default: - return "samplingLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a ReportDefinition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ReportTask.ReportDefinition} ReportDefinition - */ - ReportDefinition.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition) - return object; - var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition(); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); - } - } - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); - } - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.metricAggregations) { - if (!Array.isArray(object.metricAggregations)) - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.metricAggregations: array expected"); - message.metricAggregations = []; - for (var i = 0; i < object.metricAggregations.length; ++i) - switch (object.metricAggregations[i]) { - default: - if (typeof object.metricAggregations[i] === "number") { - message.metricAggregations[i] = object.metricAggregations[i]; - break; - } - case "METRIC_AGGREGATION_UNSPECIFIED": - case 0: - message.metricAggregations[i] = 0; - break; - case "TOTAL": - case 1: - message.metricAggregations[i] = 1; - break; - case "MINIMUM": - case 5: - message.metricAggregations[i] = 5; - break; - case "MAXIMUM": - case 6: - message.metricAggregations[i] = 6; - break; - case "COUNT": - case 4: - message.metricAggregations[i] = 4; - break; - } - } - if (object.orderBys) { - if (!Array.isArray(object.orderBys)) - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: array expected"); - message.orderBys = []; - for (var i = 0; i < object.orderBys.length; ++i) { - if (typeof object.orderBys[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.orderBys: object expected"); - message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); - } - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.cohortSpec != null) { - if (typeof object.cohortSpec !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportDefinition.cohortSpec: object expected"); - message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); - } - if (object.keepEmptyRows != null) - message.keepEmptyRows = Boolean(object.keepEmptyRows); - switch (object.samplingLevel) { - default: - if (typeof object.samplingLevel === "number") { - message.samplingLevel = object.samplingLevel; - break; - } - break; - case "SAMPLING_LEVEL_UNSPECIFIED": - case 0: - message.samplingLevel = 0; - break; - case "LOW": - case 1: - message.samplingLevel = 1; - break; - case "MEDIUM": - case 2: - message.samplingLevel = 2; - break; - case "UNSAMPLED": - case 3: - message.samplingLevel = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a ReportDefinition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {google.analytics.data.v1alpha.ReportTask.ReportDefinition} message ReportDefinition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportDefinition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.dateRanges = []; - object.metricAggregations = []; - object.orderBys = []; - } - if (options.defaults) { - object.dimensionFilter = null; - object.metricFilter = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.currencyCode = ""; - object.cohortSpec = null; - object.keepEmptyRows = false; - } - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); - } - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.metricAggregations && message.metricAggregations.length) { - object.metricAggregations = []; - for (var j = 0; j < message.metricAggregations.length; ++j) - object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; - } - if (message.orderBys && message.orderBys.length) { - object.orderBys = []; - for (var j = 0; j < message.orderBys.length; ++j) - object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) - object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - object.keepEmptyRows = message.keepEmptyRows; - if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) { - object.samplingLevel = options.enums === String ? $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] === undefined ? message.samplingLevel : $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] : message.samplingLevel; - if (options.oneofs) - object._samplingLevel = "samplingLevel"; - } - return object; - }; - - /** - * Converts this ReportDefinition to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - * @returns {Object.} JSON object - */ - ReportDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportDefinition - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportDefinition"; - }; - - return ReportDefinition; - })(); - - ReportTask.ReportMetadata = (function() { - - /** - * Properties of a ReportMetadata. - * @memberof google.analytics.data.v1alpha.ReportTask - * @interface IReportMetadata - * @property {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null} [state] ReportMetadata state - * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] ReportMetadata beginCreatingTime - * @property {number|null} [creationQuotaTokensCharged] ReportMetadata creationQuotaTokensCharged - * @property {number|null} [taskRowCount] ReportMetadata taskRowCount - * @property {string|null} [errorMessage] ReportMetadata errorMessage - * @property {number|null} [totalRowCount] ReportMetadata totalRowCount - */ - - /** - * Constructs a new ReportMetadata. - * @memberof google.analytics.data.v1alpha.ReportTask - * @classdesc Represents a ReportMetadata. - * @implements IReportMetadata - * @constructor - * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set - */ - function ReportMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReportMetadata state. - * @member {google.analytics.data.v1alpha.ReportTask.ReportMetadata.State|null|undefined} state - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.state = null; - - /** - * ReportMetadata beginCreatingTime. - * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.beginCreatingTime = null; - - /** - * ReportMetadata creationQuotaTokensCharged. - * @member {number} creationQuotaTokensCharged - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.creationQuotaTokensCharged = 0; - - /** - * ReportMetadata taskRowCount. - * @member {number|null|undefined} taskRowCount - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.taskRowCount = null; - - /** - * ReportMetadata errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.errorMessage = null; - - /** - * ReportMetadata totalRowCount. - * @member {number|null|undefined} totalRowCount - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - */ - ReportMetadata.prototype.totalRowCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportMetadata.prototype, "_state", { - get: $util.oneOfGetter($oneOfFields = ["state"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportMetadata.prototype, "_beginCreatingTime", { - get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportMetadata.prototype, "_taskRowCount", { - get: $util.oneOfGetter($oneOfFields = ["taskRowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportMetadata.prototype, "_errorMessage", { - get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ReportMetadata.prototype, "_totalRowCount", { - get: $util.oneOfGetter($oneOfFields = ["totalRowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ReportMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata instance - */ - ReportMetadata.create = function create(properties) { - return new ReportMetadata(properties); - }; - - /** - * Encodes the specified ReportMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) - $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.creationQuotaTokensCharged); - if (message.taskRowCount != null && Object.hasOwnProperty.call(message, "taskRowCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.taskRowCount); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorMessage); - if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalRowCount); - return writer; - }; - - /** - * Encodes the specified ReportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {google.analytics.data.v1alpha.ReportTask.IReportMetadata} message ReportMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReportMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.creationQuotaTokensCharged = reader.int32(); - break; - } - case 4: { - message.taskRowCount = reader.int32(); - break; - } - case 5: { - message.errorMessage = reader.string(); - break; - } - case 6: { - message.totalRowCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReportMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReportMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.state != null && message.hasOwnProperty("state")) { - properties._state = 1; - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - properties._beginCreatingTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); - if (error) - return "beginCreatingTime." + error; - } - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - if (!$util.isInteger(message.creationQuotaTokensCharged)) - return "creationQuotaTokensCharged: integer expected"; - if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { - properties._taskRowCount = 1; - if (!$util.isInteger(message.taskRowCount)) - return "taskRowCount: integer expected"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - properties._errorMessage = 1; - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { - properties._totalRowCount = 1; - if (!$util.isInteger(message.totalRowCount)) - return "totalRowCount: integer expected"; - } - return null; - }; - - /** - * Creates a ReportMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ReportTask.ReportMetadata} ReportMetadata - */ - ReportMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.beginCreatingTime != null) { - if (typeof object.beginCreatingTime !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.ReportMetadata.beginCreatingTime: object expected"); - message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); - } - if (object.creationQuotaTokensCharged != null) - message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; - if (object.taskRowCount != null) - message.taskRowCount = object.taskRowCount | 0; - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.totalRowCount != null) - message.totalRowCount = object.totalRowCount | 0; - return message; - }; - - /** - * Creates a plain object from a ReportMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {google.analytics.data.v1alpha.ReportTask.ReportMetadata} message ReportMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.creationQuotaTokensCharged = 0; - if (message.state != null && message.hasOwnProperty("state")) { - object.state = options.enums === String ? $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.State[message.state] : message.state; - if (options.oneofs) - object._state = "state"; - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); - if (options.oneofs) - object._beginCreatingTime = "beginCreatingTime"; - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; - if (message.taskRowCount != null && message.hasOwnProperty("taskRowCount")) { - object.taskRowCount = message.taskRowCount; - if (options.oneofs) - object._taskRowCount = "taskRowCount"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - object.errorMessage = message.errorMessage; - if (options.oneofs) - object._errorMessage = "errorMessage"; - } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) { - object.totalRowCount = message.totalRowCount; - if (options.oneofs) - object._totalRowCount = "totalRowCount"; - } - return object; - }; - - /** - * Converts this ReportMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @instance - * @returns {Object.} JSON object - */ - ReportMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ReportTask.ReportMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask.ReportMetadata"; - }; - - /** - * State enum. - * @name google.analytics.data.v1alpha.ReportTask.ReportMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} FAILED=3 FAILED value - */ - ReportMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return ReportMetadata; - })(); - - return ReportTask; - })(); - - v1alpha.CreateReportTaskRequest = (function() { - - /** - * Properties of a CreateReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @interface ICreateReportTaskRequest - * @property {string|null} [parent] CreateReportTaskRequest parent - * @property {google.analytics.data.v1alpha.IReportTask|null} [reportTask] CreateReportTaskRequest reportTask - */ - - /** - * Constructs a new CreateReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CreateReportTaskRequest. - * @implements ICreateReportTaskRequest - * @constructor - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set - */ - function CreateReportTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateReportTaskRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @instance - */ - CreateReportTaskRequest.prototype.parent = ""; - - /** - * CreateReportTaskRequest reportTask. - * @member {google.analytics.data.v1alpha.IReportTask|null|undefined} reportTask - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @instance - */ - CreateReportTaskRequest.prototype.reportTask = null; - - /** - * Creates a new CreateReportTaskRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest instance - */ - CreateReportTaskRequest.create = function create(properties) { - return new CreateReportTaskRequest(properties); - }; - - /** - * Encodes the specified CreateReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReportTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.reportTask != null && Object.hasOwnProperty.call(message, "reportTask")) - $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CreateReportTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.ICreateReportTaskRequest} message CreateReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateReportTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReportTaskRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateReportTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateReportTaskRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateReportTaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.reportTask != null && message.hasOwnProperty("reportTask")) { - var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTask); - if (error) - return "reportTask." + error; - } - return null; - }; - - /** - * Creates a CreateReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CreateReportTaskRequest} CreateReportTaskRequest - */ - CreateReportTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CreateReportTaskRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.CreateReportTaskRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.reportTask != null) { - if (typeof object.reportTask !== "object") - throw TypeError(".google.analytics.data.v1alpha.CreateReportTaskRequest.reportTask: object expected"); - message.reportTask = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTask); - } - return message; - }; - - /** - * Creates a plain object from a CreateReportTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.CreateReportTaskRequest} message CreateReportTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateReportTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.reportTask = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.reportTask != null && message.hasOwnProperty("reportTask")) - object.reportTask = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTask, options); - return object; - }; - - /** - * Converts this CreateReportTaskRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @instance - * @returns {Object.} JSON object - */ - CreateReportTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateReportTaskRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CreateReportTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CreateReportTaskRequest"; - }; - - return CreateReportTaskRequest; - })(); - - v1alpha.ReportTaskMetadata = (function() { - - /** - * Properties of a ReportTaskMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IReportTaskMetadata - */ - - /** - * Constructs a new ReportTaskMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ReportTaskMetadata. - * @implements IReportTaskMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set - */ - function ReportTaskMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReportTaskMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {google.analytics.data.v1alpha.IReportTaskMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata instance - */ - ReportTaskMetadata.create = function create(properties) { - return new ReportTaskMetadata(properties); - }; - - /** - * Encodes the specified ReportTaskMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTaskMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReportTaskMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTaskMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {google.analytics.data.v1alpha.IReportTaskMetadata} message ReportTaskMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTaskMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReportTaskMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTaskMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReportTaskMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTaskMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReportTaskMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportTaskMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReportTaskMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ReportTaskMetadata} ReportTaskMetadata - */ - ReportTaskMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ReportTaskMetadata) - return object; - return new $root.google.analytics.data.v1alpha.ReportTaskMetadata(); - }; - - /** - * Creates a plain object from a ReportTaskMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {google.analytics.data.v1alpha.ReportTaskMetadata} message ReportTaskMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportTaskMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReportTaskMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @instance - * @returns {Object.} JSON object - */ - ReportTaskMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportTaskMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ReportTaskMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportTaskMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTaskMetadata"; - }; - - return ReportTaskMetadata; - })(); - - v1alpha.QueryReportTaskRequest = (function() { - - /** - * Properties of a QueryReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @interface IQueryReportTaskRequest - * @property {string|null} [name] QueryReportTaskRequest name - * @property {number|Long|null} [offset] QueryReportTaskRequest offset - * @property {number|Long|null} [limit] QueryReportTaskRequest limit - */ - - /** - * Constructs a new QueryReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QueryReportTaskRequest. - * @implements IQueryReportTaskRequest - * @constructor - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set - */ - function QueryReportTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryReportTaskRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @instance - */ - QueryReportTaskRequest.prototype.name = ""; - - /** - * QueryReportTaskRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @instance - */ - QueryReportTaskRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QueryReportTaskRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @instance - */ - QueryReportTaskRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new QueryReportTaskRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest instance - */ - QueryReportTaskRequest.create = function create(properties) { - return new QueryReportTaskRequest(properties); - }; - - /** - * Encodes the specified QueryReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryReportTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); - return writer; - }; - - /** - * Encodes the specified QueryReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskRequest} message QueryReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryReportTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryReportTaskRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.offset = reader.int64(); - break; - } - case 3: { - message.limit = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryReportTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryReportTaskRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryReportTaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QueryReportTaskRequest} QueryReportTaskRequest - */ - QueryReportTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.QueryReportTaskRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryReportTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.QueryReportTaskRequest} message QueryReportTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryReportTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - return object; - }; - - /** - * Converts this QueryReportTaskRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @instance - * @returns {Object.} JSON object - */ - QueryReportTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryReportTaskRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QueryReportTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskRequest"; - }; - - return QueryReportTaskRequest; - })(); - - v1alpha.QueryReportTaskResponse = (function() { - - /** - * Properties of a QueryReportTaskResponse. - * @memberof google.analytics.data.v1alpha - * @interface IQueryReportTaskResponse - * @property {Array.|null} [dimensionHeaders] QueryReportTaskResponse dimensionHeaders - * @property {Array.|null} [metricHeaders] QueryReportTaskResponse metricHeaders - * @property {Array.|null} [rows] QueryReportTaskResponse rows - * @property {Array.|null} [totals] QueryReportTaskResponse totals - * @property {Array.|null} [maximums] QueryReportTaskResponse maximums - * @property {Array.|null} [minimums] QueryReportTaskResponse minimums - * @property {number|null} [rowCount] QueryReportTaskResponse rowCount - * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] QueryReportTaskResponse metadata - */ - - /** - * Constructs a new QueryReportTaskResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QueryReportTaskResponse. - * @implements IQueryReportTaskResponse - * @constructor - * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set - */ - function QueryReportTaskResponse(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - this.totals = []; - this.maximums = []; - this.minimums = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryReportTaskResponse dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.dimensionHeaders = $util.emptyArray; - - /** - * QueryReportTaskResponse metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.metricHeaders = $util.emptyArray; - - /** - * QueryReportTaskResponse rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.rows = $util.emptyArray; - - /** - * QueryReportTaskResponse totals. - * @member {Array.} totals - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.totals = $util.emptyArray; - - /** - * QueryReportTaskResponse maximums. - * @member {Array.} maximums - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.maximums = $util.emptyArray; - - /** - * QueryReportTaskResponse minimums. - * @member {Array.} minimums - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.minimums = $util.emptyArray; - - /** - * QueryReportTaskResponse rowCount. - * @member {number} rowCount - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.rowCount = 0; - - /** - * QueryReportTaskResponse metadata. - * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - */ - QueryReportTaskResponse.prototype.metadata = null; - - /** - * Creates a new QueryReportTaskResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse instance - */ - QueryReportTaskResponse.create = function create(properties) { - return new QueryReportTaskResponse(properties); - }; - - /** - * Encodes the specified QueryReportTaskResponse message. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryReportTaskResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totals != null && message.totals.length) - for (var i = 0; i < message.totals.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maximums != null && message.maximums.length) - for (var i = 0; i < message.maximums.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.minimums != null && message.minimums.length) - for (var i = 0; i < message.minimums.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryReportTaskResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QueryReportTaskResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {google.analytics.data.v1alpha.IQueryReportTaskResponse} message QueryReportTaskResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryReportTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryReportTaskResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryReportTaskResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.totals && message.totals.length)) - message.totals = []; - message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.maximums && message.maximums.length)) - message.maximums = []; - message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.minimums && message.minimums.length)) - message.minimums = []; - message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 7: { - message.rowCount = reader.int32(); - break; - } - case 8: { - message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryReportTaskResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryReportTaskResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryReportTaskResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryReportTaskResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.totals != null && message.hasOwnProperty("totals")) { - if (!Array.isArray(message.totals)) - return "totals: array expected"; - for (var i = 0; i < message.totals.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); - if (error) - return "totals." + error; - } - } - if (message.maximums != null && message.hasOwnProperty("maximums")) { - if (!Array.isArray(message.maximums)) - return "maximums: array expected"; - for (var i = 0; i < message.maximums.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); - if (error) - return "maximums." + error; - } - } - if (message.minimums != null && message.hasOwnProperty("minimums")) { - if (!Array.isArray(message.minimums)) - return "minimums: array expected"; - for (var i = 0; i < message.minimums.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); - if (error) - return "minimums." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a QueryReportTaskResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QueryReportTaskResponse} QueryReportTaskResponse - */ - QueryReportTaskResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QueryReportTaskResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.QueryReportTaskResponse(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); - } - } - if (object.totals) { - if (!Array.isArray(object.totals)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: array expected"); - message.totals = []; - for (var i = 0; i < object.totals.length; ++i) { - if (typeof object.totals[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.totals: object expected"); - message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); - } - } - if (object.maximums) { - if (!Array.isArray(object.maximums)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: array expected"); - message.maximums = []; - for (var i = 0; i < object.maximums.length; ++i) { - if (typeof object.maximums[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.maximums: object expected"); - message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); - } - } - if (object.minimums) { - if (!Array.isArray(object.minimums)) - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: array expected"); - message.minimums = []; - for (var i = 0; i < object.minimums.length; ++i) { - if (typeof object.minimums[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.minimums: object expected"); - message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.QueryReportTaskResponse.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a QueryReportTaskResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {google.analytics.data.v1alpha.QueryReportTaskResponse} message QueryReportTaskResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryReportTaskResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - object.totals = []; - object.maximums = []; - object.minimums = []; - } - if (options.defaults) { - object.rowCount = 0; - object.metadata = null; - } - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); - } - if (message.totals && message.totals.length) { - object.totals = []; - for (var j = 0; j < message.totals.length; ++j) - object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); - } - if (message.maximums && message.maximums.length) { - object.maximums = []; - for (var j = 0; j < message.maximums.length; ++j) - object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); - } - if (message.minimums && message.minimums.length) { - object.minimums = []; - for (var j = 0; j < message.minimums.length; ++j) - object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this QueryReportTaskResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @instance - * @returns {Object.} JSON object - */ - QueryReportTaskResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryReportTaskResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QueryReportTaskResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryReportTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QueryReportTaskResponse"; - }; - - return QueryReportTaskResponse; - })(); - - v1alpha.GetReportTaskRequest = (function() { - - /** - * Properties of a GetReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @interface IGetReportTaskRequest - * @property {string|null} [name] GetReportTaskRequest name - */ - - /** - * Constructs a new GetReportTaskRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a GetReportTaskRequest. - * @implements IGetReportTaskRequest - * @constructor - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set - */ - function GetReportTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetReportTaskRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @instance - */ - GetReportTaskRequest.prototype.name = ""; - - /** - * Creates a new GetReportTaskRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest instance - */ - GetReportTaskRequest.create = function create(properties) { - return new GetReportTaskRequest(properties); - }; - - /** - * Encodes the specified GetReportTaskRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReportTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetReportTaskRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetReportTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.IGetReportTaskRequest} message GetReportTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReportTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetReportTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReportTaskRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetReportTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReportTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetReportTaskRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetReportTaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetReportTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.GetReportTaskRequest} GetReportTaskRequest - */ - GetReportTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.GetReportTaskRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.GetReportTaskRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetReportTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {google.analytics.data.v1alpha.GetReportTaskRequest} message GetReportTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetReportTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetReportTaskRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @instance - * @returns {Object.} JSON object - */ - GetReportTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetReportTaskRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.GetReportTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetReportTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.GetReportTaskRequest"; - }; - - return GetReportTaskRequest; - })(); - - v1alpha.ListReportTasksRequest = (function() { - - /** - * Properties of a ListReportTasksRequest. - * @memberof google.analytics.data.v1alpha - * @interface IListReportTasksRequest - * @property {string|null} [parent] ListReportTasksRequest parent - * @property {number|null} [pageSize] ListReportTasksRequest pageSize - * @property {string|null} [pageToken] ListReportTasksRequest pageToken - */ - - /** - * Constructs a new ListReportTasksRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListReportTasksRequest. - * @implements IListReportTasksRequest - * @constructor - * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set - */ - function ListReportTasksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListReportTasksRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @instance - */ - ListReportTasksRequest.prototype.parent = ""; - - /** - * ListReportTasksRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @instance - */ - ListReportTasksRequest.prototype.pageSize = 0; - - /** - * ListReportTasksRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @instance - */ - ListReportTasksRequest.prototype.pageToken = ""; - - /** - * Creates a new ListReportTasksRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest instance - */ - ListReportTasksRequest.create = function create(properties) { - return new ListReportTasksRequest(properties); - }; - - /** - * Encodes the specified ListReportTasksRequest message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReportTasksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListReportTasksRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksRequest} message ListReportTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReportTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListReportTasksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReportTasksRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListReportTasksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReportTasksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListReportTasksRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListReportTasksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListReportTasksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListReportTasksRequest} ListReportTasksRequest - */ - ListReportTasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.ListReportTasksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListReportTasksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {google.analytics.data.v1alpha.ListReportTasksRequest} message ListReportTasksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListReportTasksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListReportTasksRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @instance - * @returns {Object.} JSON object - */ - ListReportTasksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListReportTasksRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListReportTasksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListReportTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksRequest"; - }; - - return ListReportTasksRequest; - })(); - - v1alpha.ListReportTasksResponse = (function() { - - /** - * Properties of a ListReportTasksResponse. - * @memberof google.analytics.data.v1alpha - * @interface IListReportTasksResponse - * @property {Array.|null} [reportTasks] ListReportTasksResponse reportTasks - * @property {string|null} [nextPageToken] ListReportTasksResponse nextPageToken - */ - - /** - * Constructs a new ListReportTasksResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ListReportTasksResponse. - * @implements IListReportTasksResponse - * @constructor - * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set - */ - function ListReportTasksResponse(properties) { - this.reportTasks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListReportTasksResponse reportTasks. - * @member {Array.} reportTasks - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @instance - */ - ListReportTasksResponse.prototype.reportTasks = $util.emptyArray; - - /** - * ListReportTasksResponse nextPageToken. - * @member {string|null|undefined} nextPageToken - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @instance - */ - ListReportTasksResponse.prototype.nextPageToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ListReportTasksResponse.prototype, "_nextPageToken", { - get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListReportTasksResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse instance - */ - ListReportTasksResponse.create = function create(properties) { - return new ListReportTasksResponse(properties); - }; - - /** - * Encodes the specified ListReportTasksResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReportTasksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reportTasks != null && message.reportTasks.length) - for (var i = 0; i < message.reportTasks.length; ++i) - $root.google.analytics.data.v1alpha.ReportTask.encode(message.reportTasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListReportTasksResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ListReportTasksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {google.analytics.data.v1alpha.IListReportTasksResponse} message ListReportTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReportTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListReportTasksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReportTasksResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.reportTasks && message.reportTasks.length)) - message.reportTasks = []; - message.reportTasks.push($root.google.analytics.data.v1alpha.ReportTask.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListReportTasksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReportTasksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListReportTasksResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListReportTasksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.reportTasks != null && message.hasOwnProperty("reportTasks")) { - if (!Array.isArray(message.reportTasks)) - return "reportTasks: array expected"; - for (var i = 0; i < message.reportTasks.length; ++i) { - var error = $root.google.analytics.data.v1alpha.ReportTask.verify(message.reportTasks[i]); - if (error) - return "reportTasks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - properties._nextPageToken = 1; - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - } - return null; - }; - - /** - * Creates a ListReportTasksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ListReportTasksResponse} ListReportTasksResponse - */ - ListReportTasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ListReportTasksResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.ListReportTasksResponse(); - if (object.reportTasks) { - if (!Array.isArray(object.reportTasks)) - throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: array expected"); - message.reportTasks = []; - for (var i = 0; i < object.reportTasks.length; ++i) { - if (typeof object.reportTasks[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ListReportTasksResponse.reportTasks: object expected"); - message.reportTasks[i] = $root.google.analytics.data.v1alpha.ReportTask.fromObject(object.reportTasks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListReportTasksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {google.analytics.data.v1alpha.ListReportTasksResponse} message ListReportTasksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListReportTasksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.reportTasks = []; - if (message.reportTasks && message.reportTasks.length) { - object.reportTasks = []; - for (var j = 0; j < message.reportTasks.length; ++j) - object.reportTasks[j] = $root.google.analytics.data.v1alpha.ReportTask.toObject(message.reportTasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - object.nextPageToken = message.nextPageToken; - if (options.oneofs) - object._nextPageToken = "nextPageToken"; - } - return object; - }; - - /** - * Converts this ListReportTasksResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @instance - * @returns {Object.} JSON object - */ - ListReportTasksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListReportTasksResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ListReportTasksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListReportTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ListReportTasksResponse"; - }; - - return ListReportTasksResponse; - })(); - - v1alpha.RunReportRequest = (function() { - - /** - * Properties of a RunReportRequest. - * @memberof google.analytics.data.v1alpha - * @interface IRunReportRequest - * @property {string|null} [property] RunReportRequest property - * @property {Array.|null} [dimensions] RunReportRequest dimensions - * @property {Array.|null} [metrics] RunReportRequest metrics - * @property {Array.|null} [dateRanges] RunReportRequest dateRanges - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter - * @property {number|Long|null} [offset] RunReportRequest offset - * @property {number|Long|null} [limit] RunReportRequest limit - * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations - * @property {Array.|null} [orderBys] RunReportRequest orderBys - * @property {string|null} [currencyCode] RunReportRequest currencyCode - * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec - * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows - * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota - * @property {Array.|null} [comparisons] RunReportRequest comparisons - * @property {google.analytics.data.v1alpha.IConversionSpec|null} [conversionSpec] RunReportRequest conversionSpec - */ - - /** - * Constructs a new RunReportRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunReportRequest. - * @implements IRunReportRequest - * @constructor - * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set - */ - function RunReportRequest(properties) { - this.dimensions = []; - this.metrics = []; - this.dateRanges = []; - this.metricAggregations = []; - this.orderBys = []; - this.comparisons = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.property = ""; - - /** - * RunReportRequest dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dimensions = $util.emptyArray; - - /** - * RunReportRequest metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metrics = $util.emptyArray; - - /** - * RunReportRequest dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dateRanges = $util.emptyArray; - - /** - * RunReportRequest dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dimensionFilter = null; - - /** - * RunReportRequest metricFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metricFilter = null; - - /** - * RunReportRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunReportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunReportRequest metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metricAggregations = $util.emptyArray; - - /** - * RunReportRequest orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.orderBys = $util.emptyArray; - - /** - * RunReportRequest currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.currencyCode = ""; - - /** - * RunReportRequest cohortSpec. - * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.cohortSpec = null; - - /** - * RunReportRequest keepEmptyRows. - * @member {boolean} keepEmptyRows - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.keepEmptyRows = false; - - /** - * RunReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.returnPropertyQuota = false; - - /** - * RunReportRequest comparisons. - * @member {Array.} comparisons - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.comparisons = $util.emptyArray; - - /** - * RunReportRequest conversionSpec. - * @member {google.analytics.data.v1alpha.IConversionSpec|null|undefined} conversionSpec - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - */ - RunReportRequest.prototype.conversionSpec = null; - - /** - * Creates a new RunReportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest instance - */ - RunReportRequest.create = function create(properties) { - return new RunReportRequest(properties); - }; - - /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); - if (message.metricAggregations != null && message.metricAggregations.length) { - writer.uint32(/* id 9, wireType 2 =*/74).fork(); - for (var i = 0; i < message.metricAggregations.length; ++i) - writer.int32(message.metricAggregations[i]); - writer.ldelim(); - } - if (message.orderBys != null && message.orderBys.length) - for (var i = 0; i < message.orderBys.length; ++i) - $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); - if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) - $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); - if (message.comparisons != null && message.comparisons.length) - for (var i = 0; i < message.comparisons.length; ++i) - $root.google.analytics.data.v1alpha.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.conversionSpec != null && Object.hasOwnProperty.call(message, "conversionSpec")) - $root.google.analytics.data.v1alpha.ConversionSpec.encode(message.conversionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); - break; - } - case 5: { - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 7: { - message.offset = reader.int64(); - break; - } - case 8: { - message.limit = reader.int64(); - break; - } - case 9: { - if (!(message.metricAggregations && message.metricAggregations.length)) - message.metricAggregations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metricAggregations.push(reader.int32()); - } else - message.metricAggregations.push(reader.int32()); - break; - } - case 10: { - if (!(message.orderBys && message.orderBys.length)) - message.orderBys = []; - message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); - break; - } - case 11: { - message.currencyCode = reader.string(); - break; - } - case 12: { - message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); - break; - } - case 13: { - message.keepEmptyRows = reader.bool(); - break; - } - case 14: { - message.returnPropertyQuota = reader.bool(); - break; - } - case 15: { - if (!(message.comparisons && message.comparisons.length)) - message.comparisons = []; - message.comparisons.push($root.google.analytics.data.v1alpha.Comparison.decode(reader, reader.uint32())); - break; - } - case 16: { - message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunReportRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { - if (!Array.isArray(message.metricAggregations)) - return "metricAggregations: array expected"; - for (var i = 0; i < message.metricAggregations.length; ++i) - switch (message.metricAggregations[i]) { - default: - return "metricAggregations: enum value[] expected"; - case 0: - case 1: - case 5: - case 6: - case 4: - break; - } - } - if (message.orderBys != null && message.hasOwnProperty("orderBys")) { - if (!Array.isArray(message.orderBys)) - return "orderBys: array expected"; - for (var i = 0; i < message.orderBys.length; ++i) { - var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); - if (error) - return "orderBys." + error; - } - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { - var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); - if (error) - return "cohortSpec." + error; - } - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - if (typeof message.keepEmptyRows !== "boolean") - return "keepEmptyRows: boolean expected"; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; - if (message.comparisons != null && message.hasOwnProperty("comparisons")) { - if (!Array.isArray(message.comparisons)) - return "comparisons: array expected"; - for (var i = 0; i < message.comparisons.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Comparison.verify(message.comparisons[i]); - if (error) - return "comparisons." + error; - } - } - if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) { - var error = $root.google.analytics.data.v1alpha.ConversionSpec.verify(message.conversionSpec); - if (error) - return "conversionSpec." + error; - } - return null; - }; - - /** - * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest - */ - RunReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunReportRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.RunReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); - } - } - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); - } - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.metricAggregations) { - if (!Array.isArray(object.metricAggregations)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricAggregations: array expected"); - message.metricAggregations = []; - for (var i = 0; i < object.metricAggregations.length; ++i) - switch (object.metricAggregations[i]) { - default: - if (typeof object.metricAggregations[i] === "number") { - message.metricAggregations[i] = object.metricAggregations[i]; - break; - } - case "METRIC_AGGREGATION_UNSPECIFIED": - case 0: - message.metricAggregations[i] = 0; - break; - case "TOTAL": - case 1: - message.metricAggregations[i] = 1; - break; - case "MINIMUM": - case 5: - message.metricAggregations[i] = 5; - break; - case "MAXIMUM": - case 6: - message.metricAggregations[i] = 6; - break; - case "COUNT": - case 4: - message.metricAggregations[i] = 4; - break; - } - } - if (object.orderBys) { - if (!Array.isArray(object.orderBys)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: array expected"); - message.orderBys = []; - for (var i = 0; i < object.orderBys.length; ++i) { - if (typeof object.orderBys[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: object expected"); - message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); - } - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.cohortSpec != null) { - if (typeof object.cohortSpec !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.cohortSpec: object expected"); - message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); - } - if (object.keepEmptyRows != null) - message.keepEmptyRows = Boolean(object.keepEmptyRows); - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); - if (object.comparisons) { - if (!Array.isArray(object.comparisons)) - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: array expected"); - message.comparisons = []; - for (var i = 0; i < object.comparisons.length; ++i) { - if (typeof object.comparisons[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: object expected"); - message.comparisons[i] = $root.google.analytics.data.v1alpha.Comparison.fromObject(object.comparisons[i]); - } - } - if (object.conversionSpec != null) { - if (typeof object.conversionSpec !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.conversionSpec: object expected"); - message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.fromObject(object.conversionSpec); - } - return message; - }; - - /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {google.analytics.data.v1alpha.RunReportRequest} message RunReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.dateRanges = []; - object.metricAggregations = []; - object.orderBys = []; - object.comparisons = []; - } - if (options.defaults) { - object.property = ""; - object.dimensionFilter = null; - object.metricFilter = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.currencyCode = ""; - object.cohortSpec = null; - object.keepEmptyRows = false; - object.returnPropertyQuota = false; - object.conversionSpec = null; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); - } - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.metricAggregations && message.metricAggregations.length) { - object.metricAggregations = []; - for (var j = 0; j < message.metricAggregations.length; ++j) - object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; - } - if (message.orderBys && message.orderBys.length) { - object.orderBys = []; - for (var j = 0; j < message.orderBys.length; ++j) - object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) - object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - object.keepEmptyRows = message.keepEmptyRows; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; - if (message.comparisons && message.comparisons.length) { - object.comparisons = []; - for (var j = 0; j < message.comparisons.length; ++j) - object.comparisons[j] = $root.google.analytics.data.v1alpha.Comparison.toObject(message.comparisons[j], options); - } - if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) - object.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.toObject(message.conversionSpec, options); - return object; - }; - - /** - * Converts this RunReportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @instance - * @returns {Object.} JSON object - */ - RunReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunReportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportRequest"; - }; - - return RunReportRequest; - })(); - - v1alpha.RunReportResponse = (function() { - - /** - * Properties of a RunReportResponse. - * @memberof google.analytics.data.v1alpha - * @interface IRunReportResponse - * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders - * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders - * @property {Array.|null} [rows] RunReportResponse rows - * @property {Array.|null} [totals] RunReportResponse totals - * @property {Array.|null} [maximums] RunReportResponse maximums - * @property {Array.|null} [minimums] RunReportResponse minimums - * @property {number|null} [rowCount] RunReportResponse rowCount - * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] RunReportResponse metadata - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota - * @property {string|null} [kind] RunReportResponse kind - * @property {string|null} [nextPageToken] RunReportResponse nextPageToken - */ - - /** - * Constructs a new RunReportResponse. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunReportResponse. - * @implements IRunReportResponse - * @constructor - * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set - */ - function RunReportResponse(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - this.totals = []; - this.maximums = []; - this.minimums = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunReportResponse dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; - - /** - * RunReportResponse metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.metricHeaders = $util.emptyArray; - - /** - * RunReportResponse rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.rows = $util.emptyArray; - - /** - * RunReportResponse totals. - * @member {Array.} totals - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.totals = $util.emptyArray; - - /** - * RunReportResponse maximums. - * @member {Array.} maximums - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.maximums = $util.emptyArray; - - /** - * RunReportResponse minimums. - * @member {Array.} minimums - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.minimums = $util.emptyArray; - - /** - * RunReportResponse rowCount. - * @member {number} rowCount - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.rowCount = 0; - - /** - * RunReportResponse metadata. - * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.metadata = null; - - /** - * RunReportResponse propertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.propertyQuota = null; - - /** - * RunReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.kind = ""; - - /** - * RunReportResponse nextPageToken. - * @member {string|null|undefined} nextPageToken - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - */ - RunReportResponse.prototype.nextPageToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(RunReportResponse.prototype, "_nextPageToken", { - get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RunReportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse instance - */ - RunReportResponse.create = function create(properties) { - return new RunReportResponse(properties); - }; - - /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totals != null && message.totals.length) - for (var i = 0; i < message.totals.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maximums != null && message.maximums.length) - for (var i = 0; i < message.maximums.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.minimums != null && message.minimums.length) - for (var i = 0; i < message.minimums.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.totals && message.totals.length)) - message.totals = []; - message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.maximums && message.maximums.length)) - message.maximums = []; - message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.minimums && message.minimums.length)) - message.minimums = []; - message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 7: { - message.rowCount = reader.int32(); - break; - } - case 8: { - message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); - break; - } - case 9: { - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 10: { - message.kind = reader.string(); - break; - } - case 11: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunReportResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.totals != null && message.hasOwnProperty("totals")) { - if (!Array.isArray(message.totals)) - return "totals: array expected"; - for (var i = 0; i < message.totals.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); - if (error) - return "totals." + error; - } - } - if (message.maximums != null && message.hasOwnProperty("maximums")) { - if (!Array.isArray(message.maximums)) - return "maximums: array expected"; - for (var i = 0; i < message.maximums.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); - if (error) - return "maximums." + error; - } - } - if (message.minimums != null && message.hasOwnProperty("minimums")) { - if (!Array.isArray(message.minimums)) - return "minimums: array expected"; - for (var i = 0; i < message.minimums.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); - if (error) - return "minimums." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); - if (error) - return "propertyQuota." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - properties._nextPageToken = 1; - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - } - return null; - }; - - /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse - */ - RunReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunReportResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.RunReportResponse(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); - } - } - if (object.totals) { - if (!Array.isArray(object.totals)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: array expected"); - message.totals = []; - for (var i = 0; i < object.totals.length; ++i) { - if (typeof object.totals[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: object expected"); - message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); - } - } - if (object.maximums) { - if (!Array.isArray(object.maximums)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: array expected"); - message.maximums = []; - for (var i = 0; i < object.maximums.length; ++i) { - if (typeof object.maximums[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: object expected"); - message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); - } - } - if (object.minimums) { - if (!Array.isArray(object.minimums)) - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: array expected"); - message.minimums = []; - for (var i = 0; i < object.minimums.length; ++i) { - if (typeof object.minimums[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: object expected"); - message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); - } - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); - } - if (object.kind != null) - message.kind = String(object.kind); - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {google.analytics.data.v1alpha.RunReportResponse} message RunReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - object.totals = []; - object.maximums = []; - object.minimums = []; - } - if (options.defaults) { - object.rowCount = 0; - object.metadata = null; - object.propertyQuota = null; - object.kind = ""; - } - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); - } - if (message.totals && message.totals.length) { - object.totals = []; - for (var j = 0; j < message.totals.length; ++j) - object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); - } - if (message.maximums && message.maximums.length) { - object.maximums = []; - for (var j = 0; j < message.maximums.length; ++j) - object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); - } - if (message.minimums && message.minimums.length) { - object.minimums = []; - for (var j = 0; j < message.minimums.length; ++j) - object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - object.nextPageToken = message.nextPageToken; - if (options.oneofs) - object._nextPageToken = "nextPageToken"; - } - return object; - }; - - /** - * Converts this RunReportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @instance - * @returns {Object.} JSON object - */ - RunReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunReportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportResponse"; - }; - - return RunReportResponse; - })(); - - v1alpha.GetMetadataRequest = (function() { - - /** - * Properties of a GetMetadataRequest. - * @memberof google.analytics.data.v1alpha - * @interface IGetMetadataRequest - * @property {string|null} [name] GetMetadataRequest name - */ - - /** - * Constructs a new GetMetadataRequest. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a GetMetadataRequest. - * @implements IGetMetadataRequest - * @constructor - * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set - */ - function GetMetadataRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetMetadataRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @instance - */ - GetMetadataRequest.prototype.name = ""; - - /** - * Creates a new GetMetadataRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest instance - */ - GetMetadataRequest.create = function create(properties) { - return new GetMetadataRequest(properties); - }; - - /** - * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMetadataRequest message. - * @function verify - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMetadataRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest - */ - GetMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.GetMetadataRequest) - return object; - var message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {google.analytics.data.v1alpha.GetMetadataRequest} message GetMetadataRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMetadataRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetMetadataRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @instance - * @returns {Object.} JSON object - */ - GetMetadataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMetadataRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.GetMetadataRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.GetMetadataRequest"; - }; - - return GetMetadataRequest; - })(); - - v1alpha.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.analytics.data.v1alpha - * @interface IMetadata - * @property {string|null} [name] Metadata name - * @property {Array.|null} [dimensions] Metadata dimensions - * @property {Array.|null} [metrics] Metadata metrics - * @property {Array.|null} [comparisons] Metadata comparisons - * @property {Array.|null} [conversions] Metadata conversions - */ - - /** - * Constructs a new Metadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.dimensions = []; - this.metrics = []; - this.comparisons = []; - this.conversions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - */ - Metadata.prototype.name = ""; - - /** - * Metadata dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - */ - Metadata.prototype.dimensions = $util.emptyArray; - - /** - * Metadata metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - */ - Metadata.prototype.metrics = $util.emptyArray; - - /** - * Metadata comparisons. - * @member {Array.} comparisons - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - */ - Metadata.prototype.comparisons = $util.emptyArray; - - /** - * Metadata conversions. - * @member {Array.} conversions - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - */ - Metadata.prototype.conversions = $util.emptyArray; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1alpha.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1alpha.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.comparisons != null && message.comparisons.length) - for (var i = 0; i < message.comparisons.length; ++i) - $root.google.analytics.data.v1alpha.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.conversions != null && message.conversions.length) - for (var i = 0; i < message.conversions.length; ++i) - $root.google.analytics.data.v1alpha.ConversionMetadata.encode(message.conversions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.name = reader.string(); - break; - } - case 1: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1alpha.DimensionMetadata.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1alpha.MetricMetadata.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.comparisons && message.comparisons.length)) - message.comparisons = []; - message.comparisons.push($root.google.analytics.data.v1alpha.ComparisonMetadata.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.conversions && message.conversions.length)) - message.conversions = []; - message.conversions.push($root.google.analytics.data.v1alpha.ConversionMetadata.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionMetadata.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricMetadata.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.comparisons != null && message.hasOwnProperty("comparisons")) { - if (!Array.isArray(message.comparisons)) - return "comparisons: array expected"; - for (var i = 0; i < message.comparisons.length; ++i) { - var error = $root.google.analytics.data.v1alpha.ComparisonMetadata.verify(message.comparisons[i]); - if (error) - return "comparisons." + error; - } - } - if (message.conversions != null && message.hasOwnProperty("conversions")) { - if (!Array.isArray(message.conversions)) - return "conversions: array expected"; - for (var i = 0; i < message.conversions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.ConversionMetadata.verify(message.conversions[i]); - if (error) - return "conversions." + error; - } - } - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Metadata) - return object; - var message = new $root.google.analytics.data.v1alpha.Metadata(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1alpha.DimensionMetadata.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1alpha.MetricMetadata.fromObject(object.metrics[i]); - } - } - if (object.comparisons) { - if (!Array.isArray(object.comparisons)) - throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: array expected"); - message.comparisons = []; - for (var i = 0; i < object.comparisons.length; ++i) { - if (typeof object.comparisons[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: object expected"); - message.comparisons[i] = $root.google.analytics.data.v1alpha.ComparisonMetadata.fromObject(object.comparisons[i]); - } - } - if (object.conversions) { - if (!Array.isArray(object.conversions)) - throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: array expected"); - message.conversions = []; - for (var i = 0; i < object.conversions.length; ++i) { - if (typeof object.conversions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: object expected"); - message.conversions[i] = $root.google.analytics.data.v1alpha.ConversionMetadata.fromObject(object.conversions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {google.analytics.data.v1alpha.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.comparisons = []; - object.conversions = []; - } - if (options.defaults) - object.name = ""; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1alpha.DimensionMetadata.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1alpha.MetricMetadata.toObject(message.metrics[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.comparisons && message.comparisons.length) { - object.comparisons = []; - for (var j = 0; j < message.comparisons.length; ++j) - object.comparisons[j] = $root.google.analytics.data.v1alpha.ComparisonMetadata.toObject(message.comparisons[j], options); - } - if (message.conversions && message.conversions.length) { - object.conversions = []; - for (var j = 0; j < message.conversions.length; ++j) - object.conversions[j] = $root.google.analytics.data.v1alpha.ConversionMetadata.toObject(message.conversions[j], options); - } - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Metadata"; - }; - - return Metadata; - })(); - - v1alpha.DateRange = (function() { - - /** - * Properties of a DateRange. - * @memberof google.analytics.data.v1alpha - * @interface IDateRange - * @property {string|null} [startDate] DateRange startDate - * @property {string|null} [endDate] DateRange endDate - * @property {string|null} [name] DateRange name - */ - - /** - * Constructs a new DateRange. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DateRange. - * @implements IDateRange - * @constructor - * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set - */ - function DateRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DateRange startDate. - * @member {string} startDate - * @memberof google.analytics.data.v1alpha.DateRange - * @instance - */ - DateRange.prototype.startDate = ""; - - /** - * DateRange endDate. - * @member {string} endDate - * @memberof google.analytics.data.v1alpha.DateRange - * @instance - */ - DateRange.prototype.endDate = ""; - - /** - * DateRange name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.DateRange - * @instance - */ - DateRange.prototype.name = ""; - - /** - * Creates a new DateRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance - */ - DateRange.create = function create(properties) { - return new DateRange(properties); - }; - - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DateRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startDate = reader.string(); - break; - } - case 2: { - message.endDate = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DateRange message. - * @function verify - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DateRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startDate != null && message.hasOwnProperty("startDate")) - if (!$util.isString(message.startDate)) - return "startDate: string expected"; - if (message.endDate != null && message.hasOwnProperty("endDate")) - if (!$util.isString(message.endDate)) - return "endDate: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DateRange} DateRange - */ - DateRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DateRange) - return object; - var message = new $root.google.analytics.data.v1alpha.DateRange(); - if (object.startDate != null) - message.startDate = String(object.startDate); - if (object.endDate != null) - message.endDate = String(object.endDate); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.DateRange} message DateRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DateRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startDate = ""; - object.endDate = ""; - object.name = ""; - } - if (message.startDate != null && message.hasOwnProperty("startDate")) - object.startDate = message.startDate; - if (message.endDate != null && message.hasOwnProperty("endDate")) - object.endDate = message.endDate; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DateRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DateRange - * @instance - * @returns {Object.} JSON object - */ - DateRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DateRange - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; - }; - - return DateRange; - })(); - - v1alpha.Dimension = (function() { - - /** - * Properties of a Dimension. - * @memberof google.analytics.data.v1alpha - * @interface IDimension - * @property {string|null} [name] Dimension name - * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression - */ - - /** - * Constructs a new Dimension. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Dimension. - * @implements IDimension - * @constructor - * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set - */ - function Dimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Dimension name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Dimension - * @instance - */ - Dimension.prototype.name = ""; - - /** - * Dimension dimensionExpression. - * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression - * @memberof google.analytics.data.v1alpha.Dimension - * @instance - */ - Dimension.prototype.dimensionExpression = null; - - /** - * Creates a new Dimension instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance - */ - Dimension.create = function create(properties) { - return new Dimension(properties); - }; - - /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dimension.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) - $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dimension.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Dimension message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Dimension} Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dimension.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Dimension} Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Dimension message. - * @function verify - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Dimension.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); - if (error) - return "dimensionExpression." + error; - } - return null; - }; - - /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Dimension} Dimension - */ - Dimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Dimension) - return object; - var message = new $root.google.analytics.data.v1alpha.Dimension(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensionExpression != null) { - if (typeof object.dimensionExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); - message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); - } - return message; - }; - - /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {google.analytics.data.v1alpha.Dimension} message Dimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Dimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.dimensionExpression = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) - object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); - return object; - }; - - /** - * Converts this Dimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Dimension - * @instance - * @returns {Object.} JSON object - */ - Dimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Dimension - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; - }; - - return Dimension; - })(); - - v1alpha.DimensionExpression = (function() { - - /** - * Properties of a DimensionExpression. - * @memberof google.analytics.data.v1alpha - * @interface IDimensionExpression - * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase - * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase - * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate - */ - - /** - * Constructs a new DimensionExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionExpression. - * @implements IDimensionExpression - * @constructor - * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set - */ - function DimensionExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionExpression lowerCase. - * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @instance - */ - DimensionExpression.prototype.lowerCase = null; - - /** - * DimensionExpression upperCase. - * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @instance - */ - DimensionExpression.prototype.upperCase = null; - - /** - * DimensionExpression concatenate. - * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @instance - */ - DimensionExpression.prototype.concatenate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DimensionExpression oneExpression. - * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @instance - */ - Object.defineProperty(DimensionExpression.prototype, "oneExpression", { - get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DimensionExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance - */ - DimensionExpression.create = function create(properties) { - return new DimensionExpression(properties); - }; - - /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) - $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) - $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) - $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); - break; - } - case 5: { - message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); - if (error) - return "lowerCase." + error; - } - } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); - if (error) - return "upperCase." + error; - } - } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); - if (error) - return "concatenate." + error; - } - } - return null; - }; - - /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression - */ - DimensionExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); - if (object.lowerCase != null) { - if (typeof object.lowerCase !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); - message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); - } - if (object.upperCase != null) { - if (typeof object.upperCase !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); - message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); - } - if (object.concatenate != null) { - if (typeof object.concatenate !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); - message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); - } - return message; - }; - - /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); - if (options.oneofs) - object.oneExpression = "lowerCase"; - } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); - if (options.oneofs) - object.oneExpression = "upperCase"; - } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); - if (options.oneofs) - object.oneExpression = "concatenate"; - } - return object; - }; - - /** - * Converts this DimensionExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @instance - * @returns {Object.} JSON object - */ - DimensionExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; - }; - - DimensionExpression.CaseExpression = (function() { - - /** - * Properties of a CaseExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @interface ICaseExpression - * @property {string|null} [dimensionName] CaseExpression dimensionName - */ - - /** - * Constructs a new CaseExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @classdesc Represents a CaseExpression. - * @implements ICaseExpression - * @constructor - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set - */ - function CaseExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CaseExpression dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @instance - */ - CaseExpression.prototype.dimensionName = ""; - - /** - * Creates a new CaseExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance - */ - CaseExpression.create = function create(properties) { - return new CaseExpression(properties); - }; - - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - return writer; - }; - - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; - - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - */ - CaseExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; - - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - return object; - }; - - /** - * Converts this CaseExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @instance - * @returns {Object.} JSON object - */ - CaseExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CaseExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; - }; - - return CaseExpression; - })(); - - DimensionExpression.ConcatenateExpression = (function() { - - /** - * Properties of a ConcatenateExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @interface IConcatenateExpression - * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames - * @property {string|null} [delimiter] ConcatenateExpression delimiter - */ - - /** - * Constructs a new ConcatenateExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @classdesc Represents a ConcatenateExpression. - * @implements IConcatenateExpression - * @constructor - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - */ - function ConcatenateExpression(properties) { - this.dimensionNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConcatenateExpression dimensionNames. - * @member {Array.} dimensionNames - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; - - /** - * ConcatenateExpression delimiter. - * @member {string} delimiter - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.delimiter = ""; - - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance - */ - ConcatenateExpression.create = function create(properties) { - return new ConcatenateExpression(properties); - }; - - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionNames != null && message.dimensionNames.length) - for (var i = 0; i < message.dimensionNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - return writer; - }; - - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionNames && message.dimensionNames.length)) - message.dimensionNames = []; - message.dimensionNames.push(reader.string()); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConcatenateExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConcatenateExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { - if (!Array.isArray(message.dimensionNames)) - return "dimensionNames: array expected"; - for (var i = 0; i < message.dimensionNames.length; ++i) - if (!$util.isString(message.dimensionNames[i])) - return "dimensionNames: string[] expected"; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - return null; - }; - - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - */ - ConcatenateExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); - if (object.dimensionNames) { - if (!Array.isArray(object.dimensionNames)) - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); - message.dimensionNames = []; - for (var i = 0; i < object.dimensionNames.length; ++i) - message.dimensionNames[i] = String(object.dimensionNames[i]); - } - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - return message; - }; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcatenateExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionNames = []; - if (options.defaults) - object.delimiter = ""; - if (message.dimensionNames && message.dimensionNames.length) { - object.dimensionNames = []; - for (var j = 0; j < message.dimensionNames.length; ++j) - object.dimensionNames[j] = message.dimensionNames[j]; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - return object; - }; - - /** - * Converts this ConcatenateExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - * @returns {Object.} JSON object - */ - ConcatenateExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConcatenateExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; - }; - - return ConcatenateExpression; - })(); - - return DimensionExpression; - })(); - - v1alpha.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.analytics.data.v1alpha - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {string|null} [expression] Metric expression - * @property {boolean|null} [invisible] Metric invisible - */ - - /** - * Constructs a new Metric. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.name = ""; - - /** - * Metric expression. - * @member {string} expression - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.expression = ""; - - /** - * Metric invisible. - * @member {boolean} invisible - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.invisible = false; - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); - if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.expression = reader.string(); - break; - } - case 3: { - message.invisible = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.invisible != null && message.hasOwnProperty("invisible")) - if (typeof message.invisible !== "boolean") - return "invisible: boolean expected"; - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Metric) - return object; - var message = new $root.google.analytics.data.v1alpha.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.expression != null) - message.expression = String(object.expression); - if (object.invisible != null) - message.invisible = Boolean(object.invisible); - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {google.analytics.data.v1alpha.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.expression = ""; - object.invisible = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.invisible != null && message.hasOwnProperty("invisible")) - object.invisible = message.invisible; - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; - }; - - return Metric; - })(); - - v1alpha.Comparison = (function() { - - /** - * Properties of a Comparison. - * @memberof google.analytics.data.v1alpha - * @interface IComparison - * @property {string|null} [name] Comparison name - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter - * @property {string|null} [comparison] Comparison comparison - */ - - /** - * Constructs a new Comparison. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Comparison. - * @implements IComparison - * @constructor - * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set - */ - function Comparison(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Comparison name. - * @member {string|null|undefined} name - * @memberof google.analytics.data.v1alpha.Comparison - * @instance - */ - Comparison.prototype.name = null; - - /** - * Comparison dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.Comparison - * @instance - */ - Comparison.prototype.dimensionFilter = null; - - /** - * Comparison comparison. - * @member {string|null|undefined} comparison - * @memberof google.analytics.data.v1alpha.Comparison - * @instance - */ - Comparison.prototype.comparison = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Comparison.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Comparison oneComparison. - * @member {"dimensionFilter"|"comparison"|undefined} oneComparison - * @memberof google.analytics.data.v1alpha.Comparison - * @instance - */ - Object.defineProperty(Comparison.prototype, "oneComparison", { - get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Comparison instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Comparison} Comparison instance - */ - Comparison.create = function create(properties) { - return new Comparison(properties); - }; - - /** - * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Comparison.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); - return writer; - }; - - /** - * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Comparison.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Comparison message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Comparison} Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Comparison.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Comparison(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 3: { - message.comparison = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Comparison message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Comparison} Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Comparison.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Comparison message. - * @function verify - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Comparison.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - properties.oneComparison = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - } - if (message.comparison != null && message.hasOwnProperty("comparison")) { - if (properties.oneComparison === 1) - return "oneComparison: multiple values"; - properties.oneComparison = 1; - if (!$util.isString(message.comparison)) - return "comparison: string expected"; - } - return null; - }; - - /** - * Creates a Comparison message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Comparison} Comparison - */ - Comparison.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Comparison) - return object; - var message = new $root.google.analytics.data.v1alpha.Comparison(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Comparison.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.comparison != null) - message.comparison = String(object.comparison); - return message; - }; - - /** - * Creates a plain object from a Comparison message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {google.analytics.data.v1alpha.Comparison} message Comparison - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Comparison.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); - if (options.oneofs) - object.oneComparison = "dimensionFilter"; - } - if (message.comparison != null && message.hasOwnProperty("comparison")) { - object.comparison = message.comparison; - if (options.oneofs) - object.oneComparison = "comparison"; - } - return object; - }; - - /** - * Converts this Comparison to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Comparison - * @instance - * @returns {Object.} JSON object - */ - Comparison.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Comparison - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Comparison - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Comparison"; - }; - - return Comparison; - })(); - - v1alpha.FilterExpression = (function() { - - /** - * Properties of a FilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface IFilterExpression - * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter - */ - - /** - * Constructs a new FilterExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FilterExpression. - * @implements IFilterExpression - * @constructor - * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set - */ - function FilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.andGroup = null; - - /** - * FilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.orGroup = null; - - /** - * FilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.notExpression = null; - - /** - * FilterExpression filter. - * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.filter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - Object.defineProperty(FilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance - */ - FilterExpression.create = function create(properties) { - return new FilterExpression(properties); - }; - - /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.filter != null && message.hasOwnProperty("filter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - } - return null; - }; - - /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression - */ - FilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.FilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); - message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); - } - return message; - }; - - /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); - if (options.oneofs) - object.expr = "filter"; - } - return object; - }; - - /** - * Converts this FilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - * @returns {Object.} JSON object - */ - FilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; - }; - - return FilterExpression; - })(); - - v1alpha.FilterExpressionList = (function() { - - /** - * Properties of a FilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @interface IFilterExpressionList - * @property {Array.|null} [expressions] FilterExpressionList expressions - */ - - /** - * Constructs a new FilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FilterExpressionList. - * @implements IFilterExpressionList - * @constructor - * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set - */ - function FilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @instance - */ - FilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new FilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance - */ - FilterExpressionList.create = function create(properties) { - return new FilterExpressionList(properties); - }; - - /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList - */ - FilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this FilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - FilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; - }; - - return FilterExpressionList; - })(); - - v1alpha.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof google.analytics.data.v1alpha - * @interface IFilter - * @property {string|null} [fieldName] Filter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter - * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter - */ - - /** - * Constructs a new Filter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.fieldName = ""; - - /** - * Filter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.stringFilter = null; - - /** - * Filter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.inListFilter = null; - - /** - * Filter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.numericFilter = null; - - /** - * Filter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.betweenFilter = null; - - /** - * Filter emptyFilter. - * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.emptyFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Filter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Object.defineProperty(Filter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) - $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); - if (error) - return "emptyFilter." + error; - } - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Filter) - return object; - var message = new $root.google.analytics.data.v1alpha.Filter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - if (object.emptyFilter != null) { - if (typeof object.emptyFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); - message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {google.analytics.data.v1alpha.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); - if (options.oneofs) - object.oneFilter = "emptyFilter"; - } - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; - }; - - return Filter; - })(); - - v1alpha.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.data.v1alpha - * @interface IStringFilter - * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ - - /** - * Constructs a new StringFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set - */ - function StringFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringFilter matchType. - * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; - - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; - - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; - - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.StringFilter(); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "BEGINS_WITH": - case 2: - message.matchType = 2; - break; - case "ENDS_WITH": - case 3: - message.matchType = 3; - break; - case "CONTAINS": - case 4: - message.matchType = 4; - break; - case "FULL_REGEXP": - case 5: - message.matchType = 5; - break; - case "PARTIAL_REGEXP": - case 6: - message.matchType = 6; - break; - } - if (object.value != null) - message.value = String(object.value); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; - }; - - /** - * MatchType enum. - * @name google.analytics.data.v1alpha.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BEGINS_WITH=2 BEGINS_WITH value - * @property {number} ENDS_WITH=3 ENDS_WITH value - * @property {number} CONTAINS=4 CONTAINS value - * @property {number} FULL_REGEXP=5 FULL_REGEXP value - * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BEGINS_WITH"] = 2; - values[valuesById[3] = "ENDS_WITH"] = 3; - values[valuesById[4] = "CONTAINS"] = 4; - values[valuesById[5] = "FULL_REGEXP"] = 5; - values[valuesById[6] = "PARTIAL_REGEXP"] = 6; - return values; - })(); - - return StringFilter; - })(); - - v1alpha.InListFilter = (function() { - - /** - * Properties of an InListFilter. - * @memberof google.analytics.data.v1alpha - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ - - /** - * Constructs a new InListFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set - */ - function InListFilter(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; - - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; - - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; - - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 2: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; - }; - - return InListFilter; - })(); - - v1alpha.NumericFilter = (function() { - - /** - * Properties of a NumericFilter. - * @memberof google.analytics.data.v1alpha - * @interface INumericFilter - * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation - * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value - */ - - /** - * Constructs a new NumericFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a NumericFilter. - * @implements INumericFilter - * @constructor - * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set - */ - function NumericFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NumericFilter operation. - * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation - * @memberof google.analytics.data.v1alpha.NumericFilter - * @instance - */ - NumericFilter.prototype.operation = 0; - - /** - * NumericFilter value. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value - * @memberof google.analytics.data.v1alpha.NumericFilter - * @instance - */ - NumericFilter.prototype.value = null; - - /** - * Creates a new NumericFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance - */ - NumericFilter.create = function create(properties) { - return new NumericFilter(properties); - }; - - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.operation = reader.int32(); - break; - } - case 2: { - message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NumericFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter - */ - NumericFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.NumericFilter(); - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; - break; - } - break; - case "OPERATION_UNSPECIFIED": - case 0: - message.operation = 0; - break; - case "EQUAL": - case 1: - message.operation = 1; - break; - case "LESS_THAN": - case 2: - message.operation = 2; - break; - case "LESS_THAN_OR_EQUAL": - case 3: - message.operation = 3; - break; - case "GREATER_THAN": - case 4: - message.operation = 4; - break; - case "GREATER_THAN_OR_EQUAL": - case 5: - message.operation = 5; - break; - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); - message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.value = null; - } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); - return object; - }; - - /** - * Converts this NumericFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.NumericFilter - * @instance - * @returns {Object.} JSON object - */ - NumericFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NumericFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.NumericFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; - }; - - /** - * Operation enum. - * @name google.analytics.data.v1alpha.NumericFilter.Operation - * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} EQUAL=1 EQUAL value - * @property {number} LESS_THAN=2 LESS_THAN value - * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value - * @property {number} GREATER_THAN=4 GREATER_THAN value - * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value - */ - NumericFilter.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EQUAL"] = 1; - values[valuesById[2] = "LESS_THAN"] = 2; - values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; - values[valuesById[4] = "GREATER_THAN"] = 4; - values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; - return values; - })(); - - return NumericFilter; - })(); - - v1alpha.OrderBy = (function() { - - /** - * Properties of an OrderBy. - * @memberof google.analytics.data.v1alpha - * @interface IOrderBy - * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric - * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension - * @property {boolean|null} [desc] OrderBy desc - */ - - /** - * Constructs a new OrderBy. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an OrderBy. - * @implements IOrderBy - * @constructor - * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set - */ - function OrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OrderBy metric. - * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance - */ - OrderBy.prototype.metric = null; - - /** - * OrderBy dimension. - * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance - */ - OrderBy.prototype.dimension = null; - - /** - * OrderBy desc. - * @member {boolean} desc - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance - */ - OrderBy.prototype.desc = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OrderBy oneOrderBy. - * @member {"metric"|"dimension"|undefined} oneOrderBy - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance - */ - Object.defineProperty(OrderBy.prototype, "oneOrderBy", { - get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance - */ - OrderBy.create = function create(properties) { - return new OrderBy(properties); - }; - - /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); - return writer; - }; - - /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); - break; - } - case 4: { - message.desc = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OrderBy message. - * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metric != null && message.hasOwnProperty("metric")) { - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); - if (error) - return "metric." + error; - } - } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - if (properties.oneOrderBy === 1) - return "oneOrderBy: multiple values"; - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); - if (error) - return "dimension." + error; - } - } - if (message.desc != null && message.hasOwnProperty("desc")) - if (typeof message.desc !== "boolean") - return "desc: boolean expected"; - return null; - }; - - /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy - */ - OrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) - return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy(); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); - message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); - } - if (object.dimension != null) { - if (typeof object.dimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); - message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); - } - if (object.desc != null) - message.desc = Boolean(object.desc); - return message; - }; - - /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.desc = false; - if (message.metric != null && message.hasOwnProperty("metric")) { - object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); - if (options.oneofs) - object.oneOrderBy = "metric"; - } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); - if (options.oneofs) - object.oneOrderBy = "dimension"; - } - if (message.desc != null && message.hasOwnProperty("desc")) - object.desc = message.desc; - return object; - }; - - /** - * Converts this OrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance - * @returns {Object.} JSON object - */ - OrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; - }; - - OrderBy.MetricOrderBy = (function() { - - /** - * Properties of a MetricOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @interface IMetricOrderBy - * @property {string|null} [metricName] MetricOrderBy metricName - */ - - /** - * Constructs a new MetricOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @classdesc Represents a MetricOrderBy. - * @implements IMetricOrderBy - * @constructor - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set - */ - function MetricOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricOrderBy metricName. - * @member {string} metricName - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @instance - */ - MetricOrderBy.prototype.metricName = ""; - - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance - */ - MetricOrderBy.create = function create(properties) { - return new MetricOrderBy(properties); - }; - - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - return writer; - }; - - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricOrderBy message. - * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; - - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - */ - MetricOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) - return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; - - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; - - /** - * Converts this MetricOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @instance - * @returns {Object.} JSON object - */ - MetricOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; - }; - - return MetricOrderBy; - })(); - - OrderBy.DimensionOrderBy = (function() { - - /** - * Properties of a DimensionOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @interface IDimensionOrderBy - * @property {string|null} [dimensionName] DimensionOrderBy dimensionName - * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType - */ - - /** - * Constructs a new DimensionOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @classdesc Represents a DimensionOrderBy. - * @implements IDimensionOrderBy - * @constructor - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set - */ - function DimensionOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionOrderBy dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.dimensionName = ""; - - /** - * DimensionOrderBy orderType. - * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.orderType = 0; - - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance - */ - DimensionOrderBy.create = function create(properties) { - return new DimensionOrderBy(properties); - }; - - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); - return writer; - }; - - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - case 2: { - message.orderType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionOrderBy message. - * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - if (message.orderType != null && message.hasOwnProperty("orderType")) - switch (message.orderType) { - default: - return "orderType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - */ - DimensionOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) - return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - switch (object.orderType) { - default: - if (typeof object.orderType === "number") { - message.orderType = object.orderType; - break; - } - break; - case "ORDER_TYPE_UNSPECIFIED": - case 0: - message.orderType = 0; - break; - case "ALPHANUMERIC": - case 1: - message.orderType = 1; - break; - case "CASE_INSENSITIVE_ALPHANUMERIC": - case 2: - message.orderType = 2; - break; - case "NUMERIC": - case 3: - message.orderType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimensionName = ""; - object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; - } - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - if (message.orderType != null && message.hasOwnProperty("orderType")) - object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; - return object; - }; - - /** - * Converts this DimensionOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - * @returns {Object.} JSON object - */ - DimensionOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; - }; - - /** - * OrderType enum. - * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType - * @enum {number} - * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value - * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value - * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value - * @property {number} NUMERIC=3 NUMERIC value - */ - DimensionOrderBy.OrderType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALPHANUMERIC"] = 1; - values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; - values[valuesById[3] = "NUMERIC"] = 3; - return values; - })(); - - return DimensionOrderBy; - })(); - - return OrderBy; - })(); - - v1alpha.BetweenFilter = (function() { - - /** - * Properties of a BetweenFilter. - * @memberof google.analytics.data.v1alpha - * @interface IBetweenFilter - * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue - * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue - */ - - /** - * Constructs a new BetweenFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a BetweenFilter. - * @implements IBetweenFilter - * @constructor - * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set - */ - function BetweenFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BetweenFilter fromValue. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @instance - */ - BetweenFilter.prototype.fromValue = null; - - /** - * BetweenFilter toValue. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @instance - */ - BetweenFilter.prototype.toValue = null; - - /** - * Creates a new BetweenFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance - */ - BetweenFilter.create = function create(properties) { - return new BetweenFilter(properties); - }; - - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BetweenFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BetweenFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fromValue != null && message.hasOwnProperty("fromValue")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); - if (error) - return "fromValue." + error; - } - if (message.toValue != null && message.hasOwnProperty("toValue")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); - if (error) - return "toValue." + error; - } - return null; - }; - - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter - */ - BetweenFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); - if (object.fromValue != null) { - if (typeof object.fromValue !== "object") - throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); - message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); - } - if (object.toValue != null) { - if (typeof object.toValue !== "object") - throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); - message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); - } - return message; - }; - - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BetweenFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fromValue = null; - object.toValue = null; - } - if (message.fromValue != null && message.hasOwnProperty("fromValue")) - object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); - if (message.toValue != null && message.hasOwnProperty("toValue")) - object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); - return object; - }; - - /** - * Converts this BetweenFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @instance - * @returns {Object.} JSON object - */ - BetweenFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BetweenFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; - }; - - return BetweenFilter; - })(); - - v1alpha.EmptyFilter = (function() { - - /** - * Properties of an EmptyFilter. - * @memberof google.analytics.data.v1alpha - * @interface IEmptyFilter - */ - - /** - * Constructs a new EmptyFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EmptyFilter. - * @implements IEmptyFilter - * @constructor - * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set - */ - function EmptyFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new EmptyFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance - */ - EmptyFilter.create = function create(properties) { - return new EmptyFilter(properties); - }; - - /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmptyFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmptyFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmptyFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EmptyFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EmptyFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter - */ - EmptyFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) - return object; - return new $root.google.analytics.data.v1alpha.EmptyFilter(); - }; - - /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EmptyFilter.toObject = function toObject() { - return {}; - }; - - /** - * Converts this EmptyFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @instance - * @returns {Object.} JSON object - */ - EmptyFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EmptyFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; - }; - - return EmptyFilter; - })(); - - v1alpha.NumericValue = (function() { - - /** - * Properties of a NumericValue. - * @memberof google.analytics.data.v1alpha - * @interface INumericValue - * @property {number|Long|null} [int64Value] NumericValue int64Value - * @property {number|null} [doubleValue] NumericValue doubleValue - */ - - /** - * Constructs a new NumericValue. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a NumericValue. - * @implements INumericValue - * @constructor - * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set - */ - function NumericValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NumericValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.analytics.data.v1alpha.NumericValue - * @instance - */ - NumericValue.prototype.int64Value = null; - - /** - * NumericValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.analytics.data.v1alpha.NumericValue - * @instance - */ - NumericValue.prototype.doubleValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NumericValue oneValue. - * @member {"int64Value"|"doubleValue"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.NumericValue - * @instance - */ - Object.defineProperty(NumericValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NumericValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance - */ - NumericValue.create = function create(properties) { - return new NumericValue(properties); - }; - - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - return writer; - }; - - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.int64Value = reader.int64(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NumericValue message. - * @function verify - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.oneValue = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.oneValue === 1) - return "oneValue: multiple values"; - properties.oneValue = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - return null; - }; - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue - */ - NumericValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) - return object; - var message = new $root.google.analytics.data.v1alpha.NumericValue(); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; - - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.oneValue = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.oneValue = "doubleValue"; - } - return object; - }; - - /** - * Converts this NumericValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.NumericValue - * @instance - * @returns {Object.} JSON object - */ - NumericValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NumericValue - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.NumericValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; - }; - - return NumericValue; - })(); - - v1alpha.CohortSpec = (function() { - - /** - * Properties of a CohortSpec. - * @memberof google.analytics.data.v1alpha - * @interface ICohortSpec - * @property {Array.|null} [cohorts] CohortSpec cohorts - * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange - * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings - */ - - /** - * Constructs a new CohortSpec. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortSpec. - * @implements ICohortSpec - * @constructor - * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set - */ - function CohortSpec(properties) { - this.cohorts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortSpec cohorts. - * @member {Array.} cohorts - * @memberof google.analytics.data.v1alpha.CohortSpec - * @instance - */ - CohortSpec.prototype.cohorts = $util.emptyArray; - - /** - * CohortSpec cohortsRange. - * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange - * @memberof google.analytics.data.v1alpha.CohortSpec - * @instance - */ - CohortSpec.prototype.cohortsRange = null; - - /** - * CohortSpec cohortReportSettings. - * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings - * @memberof google.analytics.data.v1alpha.CohortSpec - * @instance - */ - CohortSpec.prototype.cohortReportSettings = null; - - /** - * Creates a new CohortSpec instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance - */ - CohortSpec.create = function create(properties) { - return new CohortSpec(properties); - }; - - /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cohorts != null && message.cohorts.length) - for (var i = 0; i < message.cohorts.length; ++i) - $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) - $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) - $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortSpec message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.cohorts && message.cohorts.length)) - message.cohorts = []; - message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); - break; - } - case 2: { - message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortSpec message. - * @function verify - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cohorts != null && message.hasOwnProperty("cohorts")) { - if (!Array.isArray(message.cohorts)) - return "cohorts: array expected"; - for (var i = 0; i < message.cohorts.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); - if (error) - return "cohorts." + error; - } - } - if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { - var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); - if (error) - return "cohortsRange." + error; - } - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { - var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); - if (error) - return "cohortReportSettings." + error; - } - return null; - }; - - /** - * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec - */ - CohortSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) - return object; - var message = new $root.google.analytics.data.v1alpha.CohortSpec(); - if (object.cohorts) { - if (!Array.isArray(object.cohorts)) - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); - message.cohorts = []; - for (var i = 0; i < object.cohorts.length; ++i) { - if (typeof object.cohorts[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); - message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); - } - } - if (object.cohortsRange != null) { - if (typeof object.cohortsRange !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); - message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); - } - if (object.cohortReportSettings != null) { - if (typeof object.cohortReportSettings !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); - message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); - } - return message; - }; - - /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cohorts = []; - if (options.defaults) { - object.cohortsRange = null; - object.cohortReportSettings = null; - } - if (message.cohorts && message.cohorts.length) { - object.cohorts = []; - for (var j = 0; j < message.cohorts.length; ++j) - object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); - } - if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) - object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) - object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); - return object; - }; - - /** - * Converts this CohortSpec to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortSpec - * @instance - * @returns {Object.} JSON object - */ - CohortSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortSpec - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; - }; - - return CohortSpec; - })(); - - v1alpha.Cohort = (function() { - - /** - * Properties of a Cohort. - * @memberof google.analytics.data.v1alpha - * @interface ICohort - * @property {string|null} [name] Cohort name - * @property {string|null} [dimension] Cohort dimension - * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange - */ - - /** - * Constructs a new Cohort. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Cohort. - * @implements ICohort - * @constructor - * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set - */ - function Cohort(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Cohort name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - */ - Cohort.prototype.name = ""; - - /** - * Cohort dimension. - * @member {string} dimension - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - */ - Cohort.prototype.dimension = ""; - - /** - * Cohort dateRange. - * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - */ - Cohort.prototype.dateRange = null; - - /** - * Creates a new Cohort instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance - */ - Cohort.create = function create(properties) { - return new Cohort(properties); - }; - - /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cohort.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); - if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cohort.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Cohort message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Cohort} Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cohort.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimension = reader.string(); - break; - } - case 3: { - message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Cohort} Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cohort.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cohort message. - * @function verify - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cohort.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - if (!$util.isString(message.dimension)) - return "dimension: string expected"; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); - if (error) - return "dateRange." + error; - } - return null; - }; - - /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Cohort} Cohort - */ - Cohort.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Cohort) - return object; - var message = new $root.google.analytics.data.v1alpha.Cohort(); - if (object.name != null) - message.name = String(object.name); - if (object.dimension != null) - message.dimension = String(object.dimension); - if (object.dateRange != null) { - if (typeof object.dateRange !== "object") - throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); - message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); - } - return message; - }; - - /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {google.analytics.data.v1alpha.Cohort} message Cohort - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Cohort.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.dimension = ""; - object.dateRange = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = message.dimension; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) - object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); - return object; - }; - - /** - * Converts this Cohort to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - * @returns {Object.} JSON object - */ - Cohort.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Cohort - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; - }; - - return Cohort; - })(); - - v1alpha.CohortsRange = (function() { - - /** - * Properties of a CohortsRange. - * @memberof google.analytics.data.v1alpha - * @interface ICohortsRange - * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity - * @property {number|null} [startOffset] CohortsRange startOffset - * @property {number|null} [endOffset] CohortsRange endOffset - */ - - /** - * Constructs a new CohortsRange. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortsRange. - * @implements ICohortsRange - * @constructor - * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set - */ - function CohortsRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortsRange granularity. - * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - */ - CohortsRange.prototype.granularity = 0; - - /** - * CohortsRange startOffset. - * @member {number} startOffset - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - */ - CohortsRange.prototype.startOffset = 0; - - /** - * CohortsRange endOffset. - * @member {number} endOffset - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - */ - CohortsRange.prototype.endOffset = 0; - - /** - * Creates a new CohortsRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance - */ - CohortsRange.create = function create(properties) { - return new CohortsRange(properties); - }; - - /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortsRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); - return writer; - }; - - /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortsRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortsRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.granularity = reader.int32(); - break; - } - case 2: { - message.startOffset = reader.int32(); - break; - } - case 3: { - message.endOffset = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortsRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortsRange message. - * @function verify - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortsRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.granularity != null && message.hasOwnProperty("granularity")) - switch (message.granularity) { - default: - return "granularity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset)) - return "startOffset: integer expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset)) - return "endOffset: integer expected"; - return null; - }; - - /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange - */ - CohortsRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) - return object; - var message = new $root.google.analytics.data.v1alpha.CohortsRange(); - switch (object.granularity) { - default: - if (typeof object.granularity === "number") { - message.granularity = object.granularity; - break; - } - break; - case "GRANULARITY_UNSPECIFIED": - case 0: - message.granularity = 0; - break; - case "DAILY": - case 1: - message.granularity = 1; - break; - case "WEEKLY": - case 2: - message.granularity = 2; - break; - case "MONTHLY": - case 3: - message.granularity = 3; - break; - } - if (object.startOffset != null) - message.startOffset = object.startOffset | 0; - if (object.endOffset != null) - message.endOffset = object.endOffset | 0; - return message; - }; - - /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortsRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; - object.startOffset = 0; - object.endOffset = 0; - } - if (message.granularity != null && message.hasOwnProperty("granularity")) - object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = message.endOffset; - return object; - }; - - /** - * Converts this CohortsRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - * @returns {Object.} JSON object - */ - CohortsRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortsRange - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortsRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; - }; - - /** - * Granularity enum. - * @name google.analytics.data.v1alpha.CohortsRange.Granularity - * @enum {number} - * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value - * @property {number} DAILY=1 DAILY value - * @property {number} WEEKLY=2 WEEKLY value - * @property {number} MONTHLY=3 MONTHLY value - */ - CohortsRange.Granularity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DAILY"] = 1; - values[valuesById[2] = "WEEKLY"] = 2; - values[valuesById[3] = "MONTHLY"] = 3; - return values; - })(); - - return CohortsRange; - })(); - - v1alpha.CohortReportSettings = (function() { - - /** - * Properties of a CohortReportSettings. - * @memberof google.analytics.data.v1alpha - * @interface ICohortReportSettings - * @property {boolean|null} [accumulate] CohortReportSettings accumulate - */ - - /** - * Constructs a new CohortReportSettings. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortReportSettings. - * @implements ICohortReportSettings - * @constructor - * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set - */ - function CohortReportSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortReportSettings accumulate. - * @member {boolean} accumulate - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @instance - */ - CohortReportSettings.prototype.accumulate = false; - - /** - * Creates a new CohortReportSettings instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance - */ - CohortReportSettings.create = function create(properties) { - return new CohortReportSettings(properties); - }; - - /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortReportSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); - return writer; - }; - - /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortReportSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.accumulate = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortReportSettings message. - * @function verify - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortReportSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - if (typeof message.accumulate !== "boolean") - return "accumulate: boolean expected"; - return null; - }; - - /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings - */ - CohortReportSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) - return object; - var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); - if (object.accumulate != null) - message.accumulate = Boolean(object.accumulate); - return message; - }; - - /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortReportSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.accumulate = false; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - object.accumulate = message.accumulate; - return object; - }; - - /** - * Converts this CohortReportSettings to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @instance - * @returns {Object.} JSON object - */ - CohortReportSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortReportSettings - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortReportSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; - }; - - return CohortReportSettings; - })(); - - /** - * Section enum. - * @name google.analytics.data.v1alpha.Section - * @enum {number} - * @property {number} SECTION_UNSPECIFIED=0 SECTION_UNSPECIFIED value - * @property {number} SECTION_REPORT=1 SECTION_REPORT value - * @property {number} SECTION_ADVERTISING=2 SECTION_ADVERTISING value - */ - v1alpha.Section = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "SECTION_REPORT"] = 1; - values[valuesById[2] = "SECTION_ADVERTISING"] = 2; - return values; - })(); - - v1alpha.ResponseMetaData = (function() { - - /** - * Properties of a ResponseMetaData. - * @memberof google.analytics.data.v1alpha - * @interface IResponseMetaData - * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow - * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse - * @property {string|null} [currencyCode] ResponseMetaData currencyCode - * @property {string|null} [timeZone] ResponseMetaData timeZone - * @property {string|null} [emptyReason] ResponseMetaData emptyReason - * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding - * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas - * @property {google.analytics.data.v1alpha.Section|null} [section] ResponseMetaData section - */ - - /** - * Constructs a new ResponseMetaData. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ResponseMetaData. - * @implements IResponseMetaData - * @constructor - * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set - */ - function ResponseMetaData(properties) { - this.samplingMetadatas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseMetaData dataLossFromOtherRow. - * @member {boolean} dataLossFromOtherRow - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.dataLossFromOtherRow = false; - - /** - * ResponseMetaData schemaRestrictionResponse. - * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.schemaRestrictionResponse = null; - - /** - * ResponseMetaData currencyCode. - * @member {string|null|undefined} currencyCode - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.currencyCode = null; - - /** - * ResponseMetaData timeZone. - * @member {string|null|undefined} timeZone - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.timeZone = null; - - /** - * ResponseMetaData emptyReason. - * @member {string|null|undefined} emptyReason - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.emptyReason = null; - - /** - * ResponseMetaData subjectToThresholding. - * @member {boolean|null|undefined} subjectToThresholding - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.subjectToThresholding = null; - - /** - * ResponseMetaData samplingMetadatas. - * @member {Array.} samplingMetadatas - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; - - /** - * ResponseMetaData section. - * @member {google.analytics.data.v1alpha.Section} section - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.section = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { - get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { - get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { - get: $util.oneOfGetter($oneOfFields = ["timeZone"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { - get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { - get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ResponseMetaData instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance - */ - ResponseMetaData.create = function create(properties) { - return new ResponseMetaData(properties); - }; - - /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMetaData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); - if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) - $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); - if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); - if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); - if (message.samplingMetadatas != null && message.samplingMetadatas.length) - for (var i = 0; i < message.samplingMetadatas.length; ++i) - $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.section != null && Object.hasOwnProperty.call(message, "section")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.section); - return writer; - }; - - /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMetaData.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.dataLossFromOtherRow = reader.bool(); - break; - } - case 4: { - message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); - break; - } - case 5: { - message.currencyCode = reader.string(); - break; - } - case 6: { - message.timeZone = reader.string(); - break; - } - case 7: { - message.emptyReason = reader.string(); - break; - } - case 8: { - message.subjectToThresholding = reader.bool(); - break; - } - case 9: { - if (!(message.samplingMetadatas && message.samplingMetadatas.length)) - message.samplingMetadatas = []; - message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); - break; - } - case 10: { - message.section = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseMetaData message. - * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseMetaData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - if (typeof message.dataLossFromOtherRow !== "boolean") - return "dataLossFromOtherRow: boolean expected"; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - properties._schemaRestrictionResponse = 1; - { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); - if (error) - return "schemaRestrictionResponse." + error; - } - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - properties._currencyCode = 1; - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - properties._timeZone = 1; - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - properties._emptyReason = 1; - if (!$util.isString(message.emptyReason)) - return "emptyReason: string expected"; - } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - properties._subjectToThresholding = 1; - if (typeof message.subjectToThresholding !== "boolean") - return "subjectToThresholding: boolean expected"; - } - if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { - if (!Array.isArray(message.samplingMetadatas)) - return "samplingMetadatas: array expected"; - for (var i = 0; i < message.samplingMetadatas.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); - if (error) - return "samplingMetadatas." + error; - } - } - if (message.section != null && message.hasOwnProperty("section")) - switch (message.section) { - default: - return "section: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData - */ - ResponseMetaData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) - return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); - if (object.dataLossFromOtherRow != null) - message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); - if (object.schemaRestrictionResponse != null) { - if (typeof object.schemaRestrictionResponse !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); - message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.emptyReason != null) - message.emptyReason = String(object.emptyReason); - if (object.subjectToThresholding != null) - message.subjectToThresholding = Boolean(object.subjectToThresholding); - if (object.samplingMetadatas) { - if (!Array.isArray(object.samplingMetadatas)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); - message.samplingMetadatas = []; - for (var i = 0; i < object.samplingMetadatas.length; ++i) { - if (typeof object.samplingMetadatas[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); - message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); - } - } - switch (object.section) { - default: - if (typeof object.section === "number") { - message.section = object.section; - break; - } - break; - case "SECTION_UNSPECIFIED": - case 0: - message.section = 0; - break; - case "SECTION_REPORT": - case 1: - message.section = 1; - break; - case "SECTION_ADVERTISING": - case 2: - message.section = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseMetaData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.samplingMetadatas = []; - if (options.defaults) { - object.dataLossFromOtherRow = false; - object.section = options.enums === String ? "SECTION_UNSPECIFIED" : 0; - } - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - object.dataLossFromOtherRow = message.dataLossFromOtherRow; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); - if (options.oneofs) - object._schemaRestrictionResponse = "schemaRestrictionResponse"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - object.currencyCode = message.currencyCode; - if (options.oneofs) - object._currencyCode = "currencyCode"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = message.timeZone; - if (options.oneofs) - object._timeZone = "timeZone"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - object.emptyReason = message.emptyReason; - if (options.oneofs) - object._emptyReason = "emptyReason"; - } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - object.subjectToThresholding = message.subjectToThresholding; - if (options.oneofs) - object._subjectToThresholding = "subjectToThresholding"; - } - if (message.samplingMetadatas && message.samplingMetadatas.length) { - object.samplingMetadatas = []; - for (var j = 0; j < message.samplingMetadatas.length; ++j) - object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); - } - if (message.section != null && message.hasOwnProperty("section")) - object.section = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.section] === undefined ? message.section : $root.google.analytics.data.v1alpha.Section[message.section] : message.section; - return object; - }; - - /** - * Converts this ResponseMetaData to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - * @returns {Object.} JSON object - */ - ResponseMetaData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResponseMetaData - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; - }; - - ResponseMetaData.SchemaRestrictionResponse = (function() { - - /** - * Properties of a SchemaRestrictionResponse. - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @interface ISchemaRestrictionResponse - * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions - */ - - /** - * Constructs a new SchemaRestrictionResponse. - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @classdesc Represents a SchemaRestrictionResponse. - * @implements ISchemaRestrictionResponse - * @constructor - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - */ - function SchemaRestrictionResponse(properties) { - this.activeMetricRestrictions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchemaRestrictionResponse activeMetricRestrictions. - * @member {Array.} activeMetricRestrictions - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @instance - */ - SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; - - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance - */ - SchemaRestrictionResponse.create = function create(properties) { - return new SchemaRestrictionResponse(properties); - }; - - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) - $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) - message.activeMetricRestrictions = []; - message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaRestrictionResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaRestrictionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { - if (!Array.isArray(message.activeMetricRestrictions)) - return "activeMetricRestrictions: array expected"; - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); - if (error) - return "activeMetricRestrictions." + error; - } - } - return null; - }; - - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - */ - SchemaRestrictionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); - if (object.activeMetricRestrictions) { - if (!Array.isArray(object.activeMetricRestrictions)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); - message.activeMetricRestrictions = []; - for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { - if (typeof object.activeMetricRestrictions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); - message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaRestrictionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.activeMetricRestrictions = []; - if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { - object.activeMetricRestrictions = []; - for (var j = 0; j < message.activeMetricRestrictions.length; ++j) - object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); - } - return object; - }; - - /** - * Converts this SchemaRestrictionResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @instance - * @returns {Object.} JSON object - */ - SchemaRestrictionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchemaRestrictionResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; - }; - - SchemaRestrictionResponse.ActiveMetricRestriction = (function() { - - /** - * Properties of an ActiveMetricRestriction. - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @interface IActiveMetricRestriction - * @property {string|null} [metricName] ActiveMetricRestriction metricName - * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes - */ - - /** - * Constructs a new ActiveMetricRestriction. - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @classdesc Represents an ActiveMetricRestriction. - * @implements IActiveMetricRestriction - * @constructor - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - */ - function ActiveMetricRestriction(properties) { - this.restrictedMetricTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActiveMetricRestriction metricName. - * @member {string|null|undefined} metricName - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.metricName = null; - - /** - * ActiveMetricRestriction restrictedMetricTypes. - * @member {Array.} restrictedMetricTypes - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { - get: $util.oneOfGetter($oneOfFields = ["metricName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance - */ - ActiveMetricRestriction.create = function create(properties) { - return new ActiveMetricRestriction(properties); - }; - - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - writer.int32(message.restrictedMetricTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - case 2: { - if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) - message.restrictedMetricTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedMetricTypes.push(reader.int32()); - } else - message.restrictedMetricTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActiveMetricRestriction message. - * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveMetricRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - properties._metricName = 1; - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - } - if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { - if (!Array.isArray(message.restrictedMetricTypes)) - return "restrictedMetricTypes: array expected"; - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - switch (message.restrictedMetricTypes[i]) { - default: - return "restrictedMetricTypes: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - */ - ActiveMetricRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) - return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.restrictedMetricTypes) { - if (!Array.isArray(object.restrictedMetricTypes)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); - message.restrictedMetricTypes = []; - for (var i = 0; i < object.restrictedMetricTypes.length; ++i) - switch (object.restrictedMetricTypes[i]) { - default: - if (typeof object.restrictedMetricTypes[i] === "number") { - message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; - break; - } - case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": - case 0: - message.restrictedMetricTypes[i] = 0; - break; - case "COST_DATA": - case 1: - message.restrictedMetricTypes[i] = 1; - break; - case "REVENUE_DATA": - case 2: - message.restrictedMetricTypes[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveMetricRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.restrictedMetricTypes = []; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - object.metricName = message.metricName; - if (options.oneofs) - object._metricName = "metricName"; - } - if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { - object.restrictedMetricTypes = []; - for (var j = 0; j < message.restrictedMetricTypes.length; ++j) - object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; - } - return object; - }; - - /** - * Converts this ActiveMetricRestriction to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - * @returns {Object.} JSON object - */ - ActiveMetricRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActiveMetricRestriction - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; - }; - - return ActiveMetricRestriction; - })(); - - return SchemaRestrictionResponse; - })(); - - return ResponseMetaData; - })(); - - v1alpha.DimensionHeader = (function() { - - /** - * Properties of a DimensionHeader. - * @memberof google.analytics.data.v1alpha - * @interface IDimensionHeader - * @property {string|null} [name] DimensionHeader name - */ - - /** - * Constructs a new DimensionHeader. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionHeader. - * @implements IDimensionHeader - * @constructor - * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set - */ - function DimensionHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionHeader name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @instance - */ - DimensionHeader.prototype.name = ""; - - /** - * Creates a new DimensionHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance - */ - DimensionHeader.create = function create(properties) { - return new DimensionHeader(properties); - }; - - /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionHeader message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader - */ - DimensionHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DimensionHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @instance - * @returns {Object.} JSON object - */ - DimensionHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; - }; - - return DimensionHeader; - })(); - - v1alpha.MetricHeader = (function() { - - /** - * Properties of a MetricHeader. - * @memberof google.analytics.data.v1alpha - * @interface IMetricHeader - * @property {string|null} [name] MetricHeader name - * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type - */ - - /** - * Constructs a new MetricHeader. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a MetricHeader. - * @implements IMetricHeader - * @constructor - * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set - */ - function MetricHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricHeader name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.MetricHeader - * @instance - */ - MetricHeader.prototype.name = ""; - - /** - * MetricHeader type. - * @member {google.analytics.data.v1alpha.MetricType} type - * @memberof google.analytics.data.v1alpha.MetricHeader - * @instance - */ - MetricHeader.prototype.type = 0; - - /** - * Creates a new MetricHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance - */ - MetricHeader.create = function create(properties) { - return new MetricHeader(properties); - }; - - /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricHeader message. - * @function verify - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - return null; - }; - - /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader - */ - MetricHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) - return object; - var message = new $root.google.analytics.data.v1alpha.MetricHeader(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_INTEGER": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_SECONDS": - case 4: - message.type = 4; - break; - case "TYPE_MILLISECONDS": - case 5: - message.type = 5; - break; - case "TYPE_MINUTES": - case 6: - message.type = 6; - break; - case "TYPE_HOURS": - case 7: - message.type = 7; - break; - case "TYPE_STANDARD": - case 8: - message.type = 8; - break; - case "TYPE_CURRENCY": - case 9: - message.type = 9; - break; - case "TYPE_FEET": - case 10: - message.type = 10; - break; - case "TYPE_MILES": - case 11: - message.type = 11; - break; - case "TYPE_METERS": - case 12: - message.type = 12; - break; - case "TYPE_KILOMETERS": - case 13: - message.type = 13; - break; - } - return message; - }; - - /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; - return object; - }; - - /** - * Converts this MetricHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.MetricHeader - * @instance - * @returns {Object.} JSON object - */ - MetricHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.MetricHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; - }; - - return MetricHeader; - })(); - - v1alpha.Row = (function() { - - /** - * Properties of a Row. - * @memberof google.analytics.data.v1alpha - * @interface IRow - * @property {Array.|null} [dimensionValues] Row dimensionValues - * @property {Array.|null} [metricValues] Row metricValues - */ - - /** - * Constructs a new Row. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.dimensionValues = []; - this.metricValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Row dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1alpha.Row - * @instance - */ - Row.prototype.dimensionValues = $util.emptyArray; - - /** - * Row metricValues. - * @member {Array.} metricValues - * @memberof google.analytics.data.v1alpha.Row - * @instance - */ - Row.prototype.metricValues = $util.emptyArray; - - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; - - /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricValues != null && message.metricValues.length) - for (var i = 0; i < message.metricValues.length; ++i) - $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricValues && message.metricValues.length)) - message.metricValues = []; - message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Row message. - * @function verify - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - if (message.metricValues != null && message.hasOwnProperty("metricValues")) { - if (!Array.isArray(message.metricValues)) - return "metricValues: array expected"; - for (var i = 0; i < message.metricValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); - if (error) - return "metricValues." + error; - } - } - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Row) - return object; - var message = new $root.google.analytics.data.v1alpha.Row(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); - } - } - if (object.metricValues) { - if (!Array.isArray(object.metricValues)) - throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); - message.metricValues = []; - for (var i = 0; i < object.metricValues.length; ++i) { - if (typeof object.metricValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); - message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {google.analytics.data.v1alpha.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionValues = []; - object.metricValues = []; - } - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); - } - if (message.metricValues && message.metricValues.length) { - object.metricValues = []; - for (var j = 0; j < message.metricValues.length; ++j) - object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); - } - return object; - }; - - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Row - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Row - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; - }; - - return Row; - })(); - - v1alpha.DimensionValue = (function() { - - /** - * Properties of a DimensionValue. - * @memberof google.analytics.data.v1alpha - * @interface IDimensionValue - * @property {string|null} [value] DimensionValue value - */ - - /** - * Constructs a new DimensionValue. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionValue. - * @implements IDimensionValue - * @constructor - * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set - */ - function DimensionValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.DimensionValue - * @instance - */ - DimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.DimensionValue - * @instance - */ - Object.defineProperty(DimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DimensionValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance - */ - DimensionValue.create = function create(properties) { - return new DimensionValue(properties); - }; - - /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionValue message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue - */ - DimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this DimensionValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionValue - * @instance - * @returns {Object.} JSON object - */ - DimensionValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionValue - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; - }; - - return DimensionValue; - })(); - - v1alpha.MetricValue = (function() { - - /** - * Properties of a MetricValue. - * @memberof google.analytics.data.v1alpha - * @interface IMetricValue - * @property {string|null} [value] MetricValue value - */ - - /** - * Constructs a new MetricValue. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a MetricValue. - * @implements IMetricValue - * @constructor - * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set - */ - function MetricValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.MetricValue - * @instance - */ - MetricValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetricValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.MetricValue - * @instance - */ - Object.defineProperty(MetricValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MetricValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance - */ - MetricValue.create = function create(properties) { - return new MetricValue(properties); - }; - - /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); - return writer; - }; - - /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricValue message. - * @function verify - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue - */ - MetricValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) - return object; - var message = new $root.google.analytics.data.v1alpha.MetricValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this MetricValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.MetricValue - * @instance - * @returns {Object.} JSON object - */ - MetricValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricValue - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.MetricValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; - }; - - return MetricValue; - })(); - - v1alpha.PropertyQuota = (function() { - - /** - * Properties of a PropertyQuota. - * @memberof google.analytics.data.v1alpha - * @interface IPropertyQuota - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour - */ - - /** - * Constructs a new PropertyQuota. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a PropertyQuota. - * @implements IPropertyQuota - * @constructor - * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set - */ - function PropertyQuota(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PropertyQuota tokensPerDay. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerDay = null; - - /** - * PropertyQuota tokensPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerHour = null; - - /** - * PropertyQuota concurrentRequests. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.concurrentRequests = null; - - /** - * PropertyQuota serverErrorsPerProjectPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; - - /** - * PropertyQuota potentiallyThresholdedRequestsPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; - - /** - * PropertyQuota tokensPerProjectPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerProjectPerHour = null; - - /** - * Creates a new PropertyQuota instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance - */ - PropertyQuota.create = function create(properties) { - return new PropertyQuota(properties); - }; - - /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuota.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuota.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 2: { - message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 3: { - message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 5: { - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 6: { - message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuota.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PropertyQuota message. - * @function verify - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PropertyQuota.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); - if (error) - return "tokensPerDay." + error; - } - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); - if (error) - return "tokensPerHour." + error; - } - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); - if (error) - return "concurrentRequests." + error; - } - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); - if (error) - return "serverErrorsPerProjectPerHour." + error; - } - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); - if (error) - return "potentiallyThresholdedRequestsPerHour." + error; - } - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); - if (error) - return "tokensPerProjectPerHour." + error; - } - return null; - }; - - /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota - */ - PropertyQuota.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) - return object; - var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); - if (object.tokensPerDay != null) { - if (typeof object.tokensPerDay !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); - message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); - } - if (object.tokensPerHour != null) { - if (typeof object.tokensPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); - message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); - } - if (object.concurrentRequests != null) { - if (typeof object.concurrentRequests !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); - message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); - } - if (object.serverErrorsPerProjectPerHour != null) { - if (typeof object.serverErrorsPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); - } - if (object.potentiallyThresholdedRequestsPerHour != null) { - if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); - } - if (object.tokensPerProjectPerHour != null) { - if (typeof object.tokensPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); - message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); - } - return message; - }; - - /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PropertyQuota.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tokensPerDay = null; - object.tokensPerHour = null; - object.concurrentRequests = null; - object.serverErrorsPerProjectPerHour = null; - object.potentiallyThresholdedRequestsPerHour = null; - object.tokensPerProjectPerHour = null; - } - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) - object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) - object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) - object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) - object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) - object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) - object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); - return object; - }; - - /** - * Converts this PropertyQuota to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - * @returns {Object.} JSON object - */ - PropertyQuota.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PropertyQuota - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; - }; - - return PropertyQuota; - })(); - - v1alpha.QuotaStatus = (function() { - - /** - * Properties of a QuotaStatus. - * @memberof google.analytics.data.v1alpha - * @interface IQuotaStatus - * @property {number|null} [consumed] QuotaStatus consumed - * @property {number|null} [remaining] QuotaStatus remaining - */ - - /** - * Constructs a new QuotaStatus. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QuotaStatus. - * @implements IQuotaStatus - * @constructor - * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set - */ - function QuotaStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuotaStatus consumed. - * @member {number} consumed - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @instance - */ - QuotaStatus.prototype.consumed = 0; - - /** - * QuotaStatus remaining. - * @member {number} remaining - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @instance - */ - QuotaStatus.prototype.remaining = 0; - - /** - * Creates a new QuotaStatus instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance - */ - QuotaStatus.create = function create(properties) { - return new QuotaStatus(properties); - }; - - /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); - if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); - return writer; - }; - - /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaStatus.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.consumed = reader.int32(); - break; - } - case 2: { - message.remaining = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuotaStatus message. - * @function verify - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuotaStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consumed != null && message.hasOwnProperty("consumed")) - if (!$util.isInteger(message.consumed)) - return "consumed: integer expected"; - if (message.remaining != null && message.hasOwnProperty("remaining")) - if (!$util.isInteger(message.remaining)) - return "remaining: integer expected"; - return null; - }; - - /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus - */ - QuotaStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) - return object; - var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); - if (object.consumed != null) - message.consumed = object.consumed | 0; - if (object.remaining != null) - message.remaining = object.remaining | 0; - return message; - }; - - /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuotaStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.consumed = 0; - object.remaining = 0; - } - if (message.consumed != null && message.hasOwnProperty("consumed")) - object.consumed = message.consumed; - if (message.remaining != null && message.hasOwnProperty("remaining")) - object.remaining = message.remaining; - return object; - }; - - /** - * Converts this QuotaStatus to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @instance - * @returns {Object.} JSON object - */ - QuotaStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QuotaStatus - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QuotaStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; - }; - - return QuotaStatus; - })(); - - v1alpha.FunnelBreakdown = (function() { - - /** - * Properties of a FunnelBreakdown. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelBreakdown - * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension - * @property {number|Long|null} [limit] FunnelBreakdown limit - */ - - /** - * Constructs a new FunnelBreakdown. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelBreakdown. - * @implements IFunnelBreakdown - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set - */ - function FunnelBreakdown(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelBreakdown breakdownDimension. - * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @instance - */ - FunnelBreakdown.prototype.breakdownDimension = null; - - /** - * FunnelBreakdown limit. - * @member {number|Long|null|undefined} limit - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @instance - */ - FunnelBreakdown.prototype.limit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelBreakdown.prototype, "_limit", { - get: $util.oneOfGetter($oneOfFields = ["limit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelBreakdown instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance - */ - FunnelBreakdown.create = function create(properties) { - return new FunnelBreakdown(properties); - }; - - /** - * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelBreakdown.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) - $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); - return writer; - }; - - /** - * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelBreakdown message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelBreakdown.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); - break; - } - case 2: { - message.limit = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelBreakdown message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelBreakdown.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); - if (error) - return "breakdownDimension." + error; - } - if (message.limit != null && message.hasOwnProperty("limit")) { - properties._limit = 1; - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - } - return null; - }; - - /** - * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown - */ - FunnelBreakdown.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); - if (object.breakdownDimension != null) { - if (typeof object.breakdownDimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); - message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); - } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelBreakdown.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.breakdownDimension = null; - if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) - object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); - if (message.limit != null && message.hasOwnProperty("limit")) { - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (options.oneofs) - object._limit = "limit"; - } - return object; - }; - - /** - * Converts this FunnelBreakdown to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @instance - * @returns {Object.} JSON object - */ - FunnelBreakdown.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelBreakdown - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelBreakdown - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; - }; - - return FunnelBreakdown; - })(); - - v1alpha.FunnelNextAction = (function() { - - /** - * Properties of a FunnelNextAction. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelNextAction - * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension - * @property {number|Long|null} [limit] FunnelNextAction limit - */ - - /** - * Constructs a new FunnelNextAction. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelNextAction. - * @implements IFunnelNextAction - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set - */ - function FunnelNextAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelNextAction nextActionDimension. - * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @instance - */ - FunnelNextAction.prototype.nextActionDimension = null; - - /** - * FunnelNextAction limit. - * @member {number|Long|null|undefined} limit - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @instance - */ - FunnelNextAction.prototype.limit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelNextAction.prototype, "_limit", { - get: $util.oneOfGetter($oneOfFields = ["limit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelNextAction instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance - */ - FunnelNextAction.create = function create(properties) { - return new FunnelNextAction(properties); - }; - - /** - * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelNextAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) - $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); - return writer; - }; - - /** - * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelNextAction message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelNextAction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); - break; - } - case 2: { - message.limit = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelNextAction message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelNextAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); - if (error) - return "nextActionDimension." + error; - } - if (message.limit != null && message.hasOwnProperty("limit")) { - properties._limit = 1; - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - } - return null; - }; - - /** - * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction - */ - FunnelNextAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); - if (object.nextActionDimension != null) { - if (typeof object.nextActionDimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); - message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); - } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelNextAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.nextActionDimension = null; - if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) - object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); - if (message.limit != null && message.hasOwnProperty("limit")) { - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (options.oneofs) - object._limit = "limit"; - } - return object; - }; - - /** - * Converts this FunnelNextAction to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @instance - * @returns {Object.} JSON object - */ - FunnelNextAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelNextAction - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelNextAction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; - }; - - return FunnelNextAction; - })(); - - v1alpha.Funnel = (function() { - - /** - * Properties of a Funnel. - * @memberof google.analytics.data.v1alpha - * @interface IFunnel - * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel - * @property {Array.|null} [steps] Funnel steps - */ - - /** - * Constructs a new Funnel. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Funnel. - * @implements IFunnel - * @constructor - * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set - */ - function Funnel(properties) { - this.steps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Funnel isOpenFunnel. - * @member {boolean} isOpenFunnel - * @memberof google.analytics.data.v1alpha.Funnel - * @instance - */ - Funnel.prototype.isOpenFunnel = false; - - /** - * Funnel steps. - * @member {Array.} steps - * @memberof google.analytics.data.v1alpha.Funnel - * @instance - */ - Funnel.prototype.steps = $util.emptyArray; - - /** - * Creates a new Funnel instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance - */ - Funnel.create = function create(properties) { - return new Funnel(properties); - }; - - /** - * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Funnel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Funnel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Funnel message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Funnel} Funnel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Funnel.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.isOpenFunnel = reader.bool(); - break; - } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Funnel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Funnel} Funnel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Funnel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Funnel message. - * @function verify - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Funnel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) - if (typeof message.isOpenFunnel !== "boolean") - return "isOpenFunnel: boolean expected"; - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); - if (error) - return "steps." + error; - } - } - return null; - }; - - /** - * Creates a Funnel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Funnel} Funnel - */ - Funnel.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Funnel) - return object; - var message = new $root.google.analytics.data.v1alpha.Funnel(); - if (object.isOpenFunnel != null) - message.isOpenFunnel = Boolean(object.isOpenFunnel); - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); - message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Funnel message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {google.analytics.data.v1alpha.Funnel} message Funnel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Funnel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) - object.isOpenFunnel = false; - if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) - object.isOpenFunnel = message.isOpenFunnel; - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); - } - return object; - }; - - /** - * Converts this Funnel to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Funnel - * @instance - * @returns {Object.} JSON object - */ - Funnel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Funnel - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Funnel - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; - }; - - return Funnel; - })(); - - v1alpha.FunnelStep = (function() { - - /** - * Properties of a FunnelStep. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelStep - * @property {string|null} [name] FunnelStep name - * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy - * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep - * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression - */ - - /** - * Constructs a new FunnelStep. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelStep. - * @implements IFunnelStep - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set - */ - function FunnelStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelStep name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - */ - FunnelStep.prototype.name = ""; - - /** - * FunnelStep isDirectlyFollowedBy. - * @member {boolean} isDirectlyFollowedBy - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - */ - FunnelStep.prototype.isDirectlyFollowedBy = false; - - /** - * FunnelStep withinDurationFromPriorStep. - * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - */ - FunnelStep.prototype.withinDurationFromPriorStep = null; - - /** - * FunnelStep filterExpression. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - */ - FunnelStep.prototype.filterExpression = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { - get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelStep instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance - */ - FunnelStep.create = function create(properties) { - return new FunnelStep(properties); - }; - - /** - * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); - if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) - $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelStep message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelStep.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.isDirectlyFollowedBy = reader.bool(); - break; - } - case 3: { - message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelStep message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - if (typeof message.isDirectlyFollowedBy !== "boolean") - return "isDirectlyFollowedBy: boolean expected"; - if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { - properties._withinDurationFromPriorStep = 1; - { - var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); - if (error) - return "withinDurationFromPriorStep." + error; - } - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); - if (error) - return "filterExpression." + error; - } - return null; - }; - - /** - * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep - */ - FunnelStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelStep(); - if (object.name != null) - message.name = String(object.name); - if (object.isDirectlyFollowedBy != null) - message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); - if (object.withinDurationFromPriorStep != null) { - if (typeof object.withinDurationFromPriorStep !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); - message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); - } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); - } - return message; - }; - - /** - * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.isDirectlyFollowedBy = false; - object.filterExpression = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; - if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { - object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); - if (options.oneofs) - object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); - return object; - }; - - /** - * Converts this FunnelStep to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - * @returns {Object.} JSON object - */ - FunnelStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelStep - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; - }; - - return FunnelStep; - })(); - - v1alpha.FunnelSubReport = (function() { - - /** - * Properties of a FunnelSubReport. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelSubReport - * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders - * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders - * @property {Array.|null} [rows] FunnelSubReport rows - * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata - */ - - /** - * Constructs a new FunnelSubReport. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelSubReport. - * @implements IFunnelSubReport - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set - */ - function FunnelSubReport(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelSubReport dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - */ - FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; - - /** - * FunnelSubReport metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - */ - FunnelSubReport.prototype.metricHeaders = $util.emptyArray; - - /** - * FunnelSubReport rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - */ - FunnelSubReport.prototype.rows = $util.emptyArray; - - /** - * FunnelSubReport metadata. - * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - */ - FunnelSubReport.prototype.metadata = null; - - /** - * Creates a new FunnelSubReport instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance - */ - FunnelSubReport.create = function create(properties) { - return new FunnelSubReport(properties); - }; - - /** - * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelSubReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelSubReport message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelSubReport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelSubReport message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelSubReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport - */ - FunnelSubReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelSubReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - } - if (options.defaults) - object.metadata = null; - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this FunnelSubReport to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - * @returns {Object.} JSON object - */ - FunnelSubReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelSubReport - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; - }; - - return FunnelSubReport; - })(); - - v1alpha.UserSegment = (function() { - - /** - * Properties of a UserSegment. - * @memberof google.analytics.data.v1alpha - * @interface IUserSegment - * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria - * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion - */ - - /** - * Constructs a new UserSegment. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegment. - * @implements IUserSegment - * @constructor - * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set - */ - function UserSegment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSegment userInclusionCriteria. - * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria - * @memberof google.analytics.data.v1alpha.UserSegment - * @instance - */ - UserSegment.prototype.userInclusionCriteria = null; - - /** - * UserSegment exclusion. - * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.UserSegment - * @instance - */ - UserSegment.prototype.exclusion = null; - - /** - * Creates a new UserSegment instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance - */ - UserSegment.create = function create(properties) { - return new UserSegment(properties); - }; - - /** - * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) - $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSegment message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); - break; - } - case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSegment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSegment message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSegment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); - if (error) - return "userInclusionCriteria." + error; - } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; - - /** - * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment - */ - UserSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSegment(); - if (object.userInclusionCriteria != null) { - if (typeof object.userInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); - message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); - } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); - } - return message; - }; - - /** - * Creates a plain object from a UserSegment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSegment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userInclusionCriteria = null; - object.exclusion = null; - } - if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) - object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); - return object; - }; - - /** - * Converts this UserSegment to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegment - * @instance - * @returns {Object.} JSON object - */ - UserSegment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSegment - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; - }; - - return UserSegment; - })(); - - v1alpha.UserSegmentCriteria = (function() { - - /** - * Properties of a UserSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentCriteria - * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups - * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups - */ - - /** - * Constructs a new UserSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentCriteria. - * @implements IUserSegmentCriteria - * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set - */ - function UserSegmentCriteria(properties) { - this.andConditionGroups = []; - this.andSequenceGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @instance - */ - UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; - - /** - * UserSegmentCriteria andSequenceGroups. - * @member {Array.} andSequenceGroups - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @instance - */ - UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; - - /** - * Creates a new UserSegmentCriteria instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance - */ - UserSegmentCriteria.create = function create(properties) { - return new UserSegmentCriteria(properties); - }; - - /** - * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentCriteria.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.andSequenceGroups != null && message.andSequenceGroups.length) - for (var i = 0; i < message.andSequenceGroups.length; ++i) - $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentCriteria.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.andSequenceGroups && message.andSequenceGroups.length)) - message.andSequenceGroups = []; - message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSegmentCriteria message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSegmentCriteria.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); - if (error) - return "andConditionGroups." + error; - } - } - if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { - if (!Array.isArray(message.andSequenceGroups)) - return "andSequenceGroups: array expected"; - for (var i = 0; i < message.andSequenceGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); - if (error) - return "andSequenceGroups." + error; - } - } - return null; - }; - - /** - * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria - */ - UserSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); - } - } - if (object.andSequenceGroups) { - if (!Array.isArray(object.andSequenceGroups)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); - message.andSequenceGroups = []; - for (var i = 0; i < object.andSequenceGroups.length; ++i) { - if (typeof object.andSequenceGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); - message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSegmentCriteria.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.andConditionGroups = []; - object.andSequenceGroups = []; - } - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); - } - if (message.andSequenceGroups && message.andSequenceGroups.length) { - object.andSequenceGroups = []; - for (var j = 0; j < message.andSequenceGroups.length; ++j) - object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); - } - return object; - }; - - /** - * Converts this UserSegmentCriteria to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @instance - * @returns {Object.} JSON object - */ - UserSegmentCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSegmentCriteria - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; - }; - - return UserSegmentCriteria; - })(); - - /** - * UserCriteriaScoping enum. - * @name google.analytics.data.v1alpha.UserCriteriaScoping - * @enum {number} - * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value - * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value - * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value - */ - v1alpha.UserCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; - values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; - return values; - })(); - - v1alpha.UserSegmentConditionGroup = (function() { - - /** - * Properties of a UserSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentConditionGroup - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression - */ - - /** - * Constructs a new UserSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentConditionGroup. - * @implements IUserSegmentConditionGroup - * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set - */ - function UserSegmentConditionGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @instance - */ - UserSegmentConditionGroup.prototype.conditionScoping = 0; - - /** - * UserSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @instance - */ - UserSegmentConditionGroup.prototype.segmentFilterExpression = null; - - /** - * Creates a new UserSegmentConditionGroup instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance - */ - UserSegmentConditionGroup.create = function create(properties) { - return new UserSegmentConditionGroup(properties); - }; - - /** - * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentConditionGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentConditionGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.conditionScoping = reader.int32(); - break; - } - case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSegmentConditionGroup message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSegmentConditionGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { - default: - return "conditionScoping: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); - if (error) - return "segmentFilterExpression." + error; - } - return null; - }; - - /** - * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup - */ - UserSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); - switch (object.conditionScoping) { - default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; - break; - } - break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.conditionScoping = 0; - break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.conditionScoping = 1; - break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.conditionScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.conditionScoping = 3; - break; - } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSegmentConditionGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; - } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); - return object; - }; - - /** - * Converts this UserSegmentConditionGroup to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @instance - * @returns {Object.} JSON object - */ - UserSegmentConditionGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSegmentConditionGroup - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; - }; - - return UserSegmentConditionGroup; - })(); - - v1alpha.UserSegmentSequenceGroup = (function() { - - /** - * Properties of a UserSegmentSequenceGroup. - * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentSequenceGroup - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping - * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration - * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps - */ - - /** - * Constructs a new UserSegmentSequenceGroup. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentSequenceGroup. - * @implements IUserSegmentSequenceGroup - * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set - */ - function UserSegmentSequenceGroup(properties) { - this.userSequenceSteps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSegmentSequenceGroup sequenceScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @instance - */ - UserSegmentSequenceGroup.prototype.sequenceScoping = 0; - - /** - * UserSegmentSequenceGroup sequenceMaximumDuration. - * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @instance - */ - UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; - - /** - * UserSegmentSequenceGroup userSequenceSteps. - * @member {Array.} userSequenceSteps - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @instance - */ - UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; - - /** - * Creates a new UserSegmentSequenceGroup instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance - */ - UserSegmentSequenceGroup.create = function create(properties) { - return new UserSegmentSequenceGroup(properties); - }; - - /** - * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentSequenceGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); - if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) - $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.userSequenceSteps != null && message.userSequenceSteps.length) - for (var i = 0; i < message.userSequenceSteps.length; ++i) - $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentSequenceGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sequenceScoping = reader.int32(); - break; - } - case 2: { - message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.userSequenceSteps && message.userSequenceSteps.length)) - message.userSequenceSteps = []; - message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSegmentSequenceGroup message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSegmentSequenceGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) - switch (message.sequenceScoping) { - default: - return "sequenceScoping: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { - var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); - if (error) - return "sequenceMaximumDuration." + error; - } - if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { - if (!Array.isArray(message.userSequenceSteps)) - return "userSequenceSteps: array expected"; - for (var i = 0; i < message.userSequenceSteps.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); - if (error) - return "userSequenceSteps." + error; - } - } - return null; - }; - - /** - * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup - */ - UserSegmentSequenceGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); - switch (object.sequenceScoping) { - default: - if (typeof object.sequenceScoping === "number") { - message.sequenceScoping = object.sequenceScoping; - break; - } - break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.sequenceScoping = 0; - break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.sequenceScoping = 1; - break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.sequenceScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.sequenceScoping = 3; - break; - } - if (object.sequenceMaximumDuration != null) { - if (typeof object.sequenceMaximumDuration !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); - message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); - } - if (object.userSequenceSteps) { - if (!Array.isArray(object.userSequenceSteps)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); - message.userSequenceSteps = []; - for (var i = 0; i < object.userSequenceSteps.length; ++i) { - if (typeof object.userSequenceSteps[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); - message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSegmentSequenceGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userSequenceSteps = []; - if (options.defaults) { - object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.sequenceMaximumDuration = null; - } - if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) - object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) - object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); - if (message.userSequenceSteps && message.userSequenceSteps.length) { - object.userSequenceSteps = []; - for (var j = 0; j < message.userSequenceSteps.length; ++j) - object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); - } - return object; - }; - - /** - * Converts this UserSegmentSequenceGroup to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @instance - * @returns {Object.} JSON object - */ - UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSegmentSequenceGroup - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; - }; - - return UserSegmentSequenceGroup; - })(); - - v1alpha.UserSequenceStep = (function() { - - /** - * Properties of a UserSequenceStep. - * @memberof google.analytics.data.v1alpha - * @interface IUserSequenceStep - * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression - */ - - /** - * Constructs a new UserSequenceStep. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSequenceStep. - * @implements IUserSequenceStep - * @constructor - * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set - */ - function UserSequenceStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSequenceStep isDirectlyFollowedBy. - * @member {boolean} isDirectlyFollowedBy - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @instance - */ - UserSequenceStep.prototype.isDirectlyFollowedBy = false; - - /** - * UserSequenceStep stepScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @instance - */ - UserSequenceStep.prototype.stepScoping = 0; - - /** - * UserSequenceStep segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @instance - */ - UserSequenceStep.prototype.segmentFilterExpression = null; - - /** - * Creates a new UserSequenceStep instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance - */ - UserSequenceStep.create = function create(properties) { - return new UserSequenceStep(properties); - }; - - /** - * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSequenceStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); - if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSequenceStep message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSequenceStep.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.isDirectlyFollowedBy = reader.bool(); - break; - } - case 2: { - message.stepScoping = reader.int32(); - break; - } - case 3: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSequenceStep message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSequenceStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - if (typeof message.isDirectlyFollowedBy !== "boolean") - return "isDirectlyFollowedBy: boolean expected"; - if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) - switch (message.stepScoping) { - default: - return "stepScoping: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); - if (error) - return "segmentFilterExpression." + error; - } - return null; - }; - - /** - * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep - */ - UserSequenceStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); - if (object.isDirectlyFollowedBy != null) - message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); - switch (object.stepScoping) { - default: - if (typeof object.stepScoping === "number") { - message.stepScoping = object.stepScoping; - break; - } - break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.stepScoping = 0; - break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.stepScoping = 1; - break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.stepScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.stepScoping = 3; - break; - } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSequenceStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.isDirectlyFollowedBy = false; - object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; - } - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; - if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) - object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); - return object; - }; - - /** - * Converts this UserSequenceStep to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @instance - * @returns {Object.} JSON object - */ - UserSequenceStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSequenceStep - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; - }; - - return UserSequenceStep; - })(); - - v1alpha.UserSegmentExclusion = (function() { - - /** - * Properties of a UserSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentExclusion - * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration - * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria - */ - - /** - * Constructs a new UserSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentExclusion. - * @implements IUserSegmentExclusion - * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set - */ - function UserSegmentExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserSegmentExclusion userExclusionDuration. - * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @instance - */ - UserSegmentExclusion.prototype.userExclusionDuration = 0; - - /** - * UserSegmentExclusion userExclusionCriteria. - * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @instance - */ - UserSegmentExclusion.prototype.userExclusionCriteria = null; - - /** - * Creates a new UserSegmentExclusion instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance - */ - UserSegmentExclusion.create = function create(properties) { - return new UserSegmentExclusion(properties); - }; - - /** - * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); - if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) - $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentExclusion.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userExclusionDuration = reader.int32(); - break; - } - case 2: { - message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserSegmentExclusion message. - * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserSegmentExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) - switch (message.userExclusionDuration) { - default: - return "userExclusionDuration: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); - if (error) - return "userExclusionCriteria." + error; - } - return null; - }; - - /** - * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion - */ - UserSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) - return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); - switch (object.userExclusionDuration) { - default: - if (typeof object.userExclusionDuration === "number") { - message.userExclusionDuration = object.userExclusionDuration; - break; - } - break; - case "USER_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.userExclusionDuration = 0; - break; - case "USER_EXCLUSION_TEMPORARY": - case 1: - message.userExclusionDuration = 1; - break; - case "USER_EXCLUSION_PERMANENT": - case 2: - message.userExclusionDuration = 2; - break; - } - if (object.userExclusionCriteria != null) { - if (typeof object.userExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); - message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); - } - return message; - }; - - /** - * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserSegmentExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.userExclusionCriteria = null; - } - if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) - object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; - if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) - object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); - return object; - }; - - /** - * Converts this UserSegmentExclusion to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @instance - * @returns {Object.} JSON object - */ - UserSegmentExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserSegmentExclusion - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; - }; - - return UserSegmentExclusion; - })(); - - /** - * UserExclusionDuration enum. - * @name google.analytics.data.v1alpha.UserExclusionDuration - * @enum {number} - * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value - * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value - */ - v1alpha.UserExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; - values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; - return values; - })(); - - v1alpha.SessionSegment = (function() { - - /** - * Properties of a SessionSegment. - * @memberof google.analytics.data.v1alpha - * @interface ISessionSegment - * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria - * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion - */ - - /** - * Constructs a new SessionSegment. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegment. - * @implements ISessionSegment - * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set - */ - function SessionSegment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionSegment sessionInclusionCriteria. - * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria - * @memberof google.analytics.data.v1alpha.SessionSegment - * @instance - */ - SessionSegment.prototype.sessionInclusionCriteria = null; - - /** - * SessionSegment exclusion. - * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.SessionSegment - * @instance - */ - SessionSegment.prototype.exclusion = null; - - /** - * Creates a new SessionSegment instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance - */ - SessionSegment.create = function create(properties) { - return new SessionSegment(properties); - }; - - /** - * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) - $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionSegment message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); - break; - } - case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionSegment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionSegment message. - * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionSegment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); - if (error) - return "sessionInclusionCriteria." + error; - } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; - - /** - * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment - */ - SessionSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) - return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegment(); - if (object.sessionInclusionCriteria != null) { - if (typeof object.sessionInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); - message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); - } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); - } - return message; - }; - - /** - * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionSegment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sessionInclusionCriteria = null; - object.exclusion = null; - } - if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) - object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); - return object; - }; - - /** - * Converts this SessionSegment to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegment - * @instance - * @returns {Object.} JSON object - */ - SessionSegment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionSegment - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; - }; - - return SessionSegment; - })(); - - v1alpha.SessionSegmentCriteria = (function() { - - /** - * Properties of a SessionSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentCriteria - * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups - */ - - /** - * Constructs a new SessionSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentCriteria. - * @implements ISessionSegmentCriteria - * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set - */ - function SessionSegmentCriteria(properties) { - this.andConditionGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @instance - */ - SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; - - /** - * Creates a new SessionSegmentCriteria instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance - */ - SessionSegmentCriteria.create = function create(properties) { - return new SessionSegmentCriteria(properties); - }; - - /** - * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentCriteria.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentCriteria.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionSegmentCriteria message. - * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionSegmentCriteria.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); - if (error) - return "andConditionGroups." + error; - } - } - return null; - }; - - /** - * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria - */ - SessionSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) - return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionSegmentCriteria.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.andConditionGroups = []; - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); - } - return object; - }; - - /** - * Converts this SessionSegmentCriteria to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @instance - * @returns {Object.} JSON object - */ - SessionSegmentCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionSegmentCriteria - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; - }; - - return SessionSegmentCriteria; - })(); - - /** - * SessionCriteriaScoping enum. - * @name google.analytics.data.v1alpha.SessionCriteriaScoping - * @enum {number} - * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value - * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value - */ - v1alpha.SessionCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; - return values; - })(); - - v1alpha.SessionSegmentConditionGroup = (function() { - - /** - * Properties of a SessionSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentConditionGroup - * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression - */ - - /** - * Constructs a new SessionSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentConditionGroup. - * @implements ISessionSegmentConditionGroup - * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set - */ - function SessionSegmentConditionGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @instance - */ - SessionSegmentConditionGroup.prototype.conditionScoping = 0; - - /** - * SessionSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @instance - */ - SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; - - /** - * Creates a new SessionSegmentConditionGroup instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance - */ - SessionSegmentConditionGroup.create = function create(properties) { - return new SessionSegmentConditionGroup(properties); - }; - - /** - * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentConditionGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentConditionGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.conditionScoping = reader.int32(); - break; - } - case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionSegmentConditionGroup message. - * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionSegmentConditionGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { - default: - return "conditionScoping: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); - if (error) - return "segmentFilterExpression." + error; - } - return null; - }; - - /** - * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup - */ - SessionSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) - return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); - switch (object.conditionScoping) { - default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; - break; - } - break; - case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.conditionScoping = 0; - break; - case "SESSION_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.conditionScoping = 1; - break; - case "SESSION_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.conditionScoping = 2; - break; - } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionSegmentConditionGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; - } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); - return object; - }; - - /** - * Converts this SessionSegmentConditionGroup to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @instance - * @returns {Object.} JSON object - */ - SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionSegmentConditionGroup - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; - }; - - return SessionSegmentConditionGroup; - })(); - - v1alpha.SessionSegmentExclusion = (function() { - - /** - * Properties of a SessionSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentExclusion - * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration - * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria - */ - - /** - * Constructs a new SessionSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentExclusion. - * @implements ISessionSegmentExclusion - * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set - */ - function SessionSegmentExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionSegmentExclusion sessionExclusionDuration. - * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @instance - */ - SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; - - /** - * SessionSegmentExclusion sessionExclusionCriteria. - * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @instance - */ - SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; - - /** - * Creates a new SessionSegmentExclusion instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance - */ - SessionSegmentExclusion.create = function create(properties) { - return new SessionSegmentExclusion(properties); - }; - - /** - * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); - if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) - $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentExclusion.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sessionExclusionDuration = reader.int32(); - break; - } - case 2: { - message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionSegmentExclusion message. - * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionSegmentExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) - switch (message.sessionExclusionDuration) { - default: - return "sessionExclusionDuration: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); - if (error) - return "sessionExclusionCriteria." + error; - } - return null; - }; - - /** - * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion - */ - SessionSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) - return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); - switch (object.sessionExclusionDuration) { - default: - if (typeof object.sessionExclusionDuration === "number") { - message.sessionExclusionDuration = object.sessionExclusionDuration; - break; - } - break; - case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.sessionExclusionDuration = 0; - break; - case "SESSION_EXCLUSION_TEMPORARY": - case 1: - message.sessionExclusionDuration = 1; - break; - case "SESSION_EXCLUSION_PERMANENT": - case 2: - message.sessionExclusionDuration = 2; - break; - } - if (object.sessionExclusionCriteria != null) { - if (typeof object.sessionExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); - message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); - } - return message; - }; - - /** - * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionSegmentExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.sessionExclusionCriteria = null; - } - if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) - object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; - if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) - object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); - return object; - }; - - /** - * Converts this SessionSegmentExclusion to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @instance - * @returns {Object.} JSON object - */ - SessionSegmentExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionSegmentExclusion - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; - }; - - return SessionSegmentExclusion; - })(); - - /** - * SessionExclusionDuration enum. - * @name google.analytics.data.v1alpha.SessionExclusionDuration - * @enum {number} - * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value - * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value - */ - v1alpha.SessionExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; - values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; - return values; - })(); - - v1alpha.EventSegment = (function() { - - /** - * Properties of an EventSegment. - * @memberof google.analytics.data.v1alpha - * @interface IEventSegment - * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria - * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion - */ - - /** - * Constructs a new EventSegment. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegment. - * @implements IEventSegment - * @constructor - * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set - */ - function EventSegment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventSegment eventInclusionCriteria. - * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria - * @memberof google.analytics.data.v1alpha.EventSegment - * @instance - */ - EventSegment.prototype.eventInclusionCriteria = null; - - /** - * EventSegment exclusion. - * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.EventSegment - * @instance - */ - EventSegment.prototype.exclusion = null; - - /** - * Creates a new EventSegment instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance - */ - EventSegment.create = function create(properties) { - return new EventSegment(properties); - }; - - /** - * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) - $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventSegment message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); - break; - } - case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventSegment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventSegment message. - * @function verify - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventSegment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); - if (error) - return "eventInclusionCriteria." + error; - } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; - } - return null; - }; - - /** - * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment - */ - EventSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) - return object; - var message = new $root.google.analytics.data.v1alpha.EventSegment(); - if (object.eventInclusionCriteria != null) { - if (typeof object.eventInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); - message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); - } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); - } - return message; - }; - - /** - * Creates a plain object from an EventSegment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventSegment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.eventInclusionCriteria = null; - object.exclusion = null; - } - if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) - object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); - return object; - }; - - /** - * Converts this EventSegment to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegment - * @instance - * @returns {Object.} JSON object - */ - EventSegment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventSegment - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; - }; - - return EventSegment; - })(); - - v1alpha.EventSegmentCriteria = (function() { - - /** - * Properties of an EventSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentCriteria - * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups - */ - - /** - * Constructs a new EventSegmentCriteria. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentCriteria. - * @implements IEventSegmentCriteria - * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set - */ - function EventSegmentCriteria(properties) { - this.andConditionGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @instance - */ - EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; - - /** - * Creates a new EventSegmentCriteria instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance - */ - EventSegmentCriteria.create = function create(properties) { - return new EventSegmentCriteria(properties); - }; - - /** - * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentCriteria.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentCriteria.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventSegmentCriteria message. - * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventSegmentCriteria.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); - if (error) - return "andConditionGroups." + error; - } - } - return null; - }; - - /** - * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria - */ - EventSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) - return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventSegmentCriteria.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.andConditionGroups = []; - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); - } - return object; - }; - - /** - * Converts this EventSegmentCriteria to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @instance - * @returns {Object.} JSON object - */ - EventSegmentCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventSegmentCriteria - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; - }; - - return EventSegmentCriteria; - })(); - - /** - * EventCriteriaScoping enum. - * @name google.analytics.data.v1alpha.EventCriteriaScoping - * @enum {number} - * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value - */ - v1alpha.EventCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; - return values; - })(); - - v1alpha.EventSegmentConditionGroup = (function() { - - /** - * Properties of an EventSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentConditionGroup - * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression - */ - - /** - * Constructs a new EventSegmentConditionGroup. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentConditionGroup. - * @implements IEventSegmentConditionGroup - * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set - */ - function EventSegmentConditionGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @instance - */ - EventSegmentConditionGroup.prototype.conditionScoping = 0; - - /** - * EventSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @instance - */ - EventSegmentConditionGroup.prototype.segmentFilterExpression = null; - - /** - * Creates a new EventSegmentConditionGroup instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance - */ - EventSegmentConditionGroup.create = function create(properties) { - return new EventSegmentConditionGroup(properties); - }; - - /** - * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentConditionGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentConditionGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.conditionScoping = reader.int32(); - break; - } - case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventSegmentConditionGroup message. - * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventSegmentConditionGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { - default: - return "conditionScoping: enum value expected"; - case 0: - case 1: - break; - } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); - if (error) - return "segmentFilterExpression." + error; - } - return null; - }; - - /** - * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup - */ - EventSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) - return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); - switch (object.conditionScoping) { - default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; - break; - } - break; - case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.conditionScoping = 0; - break; - case "EVENT_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.conditionScoping = 1; - break; - } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventSegmentConditionGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; - } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); - return object; - }; - - /** - * Converts this EventSegmentConditionGroup to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @instance - * @returns {Object.} JSON object - */ - EventSegmentConditionGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventSegmentConditionGroup - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; - }; - - return EventSegmentConditionGroup; - })(); - - v1alpha.EventSegmentExclusion = (function() { - - /** - * Properties of an EventSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentExclusion - * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration - * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria - */ - - /** - * Constructs a new EventSegmentExclusion. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentExclusion. - * @implements IEventSegmentExclusion - * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set - */ - function EventSegmentExclusion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventSegmentExclusion eventExclusionDuration. - * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @instance - */ - EventSegmentExclusion.prototype.eventExclusionDuration = 0; - - /** - * EventSegmentExclusion eventExclusionCriteria. - * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @instance - */ - EventSegmentExclusion.prototype.eventExclusionCriteria = null; - - /** - * Creates a new EventSegmentExclusion instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance - */ - EventSegmentExclusion.create = function create(properties) { - return new EventSegmentExclusion(properties); - }; - - /** - * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentExclusion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); - if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) - $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentExclusion.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventExclusionDuration = reader.int32(); - break; - } - case 2: { - message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventSegmentExclusion message. - * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventSegmentExclusion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) - switch (message.eventExclusionDuration) { - default: - return "eventExclusionDuration: enum value expected"; - case 0: - case 1: - break; - } - if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); - if (error) - return "eventExclusionCriteria." + error; - } - return null; - }; - - /** - * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion - */ - EventSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) - return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); - switch (object.eventExclusionDuration) { - default: - if (typeof object.eventExclusionDuration === "number") { - message.eventExclusionDuration = object.eventExclusionDuration; - break; - } - break; - case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.eventExclusionDuration = 0; - break; - case "EVENT_EXCLUSION_PERMANENT": - case 1: - message.eventExclusionDuration = 1; - break; - } - if (object.eventExclusionCriteria != null) { - if (typeof object.eventExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); - message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); - } - return message; - }; - - /** - * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventSegmentExclusion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.eventExclusionCriteria = null; - } - if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) - object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; - if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) - object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); - return object; - }; - - /** - * Converts this EventSegmentExclusion to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @instance - * @returns {Object.} JSON object - */ - EventSegmentExclusion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventSegmentExclusion - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; - }; - - return EventSegmentExclusion; - })(); - - /** - * EventExclusionDuration enum. - * @name google.analytics.data.v1alpha.EventExclusionDuration - * @enum {number} - * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value - */ - v1alpha.EventExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; - return values; - })(); - - v1alpha.Segment = (function() { - - /** - * Properties of a Segment. - * @memberof google.analytics.data.v1alpha - * @interface ISegment - * @property {string|null} [name] Segment name - * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment - * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment - * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment - */ - - /** - * Constructs a new Segment. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Segment. - * @implements ISegment - * @constructor - * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set - */ - function Segment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Segment name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.name = ""; - - /** - * Segment userSegment. - * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.userSegment = null; - - /** - * Segment sessionSegment. - * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.sessionSegment = null; - - /** - * Segment eventSegment. - * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.eventSegment = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Segment oneSegmentScope. - * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Object.defineProperty(Segment.prototype, "oneSegmentScope", { - get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Segment instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Segment} Segment instance - */ - Segment.create = function create(properties) { - return new Segment(properties); - }; - - /** - * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Segment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) - $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) - $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) - $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Segment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Segment message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Segment} Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Segment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Segment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Segment} Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Segment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Segment message. - * @function verify - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Segment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.userSegment != null && message.hasOwnProperty("userSegment")) { - properties.oneSegmentScope = 1; - { - var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); - if (error) - return "userSegment." + error; - } - } - if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { - if (properties.oneSegmentScope === 1) - return "oneSegmentScope: multiple values"; - properties.oneSegmentScope = 1; - { - var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); - if (error) - return "sessionSegment." + error; - } - } - if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { - if (properties.oneSegmentScope === 1) - return "oneSegmentScope: multiple values"; - properties.oneSegmentScope = 1; - { - var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); - if (error) - return "eventSegment." + error; - } - } - return null; - }; - - /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Segment} Segment - */ - Segment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Segment) - return object; - var message = new $root.google.analytics.data.v1alpha.Segment(); - if (object.name != null) - message.name = String(object.name); - if (object.userSegment != null) { - if (typeof object.userSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); - message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); - } - if (object.sessionSegment != null) { - if (typeof object.sessionSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); - message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); - } - if (object.eventSegment != null) { - if (typeof object.eventSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); - message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); - } - return message; - }; - - /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {google.analytics.data.v1alpha.Segment} message Segment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Segment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userSegment != null && message.hasOwnProperty("userSegment")) { - object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); - if (options.oneofs) - object.oneSegmentScope = "userSegment"; - } - if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { - object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); - if (options.oneofs) - object.oneSegmentScope = "sessionSegment"; - } - if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { - object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); - if (options.oneofs) - object.oneSegmentScope = "eventSegment"; - } - return object; - }; - - /** - * Converts this Segment to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Segment - * @instance - * @returns {Object.} JSON object - */ - Segment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Segment - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Segment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; - }; - - return Segment; - })(); - - v1alpha.SegmentFilterExpression = (function() { - - /** - * Properties of a SegmentFilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterExpression - * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup - * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression - * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter - * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter - */ - - /** - * Constructs a new SegmentFilterExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterExpression. - * @implements ISegmentFilterExpression - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set - */ - function SegmentFilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.andGroup = null; - - /** - * SegmentFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.orGroup = null; - - /** - * SegmentFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.notExpression = null; - - /** - * SegmentFilterExpression segmentFilter. - * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.segmentFilter = null; - - /** - * SegmentFilterExpression segmentEventFilter. - * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.segmentEventFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SegmentFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - Object.defineProperty(SegmentFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentFilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance - */ - SegmentFilterExpression.create = function create(properties) { - return new SegmentFilterExpression(properties); - }; - - /** - * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) - $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) - $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentFilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentFilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); - if (error) - return "segmentFilter." + error; - } - } - if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); - if (error) - return "segmentEventFilter." + error; - } - } - return null; - }; - - /** - * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression - */ - SegmentFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); - } - if (object.segmentFilter != null) { - if (typeof object.segmentFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); - message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); - } - if (object.segmentEventFilter != null) { - if (typeof object.segmentEventFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); - message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); - } - return message; - }; - - /** - * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentFilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { - object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); - if (options.oneofs) - object.expr = "segmentFilter"; - } - if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { - object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); - if (options.oneofs) - object.expr = "segmentEventFilter"; - } - return object; - }; - - /** - * Converts this SegmentFilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - * @returns {Object.} JSON object - */ - SegmentFilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentFilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; - }; - - return SegmentFilterExpression; - })(); - - v1alpha.SegmentFilterExpressionList = (function() { - - /** - * Properties of a SegmentFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterExpressionList - * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions - */ - - /** - * Constructs a new SegmentFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterExpressionList. - * @implements ISegmentFilterExpressionList - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set - */ - function SegmentFilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @instance - */ - SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new SegmentFilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance - */ - SegmentFilterExpressionList.create = function create(properties) { - return new SegmentFilterExpressionList(properties); - }; - - /** - * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentFilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentFilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList - */ - SegmentFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentFilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this SegmentFilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - SegmentFilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentFilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; - }; - - return SegmentFilterExpressionList; - })(); - - v1alpha.SegmentFilter = (function() { - - /** - * Properties of a SegmentFilter. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilter - * @property {string|null} [fieldName] SegmentFilter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter - * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping - */ - - /** - * Constructs a new SegmentFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilter. - * @implements ISegmentFilter - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set - */ - function SegmentFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.fieldName = ""; - - /** - * SegmentFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.stringFilter = null; - - /** - * SegmentFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.inListFilter = null; - - /** - * SegmentFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.numericFilter = null; - - /** - * SegmentFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.betweenFilter = null; - - /** - * SegmentFilter filterScoping. - * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - SegmentFilter.prototype.filterScoping = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SegmentFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - */ - Object.defineProperty(SegmentFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance - */ - SegmentFilter.create = function create(properties) { - return new SegmentFilter(properties); - }; - - /** - * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) - $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - case 8: { - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); - if (error) - return "filterScoping." + error; - } - return null; - }; - - /** - * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter - */ - SegmentFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - if (object.filterScoping != null) { - if (typeof object.filterScoping !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); - } - return message; - }; - - /** - * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldName = ""; - object.filterScoping = null; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) - object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); - return object; - }; - - /** - * Converts this SegmentFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @instance - * @returns {Object.} JSON object - */ - SegmentFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; - }; - - return SegmentFilter; - })(); - - v1alpha.SegmentFilterScoping = (function() { - - /** - * Properties of a SegmentFilterScoping. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterScoping - * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime - */ - - /** - * Constructs a new SegmentFilterScoping. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterScoping. - * @implements ISegmentFilterScoping - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set - */ - function SegmentFilterScoping(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentFilterScoping atAnyPointInTime. - * @member {boolean|null|undefined} atAnyPointInTime - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @instance - */ - SegmentFilterScoping.prototype.atAnyPointInTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { - get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentFilterScoping instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance - */ - SegmentFilterScoping.create = function create(properties) { - return new SegmentFilterScoping(properties); - }; - - /** - * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterScoping.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); - return writer; - }; - - /** - * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterScoping.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.atAnyPointInTime = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentFilterScoping message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentFilterScoping.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { - properties._atAnyPointInTime = 1; - if (typeof message.atAnyPointInTime !== "boolean") - return "atAnyPointInTime: boolean expected"; - } - return null; - }; - - /** - * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping - */ - SegmentFilterScoping.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); - if (object.atAnyPointInTime != null) - message.atAnyPointInTime = Boolean(object.atAnyPointInTime); - return message; - }; - - /** - * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentFilterScoping.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { - object.atAnyPointInTime = message.atAnyPointInTime; - if (options.oneofs) - object._atAnyPointInTime = "atAnyPointInTime"; - } - return object; - }; - - /** - * Converts this SegmentFilterScoping to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @instance - * @returns {Object.} JSON object - */ - SegmentFilterScoping.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentFilterScoping - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; - }; - - return SegmentFilterScoping; - })(); - - v1alpha.SegmentEventFilter = (function() { - - /** - * Properties of a SegmentEventFilter. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentEventFilter - * @property {string|null} [eventName] SegmentEventFilter eventName - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression - */ - - /** - * Constructs a new SegmentEventFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentEventFilter. - * @implements ISegmentEventFilter - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set - */ - function SegmentEventFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentEventFilter eventName. - * @member {string|null|undefined} eventName - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @instance - */ - SegmentEventFilter.prototype.eventName = null; - - /** - * SegmentEventFilter segmentParameterFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @instance - */ - SegmentEventFilter.prototype.segmentParameterFilterExpression = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { - get: $util.oneOfGetter($oneOfFields = ["eventName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { - get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentEventFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance - */ - SegmentEventFilter.create = function create(properties) { - return new SegmentEventFilter(properties); - }; - - /** - * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentEventFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentEventFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentEventFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventName = reader.string(); - break; - } - case 2: { - message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentEventFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentEventFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - properties._eventName = 1; - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - } - if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { - properties._segmentParameterFilterExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); - if (error) - return "segmentParameterFilterExpression." + error; - } - } - return null; - }; - - /** - * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter - */ - SegmentEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.segmentParameterFilterExpression != null) { - if (typeof object.segmentParameterFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); - message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentEventFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - object.eventName = message.eventName; - if (options.oneofs) - object._eventName = "eventName"; - } - if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { - object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); - if (options.oneofs) - object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; - } - return object; - }; - - /** - * Converts this SegmentEventFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @instance - * @returns {Object.} JSON object - */ - SegmentEventFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentEventFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentEventFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; - }; - - return SegmentEventFilter; - })(); - - v1alpha.SegmentParameterFilterExpression = (function() { - - /** - * Properties of a SegmentParameterFilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterExpression - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression - * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter - */ - - /** - * Constructs a new SegmentParameterFilterExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterExpression. - * @implements ISegmentParameterFilterExpression - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set - */ - function SegmentParameterFilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentParameterFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.andGroup = null; - - /** - * SegmentParameterFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.orGroup = null; - - /** - * SegmentParameterFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.notExpression = null; - - /** - * SegmentParameterFilterExpression segmentParameterFilter. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SegmentParameterFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentParameterFilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance - */ - SegmentParameterFilterExpression.create = function create(properties) { - return new SegmentParameterFilterExpression(properties); - }; - - /** - * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) - $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentParameterFilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentParameterFilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); - if (error) - return "segmentParameterFilter." + error; - } - } - return null; - }; - - /** - * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression - */ - SegmentParameterFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); - } - if (object.segmentParameterFilter != null) { - if (typeof object.segmentParameterFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); - message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); - } - return message; - }; - - /** - * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentParameterFilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { - object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); - if (options.oneofs) - object.expr = "segmentParameterFilter"; - } - return object; - }; - - /** - * Converts this SegmentParameterFilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - * @returns {Object.} JSON object - */ - SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentParameterFilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; - }; - - return SegmentParameterFilterExpression; - })(); - - v1alpha.SegmentParameterFilterExpressionList = (function() { - - /** - * Properties of a SegmentParameterFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterExpressionList - * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions - */ - - /** - * Constructs a new SegmentParameterFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterExpressionList. - * @implements ISegmentParameterFilterExpressionList - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set - */ - function SegmentParameterFilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentParameterFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @instance - */ - SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance - */ - SegmentParameterFilterExpressionList.create = function create(properties) { - return new SegmentParameterFilterExpressionList(properties); - }; - - /** - * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentParameterFilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentParameterFilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList - */ - SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this SegmentParameterFilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentParameterFilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; - }; - - return SegmentParameterFilterExpressionList; - })(); - - v1alpha.SegmentParameterFilter = (function() { - - /** - * Properties of a SegmentParameterFilter. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilter - * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName - * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping - */ - - /** - * Constructs a new SegmentParameterFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilter. - * @implements ISegmentParameterFilter - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set - */ - function SegmentParameterFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentParameterFilter eventParameterName. - * @member {string|null|undefined} eventParameterName - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.eventParameterName = null; - - /** - * SegmentParameterFilter itemParameterName. - * @member {string|null|undefined} itemParameterName - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.itemParameterName = null; - - /** - * SegmentParameterFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.stringFilter = null; - - /** - * SegmentParameterFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.inListFilter = null; - - /** - * SegmentParameterFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.numericFilter = null; - - /** - * SegmentParameterFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.betweenFilter = null; - - /** - * SegmentParameterFilter filterScoping. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.filterScoping = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SegmentParameterFilter oneParameter. - * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { - get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SegmentParameterFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentParameterFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance - */ - SegmentParameterFilter.create = function create(properties) { - return new SegmentParameterFilter(properties); - }; - - /** - * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); - if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventParameterName = reader.string(); - break; - } - case 2: { - message.itemParameterName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - case 8: { - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentParameterFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentParameterFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - properties.oneParameter = 1; - if (!$util.isString(message.eventParameterName)) - return "eventParameterName: string expected"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - if (properties.oneParameter === 1) - return "oneParameter: multiple values"; - properties.oneParameter = 1; - if (!$util.isString(message.itemParameterName)) - return "itemParameterName: string expected"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); - if (error) - return "filterScoping." + error; - } - return null; - }; - - /** - * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter - */ - SegmentParameterFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); - if (object.eventParameterName != null) - message.eventParameterName = String(object.eventParameterName); - if (object.itemParameterName != null) - message.itemParameterName = String(object.itemParameterName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - if (object.filterScoping != null) { - if (typeof object.filterScoping !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); - } - return message; - }; - - /** - * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentParameterFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.filterScoping = null; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - object.eventParameterName = message.eventParameterName; - if (options.oneofs) - object.oneParameter = "eventParameterName"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - object.itemParameterName = message.itemParameterName; - if (options.oneofs) - object.oneParameter = "itemParameterName"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) - object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); - return object; - }; - - /** - * Converts this SegmentParameterFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - * @returns {Object.} JSON object - */ - SegmentParameterFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentParameterFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; - }; - - return SegmentParameterFilter; - })(); - - v1alpha.SegmentParameterFilterScoping = (function() { - - /** - * Properties of a SegmentParameterFilterScoping. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterScoping - * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod - */ - - /** - * Constructs a new SegmentParameterFilterScoping. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterScoping. - * @implements ISegmentParameterFilterScoping - * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set - */ - function SegmentParameterFilterScoping(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentParameterFilterScoping inAnyNDayPeriod. - * @member {number|Long|null|undefined} inAnyNDayPeriod - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @instance - */ - SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { - get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SegmentParameterFilterScoping instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance - */ - SegmentParameterFilterScoping.create = function create(properties) { - return new SegmentParameterFilterScoping(properties); - }; - - /** - * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterScoping.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); - return writer; - }; - - /** - * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterScoping.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.inAnyNDayPeriod = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentParameterFilterScoping message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentParameterFilterScoping.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { - properties._inAnyNDayPeriod = 1; - if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) - return "inAnyNDayPeriod: integer|Long expected"; - } - return null; - }; - - /** - * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping - */ - SegmentParameterFilterScoping.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) - return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); - if (object.inAnyNDayPeriod != null) - if ($util.Long) - (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; - else if (typeof object.inAnyNDayPeriod === "string") - message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); - else if (typeof object.inAnyNDayPeriod === "number") - message.inAnyNDayPeriod = object.inAnyNDayPeriod; - else if (typeof object.inAnyNDayPeriod === "object") - message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentParameterFilterScoping.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { - if (typeof message.inAnyNDayPeriod === "number") - object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; - else - object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; - if (options.oneofs) - object._inAnyNDayPeriod = "inAnyNDayPeriod"; - } - return object; - }; - - /** - * Converts this SegmentParameterFilterScoping to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @instance - * @returns {Object.} JSON object - */ - SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SegmentParameterFilterScoping - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; - }; - - return SegmentParameterFilterScoping; - })(); - - v1alpha.FunnelFilterExpression = (function() { - - /** - * Properties of a FunnelFilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelFilterExpression - * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter - * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter - */ - - /** - * Constructs a new FunnelFilterExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFilterExpression. - * @implements IFunnelFilterExpression - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set - */ - function FunnelFilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.andGroup = null; - - /** - * FunnelFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.orGroup = null; - - /** - * FunnelFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.notExpression = null; - - /** - * FunnelFilterExpression funnelFieldFilter. - * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.funnelFieldFilter = null; - - /** - * FunnelFilterExpression funnelEventFilter. - * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.funnelEventFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FunnelFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - Object.defineProperty(FunnelFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelFilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance - */ - FunnelFilterExpression.create = function create(properties) { - return new FunnelFilterExpression(properties); - }; - - /** - * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) - $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) - $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelFilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelFilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); - if (error) - return "funnelFieldFilter." + error; - } - } - if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); - if (error) - return "funnelEventFilter." + error; - } - } - return null; - }; - - /** - * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression - */ - FunnelFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); - } - if (object.funnelFieldFilter != null) { - if (typeof object.funnelFieldFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); - message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); - } - if (object.funnelEventFilter != null) { - if (typeof object.funnelEventFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); - message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); - } - return message; - }; - - /** - * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelFilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { - object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); - if (options.oneofs) - object.expr = "funnelFieldFilter"; - } - if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { - object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); - if (options.oneofs) - object.expr = "funnelEventFilter"; - } - return object; - }; - - /** - * Converts this FunnelFilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - * @returns {Object.} JSON object - */ - FunnelFilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelFilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; - }; - - return FunnelFilterExpression; - })(); - - v1alpha.FunnelFilterExpressionList = (function() { - - /** - * Properties of a FunnelFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelFilterExpressionList - * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions - */ - - /** - * Constructs a new FunnelFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFilterExpressionList. - * @implements IFunnelFilterExpressionList - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set - */ - function FunnelFilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @instance - */ - FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new FunnelFilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance - */ - FunnelFilterExpressionList.create = function create(properties) { - return new FunnelFilterExpressionList(properties); - }; - - /** - * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelFilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelFilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList - */ - FunnelFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelFilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this FunnelFilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - FunnelFilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelFilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; - }; - - return FunnelFilterExpressionList; - })(); - - v1alpha.FunnelFieldFilter = (function() { - - /** - * Properties of a FunnelFieldFilter. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelFieldFilter - * @property {string|null} [fieldName] FunnelFieldFilter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter - */ - - /** - * Constructs a new FunnelFieldFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFieldFilter. - * @implements IFunnelFieldFilter - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set - */ - function FunnelFieldFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelFieldFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.fieldName = ""; - - /** - * FunnelFieldFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.stringFilter = null; - - /** - * FunnelFieldFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.inListFilter = null; - - /** - * FunnelFieldFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.numericFilter = null; - - /** - * FunnelFieldFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.betweenFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FunnelFieldFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelFieldFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance - */ - FunnelFieldFilter.create = function create(properties) { - return new FunnelFieldFilter(properties); - }; - - /** - * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFieldFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFieldFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelFieldFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelFieldFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - return null; - }; - - /** - * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter - */ - FunnelFieldFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - return message; - }; - - /** - * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelFieldFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - return object; - }; - - /** - * Converts this FunnelFieldFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - * @returns {Object.} JSON object - */ - FunnelFieldFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelFieldFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; - }; - - return FunnelFieldFilter; - })(); - - v1alpha.FunnelEventFilter = (function() { - - /** - * Properties of a FunnelEventFilter. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelEventFilter - * @property {string|null} [eventName] FunnelEventFilter eventName - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression - */ - - /** - * Constructs a new FunnelEventFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelEventFilter. - * @implements IFunnelEventFilter - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set - */ - function FunnelEventFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelEventFilter eventName. - * @member {string|null|undefined} eventName - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @instance - */ - FunnelEventFilter.prototype.eventName = null; - - /** - * FunnelEventFilter funnelParameterFilterExpression. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @instance - */ - FunnelEventFilter.prototype.funnelParameterFilterExpression = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { - get: $util.oneOfGetter($oneOfFields = ["eventName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { - get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelEventFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance - */ - FunnelEventFilter.create = function create(properties) { - return new FunnelEventFilter(properties); - }; - - /** - * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelEventFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelEventFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelEventFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventName = reader.string(); - break; - } - case 2: { - message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelEventFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelEventFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - properties._eventName = 1; - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - } - if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { - properties._funnelParameterFilterExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); - if (error) - return "funnelParameterFilterExpression." + error; - } - } - return null; - }; - - /** - * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter - */ - FunnelEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.funnelParameterFilterExpression != null) { - if (typeof object.funnelParameterFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); - message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelEventFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - object.eventName = message.eventName; - if (options.oneofs) - object._eventName = "eventName"; - } - if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { - object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); - if (options.oneofs) - object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; - } - return object; - }; - - /** - * Converts this FunnelEventFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @instance - * @returns {Object.} JSON object - */ - FunnelEventFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelEventFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; - }; - - return FunnelEventFilter; - })(); - - v1alpha.FunnelParameterFilterExpression = (function() { - - /** - * Properties of a FunnelParameterFilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilterExpression - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter - */ - - /** - * Constructs a new FunnelParameterFilterExpression. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilterExpression. - * @implements IFunnelParameterFilterExpression - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set - */ - function FunnelParameterFilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelParameterFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.andGroup = null; - - /** - * FunnelParameterFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.orGroup = null; - - /** - * FunnelParameterFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.notExpression = null; - - /** - * FunnelParameterFilterExpression funnelParameterFilter. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FunnelParameterFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelParameterFilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance - */ - FunnelParameterFilterExpression.create = function create(properties) { - return new FunnelParameterFilterExpression(properties); - }; - - /** - * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) - $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelParameterFilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelParameterFilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); - if (error) - return "funnelParameterFilter." + error; - } - } - return null; - }; - - /** - * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression - */ - FunnelParameterFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); - } - if (object.funnelParameterFilter != null) { - if (typeof object.funnelParameterFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); - message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); - } - return message; - }; - - /** - * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelParameterFilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { - object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); - if (options.oneofs) - object.expr = "funnelParameterFilter"; - } - return object; - }; - - /** - * Converts this FunnelParameterFilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - * @returns {Object.} JSON object - */ - FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelParameterFilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; - }; - - return FunnelParameterFilterExpression; - })(); - - v1alpha.FunnelParameterFilterExpressionList = (function() { - - /** - * Properties of a FunnelParameterFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilterExpressionList - * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions - */ - - /** - * Constructs a new FunnelParameterFilterExpressionList. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilterExpressionList. - * @implements IFunnelParameterFilterExpressionList - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set - */ - function FunnelParameterFilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelParameterFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @instance - */ - FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance - */ - FunnelParameterFilterExpressionList.create = function create(properties) { - return new FunnelParameterFilterExpressionList(properties); - }; - - /** - * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelParameterFilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelParameterFilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList - */ - FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this FunnelParameterFilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelParameterFilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; - }; - - return FunnelParameterFilterExpressionList; - })(); - - v1alpha.FunnelParameterFilter = (function() { - - /** - * Properties of a FunnelParameterFilter. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilter - * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName - * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter - */ - - /** - * Constructs a new FunnelParameterFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilter. - * @implements IFunnelParameterFilter - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set - */ - function FunnelParameterFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelParameterFilter eventParameterName. - * @member {string|null|undefined} eventParameterName - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.eventParameterName = null; - - /** - * FunnelParameterFilter itemParameterName. - * @member {string|null|undefined} itemParameterName - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.itemParameterName = null; - - /** - * FunnelParameterFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.stringFilter = null; - - /** - * FunnelParameterFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.inListFilter = null; - - /** - * FunnelParameterFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.numericFilter = null; - - /** - * FunnelParameterFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - FunnelParameterFilter.prototype.betweenFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FunnelParameterFilter oneParameter. - * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { - get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FunnelParameterFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - */ - Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FunnelParameterFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance - */ - FunnelParameterFilter.create = function create(properties) { - return new FunnelParameterFilter(properties); - }; - - /** - * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); - if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eventParameterName = reader.string(); - break; - } - case 2: { - message.itemParameterName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelParameterFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelParameterFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - properties.oneParameter = 1; - if (!$util.isString(message.eventParameterName)) - return "eventParameterName: string expected"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - if (properties.oneParameter === 1) - return "oneParameter: multiple values"; - properties.oneParameter = 1; - if (!$util.isString(message.itemParameterName)) - return "itemParameterName: string expected"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - return null; - }; - - /** - * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter - */ - FunnelParameterFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); - if (object.eventParameterName != null) - message.eventParameterName = String(object.eventParameterName); - if (object.itemParameterName != null) - message.itemParameterName = String(object.itemParameterName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - return message; - }; - - /** - * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelParameterFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - object.eventParameterName = message.eventParameterName; - if (options.oneofs) - object.oneParameter = "eventParameterName"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - object.itemParameterName = message.itemParameterName; - if (options.oneofs) - object.oneParameter = "itemParameterName"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - return object; - }; - - /** - * Converts this FunnelParameterFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @instance - * @returns {Object.} JSON object - */ - FunnelParameterFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelParameterFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; - }; - - return FunnelParameterFilter; - })(); - - v1alpha.FunnelResponseMetadata = (function() { - - /** - * Properties of a FunnelResponseMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelResponseMetadata - * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas - */ - - /** - * Constructs a new FunnelResponseMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelResponseMetadata. - * @implements IFunnelResponseMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set - */ - function FunnelResponseMetadata(properties) { - this.samplingMetadatas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelResponseMetadata samplingMetadatas. - * @member {Array.} samplingMetadatas - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @instance - */ - FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; - - /** - * Creates a new FunnelResponseMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance - */ - FunnelResponseMetadata.create = function create(properties) { - return new FunnelResponseMetadata(properties); - }; - - /** - * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelResponseMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplingMetadatas != null && message.samplingMetadatas.length) - for (var i = 0; i < message.samplingMetadatas.length; ++i) - $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelResponseMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.samplingMetadatas && message.samplingMetadatas.length)) - message.samplingMetadatas = []; - message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FunnelResponseMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FunnelResponseMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { - if (!Array.isArray(message.samplingMetadatas)) - return "samplingMetadatas: array expected"; - for (var i = 0; i < message.samplingMetadatas.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); - if (error) - return "samplingMetadatas." + error; - } - } - return null; - }; - - /** - * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata - */ - FunnelResponseMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); - if (object.samplingMetadatas) { - if (!Array.isArray(object.samplingMetadatas)) - throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); - message.samplingMetadatas = []; - for (var i = 0; i < object.samplingMetadatas.length; ++i) { - if (typeof object.samplingMetadatas[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); - message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FunnelResponseMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.samplingMetadatas = []; - if (message.samplingMetadatas && message.samplingMetadatas.length) { - object.samplingMetadatas = []; - for (var j = 0; j < message.samplingMetadatas.length; ++j) - object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); - } - return object; - }; - - /** - * Converts this FunnelResponseMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @instance - * @returns {Object.} JSON object - */ - FunnelResponseMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FunnelResponseMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; - }; - - return FunnelResponseMetadata; - })(); - - v1alpha.SamplingMetadata = (function() { - - /** - * Properties of a SamplingMetadata. - * @memberof google.analytics.data.v1alpha - * @interface ISamplingMetadata - * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount - * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize - */ - - /** - * Constructs a new SamplingMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SamplingMetadata. - * @implements ISamplingMetadata - * @constructor - * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set - */ - function SamplingMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SamplingMetadata samplesReadCount. - * @member {number|Long} samplesReadCount - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @instance - */ - SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SamplingMetadata samplingSpaceSize. - * @member {number|Long} samplingSpaceSize - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @instance - */ - SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SamplingMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance - */ - SamplingMetadata.create = function create(properties) { - return new SamplingMetadata(properties); - }; - - /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SamplingMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); - if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); - return writer; - }; - - /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SamplingMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.samplesReadCount = reader.int64(); - break; - } - case 2: { - message.samplingSpaceSize = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SamplingMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SamplingMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) - return "samplesReadCount: integer|Long expected"; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) - return "samplingSpaceSize: integer|Long expected"; - return null; - }; - - /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata - */ - SamplingMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); - if (object.samplesReadCount != null) - if ($util.Long) - (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; - else if (typeof object.samplesReadCount === "string") - message.samplesReadCount = parseInt(object.samplesReadCount, 10); - else if (typeof object.samplesReadCount === "number") - message.samplesReadCount = object.samplesReadCount; - else if (typeof object.samplesReadCount === "object") - message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); - if (object.samplingSpaceSize != null) - if ($util.Long) - (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; - else if (typeof object.samplingSpaceSize === "string") - message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); - else if (typeof object.samplingSpaceSize === "number") - message.samplingSpaceSize = object.samplingSpaceSize; - else if (typeof object.samplingSpaceSize === "object") - message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SamplingMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplesReadCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplingSpaceSize = options.longs === String ? "0" : 0; - } - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (typeof message.samplesReadCount === "number") - object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; - else - object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (typeof message.samplingSpaceSize === "number") - object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; - else - object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; - return object; - }; - - /** - * Converts this SamplingMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @instance - * @returns {Object.} JSON object - */ - SamplingMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SamplingMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SamplingMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; - }; - - return SamplingMetadata; - })(); - - /** - * MetricAggregation enum. - * @name google.analytics.data.v1alpha.MetricAggregation - * @enum {number} - * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value - * @property {number} TOTAL=1 TOTAL value - * @property {number} MINIMUM=5 MINIMUM value - * @property {number} MAXIMUM=6 MAXIMUM value - * @property {number} COUNT=4 COUNT value - */ - v1alpha.MetricAggregation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOTAL"] = 1; - values[valuesById[5] = "MINIMUM"] = 5; - values[valuesById[6] = "MAXIMUM"] = 6; - values[valuesById[4] = "COUNT"] = 4; - return values; - })(); - - /** - * MetricType enum. - * @name google.analytics.data.v1alpha.MetricType - * @enum {number} - * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value - * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value - * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value - * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value - * @property {number} TYPE_HOURS=7 TYPE_HOURS value - * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value - * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value - * @property {number} TYPE_FEET=10 TYPE_FEET value - * @property {number} TYPE_MILES=11 TYPE_MILES value - * @property {number} TYPE_METERS=12 TYPE_METERS value - * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value - */ - v1alpha.MetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_INTEGER"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[4] = "TYPE_SECONDS"] = 4; - values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; - values[valuesById[6] = "TYPE_MINUTES"] = 6; - values[valuesById[7] = "TYPE_HOURS"] = 7; - values[valuesById[8] = "TYPE_STANDARD"] = 8; - values[valuesById[9] = "TYPE_CURRENCY"] = 9; - values[valuesById[10] = "TYPE_FEET"] = 10; - values[valuesById[11] = "TYPE_MILES"] = 11; - values[valuesById[12] = "TYPE_METERS"] = 12; - values[valuesById[13] = "TYPE_KILOMETERS"] = 13; - return values; - })(); - - /** - * RestrictedMetricType enum. - * @name google.analytics.data.v1alpha.RestrictedMetricType - * @enum {number} - * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value - * @property {number} COST_DATA=1 COST_DATA value - * @property {number} REVENUE_DATA=2 REVENUE_DATA value - */ - v1alpha.RestrictedMetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COST_DATA"] = 1; - values[valuesById[2] = "REVENUE_DATA"] = 2; - return values; - })(); - - /** - * SamplingLevel enum. - * @name google.analytics.data.v1alpha.SamplingLevel - * @enum {number} - * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value - * @property {number} LOW=1 LOW value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} UNSAMPLED=3 UNSAMPLED value - */ - v1alpha.SamplingLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "UNSAMPLED"] = 3; - return values; - })(); - - v1alpha.ConversionSpec = (function() { - - /** - * Properties of a ConversionSpec. - * @memberof google.analytics.data.v1alpha - * @interface IConversionSpec - * @property {Array.|null} [conversionActions] ConversionSpec conversionActions - * @property {google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null} [attributionModel] ConversionSpec attributionModel - */ - - /** - * Constructs a new ConversionSpec. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ConversionSpec. - * @implements IConversionSpec - * @constructor - * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set - */ - function ConversionSpec(properties) { - this.conversionActions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConversionSpec conversionActions. - * @member {Array.} conversionActions - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @instance - */ - ConversionSpec.prototype.conversionActions = $util.emptyArray; - - /** - * ConversionSpec attributionModel. - * @member {google.analytics.data.v1alpha.ConversionSpec.AttributionModel} attributionModel - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @instance - */ - ConversionSpec.prototype.attributionModel = 0; - - /** - * Creates a new ConversionSpec instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec instance - */ - ConversionSpec.create = function create(properties) { - return new ConversionSpec(properties); - }; - - /** - * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversionActions != null && message.conversionActions.length) - for (var i = 0; i < message.conversionActions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionActions[i]); - if (message.attributionModel != null && Object.hasOwnProperty.call(message, "attributionModel")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attributionModel); - return writer; - }; - - /** - * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConversionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversionSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.conversionActions && message.conversionActions.length)) - message.conversionActions = []; - message.conversionActions.push(reader.string()); - break; - } - case 2: { - message.attributionModel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConversionSpec message. - * @function verify - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conversionActions != null && message.hasOwnProperty("conversionActions")) { - if (!Array.isArray(message.conversionActions)) - return "conversionActions: array expected"; - for (var i = 0; i < message.conversionActions.length; ++i) - if (!$util.isString(message.conversionActions[i])) - return "conversionActions: string[] expected"; - } - if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) - switch (message.attributionModel) { - default: - return "attributionModel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec - */ - ConversionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ConversionSpec) - return object; - var message = new $root.google.analytics.data.v1alpha.ConversionSpec(); - if (object.conversionActions) { - if (!Array.isArray(object.conversionActions)) - throw TypeError(".google.analytics.data.v1alpha.ConversionSpec.conversionActions: array expected"); - message.conversionActions = []; - for (var i = 0; i < object.conversionActions.length; ++i) - message.conversionActions[i] = String(object.conversionActions[i]); - } - switch (object.attributionModel) { - default: - if (typeof object.attributionModel === "number") { - message.attributionModel = object.attributionModel; - break; - } - break; - case "ATTRIBUTION_MODEL_UNSPECIFIED": - case 0: - message.attributionModel = 0; - break; - case "DATA_DRIVEN": - case 1: - message.attributionModel = 1; - break; - case "LAST_CLICK": - case 2: - message.attributionModel = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {google.analytics.data.v1alpha.ConversionSpec} message ConversionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.conversionActions = []; - if (options.defaults) - object.attributionModel = options.enums === String ? "ATTRIBUTION_MODEL_UNSPECIFIED" : 0; - if (message.conversionActions && message.conversionActions.length) { - object.conversionActions = []; - for (var j = 0; j < message.conversionActions.length; ++j) - object.conversionActions[j] = message.conversionActions[j]; - } - if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) - object.attributionModel = options.enums === String ? $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] === undefined ? message.attributionModel : $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] : message.attributionModel; - return object; - }; - - /** - * Converts this ConversionSpec to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @instance - * @returns {Object.} JSON object - */ - ConversionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConversionSpec - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ConversionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionSpec"; - }; - - /** - * AttributionModel enum. - * @name google.analytics.data.v1alpha.ConversionSpec.AttributionModel - * @enum {number} - * @property {number} ATTRIBUTION_MODEL_UNSPECIFIED=0 ATTRIBUTION_MODEL_UNSPECIFIED value - * @property {number} DATA_DRIVEN=1 DATA_DRIVEN value - * @property {number} LAST_CLICK=2 LAST_CLICK value - */ - ConversionSpec.AttributionModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_DRIVEN"] = 1; - values[valuesById[2] = "LAST_CLICK"] = 2; - return values; - })(); - - return ConversionSpec; - })(); - - v1alpha.DimensionMetadata = (function() { - - /** - * Properties of a DimensionMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IDimensionMetadata - * @property {string|null} [apiName] DimensionMetadata apiName - * @property {string|null} [uiName] DimensionMetadata uiName - * @property {string|null} [description] DimensionMetadata description - * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames - * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition - * @property {string|null} [category] DimensionMetadata category - * @property {Array.|null} [sections] DimensionMetadata sections - */ - - /** - * Constructs a new DimensionMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionMetadata. - * @implements IDimensionMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set - */ - function DimensionMetadata(properties) { - this.deprecatedApiNames = []; - this.sections = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.apiName = ""; - - /** - * DimensionMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.uiName = ""; - - /** - * DimensionMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.description = ""; - - /** - * DimensionMetadata deprecatedApiNames. - * @member {Array.} deprecatedApiNames - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; - - /** - * DimensionMetadata customDefinition. - * @member {boolean} customDefinition - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.customDefinition = false; - - /** - * DimensionMetadata category. - * @member {string} category - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.category = ""; - - /** - * DimensionMetadata sections. - * @member {Array.} sections - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.sections = $util.emptyArray; - - /** - * Creates a new DimensionMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata instance - */ - DimensionMetadata.create = function create(properties) { - return new DimensionMetadata(properties); - }; - - /** - * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); - if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.category); - if (message.sections != null && message.sections.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.sections.length; ++i) - writer.int32(message.sections[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) - message.deprecatedApiNames = []; - message.deprecatedApiNames.push(reader.string()); - break; - } - case 5: { - message.customDefinition = reader.bool(); - break; - } - case 6: { - message.category = reader.string(); - break; - } - case 7: { - if (!(message.sections && message.sections.length)) - message.sections = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sections.push(reader.int32()); - } else - message.sections.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { - if (!Array.isArray(message.deprecatedApiNames)) - return "deprecatedApiNames: array expected"; - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - if (!$util.isString(message.deprecatedApiNames[i])) - return "deprecatedApiNames: string[] expected"; - } - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - if (typeof message.customDefinition !== "boolean") - return "customDefinition: boolean expected"; - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.sections != null && message.hasOwnProperty("sections")) { - if (!Array.isArray(message.sections)) - return "sections: array expected"; - for (var i = 0; i < message.sections.length; ++i) - switch (message.sections[i]) { - default: - return "sections: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata - */ - DimensionMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - if (object.deprecatedApiNames) { - if (!Array.isArray(object.deprecatedApiNames)) - throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.deprecatedApiNames: array expected"); - message.deprecatedApiNames = []; - for (var i = 0; i < object.deprecatedApiNames.length; ++i) - message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); - } - if (object.customDefinition != null) - message.customDefinition = Boolean(object.customDefinition); - if (object.category != null) - message.category = String(object.category); - if (object.sections) { - if (!Array.isArray(object.sections)) - throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.sections: array expected"); - message.sections = []; - for (var i = 0; i < object.sections.length; ++i) - switch (object.sections[i]) { - default: - if (typeof object.sections[i] === "number") { - message.sections[i] = object.sections[i]; - break; - } - case "SECTION_UNSPECIFIED": - case 0: - message.sections[i] = 0; - break; - case "SECTION_REPORT": - case 1: - message.sections[i] = 1; - break; - case "SECTION_ADVERTISING": - case 2: - message.sections[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {google.analytics.data.v1alpha.DimensionMetadata} message DimensionMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.deprecatedApiNames = []; - object.sections = []; - } - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - object.customDefinition = false; - object.category = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecatedApiNames && message.deprecatedApiNames.length) { - object.deprecatedApiNames = []; - for (var j = 0; j < message.deprecatedApiNames.length; ++j) - object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; - } - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - object.customDefinition = message.customDefinition; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.sections && message.sections.length) { - object.sections = []; - for (var j = 0; j < message.sections.length; ++j) - object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; - } - return object; - }; - - /** - * Converts this DimensionMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @instance - * @returns {Object.} JSON object - */ - DimensionMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionMetadata"; - }; - - return DimensionMetadata; - })(); - - v1alpha.MetricMetadata = (function() { - - /** - * Properties of a MetricMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IMetricMetadata - * @property {string|null} [apiName] MetricMetadata apiName - * @property {string|null} [uiName] MetricMetadata uiName - * @property {string|null} [description] MetricMetadata description - * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames - * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricMetadata type - * @property {string|null} [expression] MetricMetadata expression - * @property {boolean|null} [customDefinition] MetricMetadata customDefinition - * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons - * @property {string|null} [category] MetricMetadata category - * @property {Array.|null} [sections] MetricMetadata sections - */ - - /** - * Constructs a new MetricMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a MetricMetadata. - * @implements IMetricMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set - */ - function MetricMetadata(properties) { - this.deprecatedApiNames = []; - this.blockedReasons = []; - this.sections = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.apiName = ""; - - /** - * MetricMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.uiName = ""; - - /** - * MetricMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.description = ""; - - /** - * MetricMetadata deprecatedApiNames. - * @member {Array.} deprecatedApiNames - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; - - /** - * MetricMetadata type. - * @member {google.analytics.data.v1alpha.MetricType} type - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.type = 0; - - /** - * MetricMetadata expression. - * @member {string} expression - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.expression = ""; - - /** - * MetricMetadata customDefinition. - * @member {boolean} customDefinition - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.customDefinition = false; - - /** - * MetricMetadata blockedReasons. - * @member {Array.} blockedReasons - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.blockedReasons = $util.emptyArray; - - /** - * MetricMetadata category. - * @member {string} category - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.category = ""; - - /** - * MetricMetadata sections. - * @member {Array.} sections - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - */ - MetricMetadata.prototype.sections = $util.emptyArray; - - /** - * Creates a new MetricMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata instance - */ - MetricMetadata.create = function create(properties) { - return new MetricMetadata(properties); - }; - - /** - * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); - if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); - if (message.blockedReasons != null && message.blockedReasons.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.blockedReasons.length; ++i) - writer.int32(message.blockedReasons[i]); - writer.ldelim(); - } - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.category); - if (message.sections != null && message.sections.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.sections.length; ++i) - writer.int32(message.sections[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) - message.deprecatedApiNames = []; - message.deprecatedApiNames.push(reader.string()); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.expression = reader.string(); - break; - } - case 7: { - message.customDefinition = reader.bool(); - break; - } - case 8: { - if (!(message.blockedReasons && message.blockedReasons.length)) - message.blockedReasons = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.blockedReasons.push(reader.int32()); - } else - message.blockedReasons.push(reader.int32()); - break; - } - case 9: { - message.category = reader.string(); - break; - } - case 10: { - if (!(message.sections && message.sections.length)) - message.sections = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sections.push(reader.int32()); - } else - message.sections.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { - if (!Array.isArray(message.deprecatedApiNames)) - return "deprecatedApiNames: array expected"; - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - if (!$util.isString(message.deprecatedApiNames[i])) - return "deprecatedApiNames: string[] expected"; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - if (typeof message.customDefinition !== "boolean") - return "customDefinition: boolean expected"; - if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { - if (!Array.isArray(message.blockedReasons)) - return "blockedReasons: array expected"; - for (var i = 0; i < message.blockedReasons.length; ++i) - switch (message.blockedReasons[i]) { - default: - return "blockedReasons: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.sections != null && message.hasOwnProperty("sections")) { - if (!Array.isArray(message.sections)) - return "sections: array expected"; - for (var i = 0; i < message.sections.length; ++i) - switch (message.sections[i]) { - default: - return "sections: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata - */ - MetricMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.MetricMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.MetricMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - if (object.deprecatedApiNames) { - if (!Array.isArray(object.deprecatedApiNames)) - throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.deprecatedApiNames: array expected"); - message.deprecatedApiNames = []; - for (var i = 0; i < object.deprecatedApiNames.length; ++i) - message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_INTEGER": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_SECONDS": - case 4: - message.type = 4; - break; - case "TYPE_MILLISECONDS": - case 5: - message.type = 5; - break; - case "TYPE_MINUTES": - case 6: - message.type = 6; - break; - case "TYPE_HOURS": - case 7: - message.type = 7; - break; - case "TYPE_STANDARD": - case 8: - message.type = 8; - break; - case "TYPE_CURRENCY": - case 9: - message.type = 9; - break; - case "TYPE_FEET": - case 10: - message.type = 10; - break; - case "TYPE_MILES": - case 11: - message.type = 11; - break; - case "TYPE_METERS": - case 12: - message.type = 12; - break; - case "TYPE_KILOMETERS": - case 13: - message.type = 13; - break; - } - if (object.expression != null) - message.expression = String(object.expression); - if (object.customDefinition != null) - message.customDefinition = Boolean(object.customDefinition); - if (object.blockedReasons) { - if (!Array.isArray(object.blockedReasons)) - throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.blockedReasons: array expected"); - message.blockedReasons = []; - for (var i = 0; i < object.blockedReasons.length; ++i) - switch (object.blockedReasons[i]) { - default: - if (typeof object.blockedReasons[i] === "number") { - message.blockedReasons[i] = object.blockedReasons[i]; - break; - } - case "BLOCKED_REASON_UNSPECIFIED": - case 0: - message.blockedReasons[i] = 0; - break; - case "NO_REVENUE_METRICS": - case 1: - message.blockedReasons[i] = 1; - break; - case "NO_COST_METRICS": - case 2: - message.blockedReasons[i] = 2; - break; - } - } - if (object.category != null) - message.category = String(object.category); - if (object.sections) { - if (!Array.isArray(object.sections)) - throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.sections: array expected"); - message.sections = []; - for (var i = 0; i < object.sections.length; ++i) - switch (object.sections[i]) { - default: - if (typeof object.sections[i] === "number") { - message.sections[i] = object.sections[i]; - break; - } - case "SECTION_UNSPECIFIED": - case 0: - message.sections[i] = 0; - break; - case "SECTION_REPORT": - case 1: - message.sections[i] = 1; - break; - case "SECTION_ADVERTISING": - case 2: - message.sections[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {google.analytics.data.v1alpha.MetricMetadata} message MetricMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.deprecatedApiNames = []; - object.blockedReasons = []; - object.sections = []; - } - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; - object.expression = ""; - object.customDefinition = false; - object.category = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecatedApiNames && message.deprecatedApiNames.length) { - object.deprecatedApiNames = []; - for (var j = 0; j < message.deprecatedApiNames.length; ++j) - object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - object.customDefinition = message.customDefinition; - if (message.blockedReasons && message.blockedReasons.length) { - object.blockedReasons = []; - for (var j = 0; j < message.blockedReasons.length; ++j) - object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.sections && message.sections.length) { - object.sections = []; - for (var j = 0; j < message.sections.length; ++j) - object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; - } - return object; - }; - - /** - * Converts this MetricMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.MetricMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricMetadata"; - }; - - /** - * BlockedReason enum. - * @name google.analytics.data.v1alpha.MetricMetadata.BlockedReason - * @enum {number} - * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value - * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value - * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value - */ - MetricMetadata.BlockedReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; - values[valuesById[2] = "NO_COST_METRICS"] = 2; - return values; - })(); - - return MetricMetadata; - })(); - - v1alpha.ComparisonMetadata = (function() { - - /** - * Properties of a ComparisonMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IComparisonMetadata - * @property {string|null} [apiName] ComparisonMetadata apiName - * @property {string|null} [uiName] ComparisonMetadata uiName - * @property {string|null} [description] ComparisonMetadata description - */ - - /** - * Constructs a new ComparisonMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ComparisonMetadata. - * @implements IComparisonMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set - */ - function ComparisonMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComparisonMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.apiName = ""; - - /** - * ComparisonMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.uiName = ""; - - /** - * ComparisonMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.description = ""; - - /** - * Creates a new ComparisonMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata instance - */ - ComparisonMetadata.create = function create(properties) { - return new ComparisonMetadata(properties); - }; - - /** - * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComparisonMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; - - /** - * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComparisonMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComparisonMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComparisonMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata - */ - ComparisonMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ComparisonMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {google.analytics.data.v1alpha.ComparisonMetadata} message ComparisonMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComparisonMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this ComparisonMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @instance - * @returns {Object.} JSON object - */ - ComparisonMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComparisonMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ComparisonMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ComparisonMetadata"; - }; - - return ComparisonMetadata; - })(); - - v1alpha.ConversionMetadata = (function() { - - /** - * Properties of a ConversionMetadata. - * @memberof google.analytics.data.v1alpha - * @interface IConversionMetadata - * @property {string|null} [conversionAction] ConversionMetadata conversionAction - * @property {string|null} [displayName] ConversionMetadata displayName - */ - - /** - * Constructs a new ConversionMetadata. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ConversionMetadata. - * @implements IConversionMetadata - * @constructor - * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set - */ - function ConversionMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConversionMetadata conversionAction. - * @member {string} conversionAction - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @instance - */ - ConversionMetadata.prototype.conversionAction = ""; - - /** - * ConversionMetadata displayName. - * @member {string} displayName - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @instance - */ - ConversionMetadata.prototype.displayName = ""; - - /** - * Creates a new ConversionMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata instance - */ - ConversionMetadata.create = function create(properties) { - return new ConversionMetadata(properties); - }; - - /** - * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversionMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversionAction != null && Object.hasOwnProperty.call(message, "conversionAction")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionAction); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConversionMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversionMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.conversionAction = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversionMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConversionMetadata message. - * @function verify - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversionMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) - if (!$util.isString(message.conversionAction)) - return "conversionAction: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata - */ - ConversionMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ConversionMetadata) - return object; - var message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); - if (object.conversionAction != null) - message.conversionAction = String(object.conversionAction); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {google.analytics.data.v1alpha.ConversionMetadata} message ConversionMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversionMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conversionAction = ""; - object.displayName = ""; - } - if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) - object.conversionAction = message.conversionAction; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this ConversionMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @instance - * @returns {Object.} JSON object - */ - ConversionMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConversionMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ConversionMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionMetadata"; - }; - - return ConversionMetadata; - })(); - - return v1alpha; - })(); - - data.v1beta = (function() { - - /** - * Namespace v1beta. - * @memberof google.analytics.data - * @namespace - */ - var v1beta = {}; - - v1beta.BetaAnalyticsData = (function() { - - /** - * Constructs a new BetaAnalyticsData service. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a BetaAnalyticsData - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function BetaAnalyticsData(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (BetaAnalyticsData.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BetaAnalyticsData; - - /** - * Creates new BetaAnalyticsData service using the specified rpc implementation. - * @function create - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {BetaAnalyticsData} RPC service. Useful where requests and/or responses are streamed. - */ - BetaAnalyticsData.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runReport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef RunReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.RunReportResponse} [response] RunReportResponse - */ - - /** - * Calls RunReport. - * @function runReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.runReport = function runReport(request, callback) { - return this.rpcCall(runReport, $root.google.analytics.data.v1beta.RunReportRequest, $root.google.analytics.data.v1beta.RunReportResponse, request, callback); - }, "name", { value: "RunReport" }); - - /** - * Calls RunReport. - * @function runReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunReportRequest} request RunReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runPivotReport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef RunPivotReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.RunPivotReportResponse} [response] RunPivotReportResponse - */ - - /** - * Calls RunPivotReport. - * @function runPivotReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReportCallback} callback Node-style callback called with the error, if any, and RunPivotReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.runPivotReport = function runPivotReport(request, callback) { - return this.rpcCall(runPivotReport, $root.google.analytics.data.v1beta.RunPivotReportRequest, $root.google.analytics.data.v1beta.RunPivotReportResponse, request, callback); - }, "name", { value: "RunPivotReport" }); - - /** - * Calls RunPivotReport. - * @function runPivotReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunPivotReportRequest} request RunPivotReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunReports}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef BatchRunReportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.BatchRunReportsResponse} [response] BatchRunReportsResponse - */ - - /** - * Calls BatchRunReports. - * @function batchRunReports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReportsCallback} callback Node-style callback called with the error, if any, and BatchRunReportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.batchRunReports = function batchRunReports(request, callback) { - return this.rpcCall(batchRunReports, $root.google.analytics.data.v1beta.BatchRunReportsRequest, $root.google.analytics.data.v1beta.BatchRunReportsResponse, request, callback); - }, "name", { value: "BatchRunReports" }); - - /** - * Calls BatchRunReports. - * @function batchRunReports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} request BatchRunReportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|batchRunPivotReports}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef BatchRunPivotReportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} [response] BatchRunPivotReportsResponse - */ - - /** - * Calls BatchRunPivotReports. - * @function batchRunPivotReports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReportsCallback} callback Node-style callback called with the error, if any, and BatchRunPivotReportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.batchRunPivotReports = function batchRunPivotReports(request, callback) { - return this.rpcCall(batchRunPivotReports, $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest, $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse, request, callback); - }, "name", { value: "BatchRunPivotReports" }); - - /** - * Calls BatchRunPivotReports. - * @function batchRunPivotReports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} request BatchRunPivotReportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getMetadata}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef GetMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.Metadata} [response] Metadata - */ - - /** - * Calls GetMetadata. - * @function getMetadata - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { - return this.rpcCall(getMetadata, $root.google.analytics.data.v1beta.GetMetadataRequest, $root.google.analytics.data.v1beta.Metadata, request, callback); - }, "name", { value: "GetMetadata" }); - - /** - * Calls GetMetadata. - * @function getMetadata - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IGetMetadataRequest} request GetMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|runRealtimeReport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef RunRealtimeReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} [response] RunRealtimeReportResponse - */ - - /** - * Calls RunRealtimeReport. - * @function runRealtimeReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReportCallback} callback Node-style callback called with the error, if any, and RunRealtimeReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.runRealtimeReport = function runRealtimeReport(request, callback) { - return this.rpcCall(runRealtimeReport, $root.google.analytics.data.v1beta.RunRealtimeReportRequest, $root.google.analytics.data.v1beta.RunRealtimeReportResponse, request, callback); - }, "name", { value: "RunRealtimeReport" }); - - /** - * Calls RunRealtimeReport. - * @function runRealtimeReport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} request RunRealtimeReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|checkCompatibility}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef CheckCompatibilityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} [response] CheckCompatibilityResponse - */ - - /** - * Calls CheckCompatibility. - * @function checkCompatibility - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckCompatibilityResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.checkCompatibility = function checkCompatibility(request, callback) { - return this.rpcCall(checkCompatibility, $root.google.analytics.data.v1beta.CheckCompatibilityRequest, $root.google.analytics.data.v1beta.CheckCompatibilityResponse, request, callback); - }, "name", { value: "CheckCompatibility" }); - - /** - * Calls CheckCompatibility. - * @function checkCompatibility - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|createAudienceExport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef CreateAudienceExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateAudienceExport. - * @function createAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExportCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.createAudienceExport = function createAudienceExport(request, callback) { - return this.rpcCall(createAudienceExport, $root.google.analytics.data.v1beta.CreateAudienceExportRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAudienceExport" }); - - /** - * Calls CreateAudienceExport. - * @function createAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} request CreateAudienceExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|queryAudienceExport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef QueryAudienceExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} [response] QueryAudienceExportResponse - */ - - /** - * Calls QueryAudienceExport. - * @function queryAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExportCallback} callback Node-style callback called with the error, if any, and QueryAudienceExportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.queryAudienceExport = function queryAudienceExport(request, callback) { - return this.rpcCall(queryAudienceExport, $root.google.analytics.data.v1beta.QueryAudienceExportRequest, $root.google.analytics.data.v1beta.QueryAudienceExportResponse, request, callback); - }, "name", { value: "QueryAudienceExport" }); - - /** - * Calls QueryAudienceExport. - * @function queryAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} request QueryAudienceExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|getAudienceExport}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef GetAudienceExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.AudienceExport} [response] AudienceExport - */ - - /** - * Calls GetAudienceExport. - * @function getAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExportCallback} callback Node-style callback called with the error, if any, and AudienceExport - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.getAudienceExport = function getAudienceExport(request, callback) { - return this.rpcCall(getAudienceExport, $root.google.analytics.data.v1beta.GetAudienceExportRequest, $root.google.analytics.data.v1beta.AudienceExport, request, callback); - }, "name", { value: "GetAudienceExport" }); - - /** - * Calls GetAudienceExport. - * @function getAudienceExport - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} request GetAudienceExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.data.v1beta.BetaAnalyticsData|listAudienceExports}. - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @typedef ListAudienceExportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} [response] ListAudienceExportsResponse - */ - - /** - * Calls ListAudienceExports. - * @function listAudienceExports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object - * @param {google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExportsCallback} callback Node-style callback called with the error, if any, and ListAudienceExportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BetaAnalyticsData.prototype.listAudienceExports = function listAudienceExports(request, callback) { - return this.rpcCall(listAudienceExports, $root.google.analytics.data.v1beta.ListAudienceExportsRequest, $root.google.analytics.data.v1beta.ListAudienceExportsResponse, request, callback); - }, "name", { value: "ListAudienceExports" }); - - /** - * Calls ListAudienceExports. - * @function listAudienceExports - * @memberof google.analytics.data.v1beta.BetaAnalyticsData - * @instance - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} request ListAudienceExportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return BetaAnalyticsData; - })(); - - v1beta.CheckCompatibilityRequest = (function() { - - /** - * Properties of a CheckCompatibilityRequest. - * @memberof google.analytics.data.v1beta - * @interface ICheckCompatibilityRequest - * @property {string|null} [property] CheckCompatibilityRequest property - * @property {Array.|null} [dimensions] CheckCompatibilityRequest dimensions - * @property {Array.|null} [metrics] CheckCompatibilityRequest metrics - * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] CheckCompatibilityRequest dimensionFilter - * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] CheckCompatibilityRequest metricFilter - * @property {google.analytics.data.v1beta.Compatibility|null} [compatibilityFilter] CheckCompatibilityRequest compatibilityFilter - */ - - /** - * Constructs a new CheckCompatibilityRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CheckCompatibilityRequest. - * @implements ICheckCompatibilityRequest - * @constructor - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set - */ - function CheckCompatibilityRequest(properties) { - this.dimensions = []; - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckCompatibilityRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.property = ""; - - /** - * CheckCompatibilityRequest dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.dimensions = $util.emptyArray; - - /** - * CheckCompatibilityRequest metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.metrics = $util.emptyArray; - - /** - * CheckCompatibilityRequest dimensionFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.dimensionFilter = null; - - /** - * CheckCompatibilityRequest metricFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.metricFilter = null; - - /** - * CheckCompatibilityRequest compatibilityFilter. - * @member {google.analytics.data.v1beta.Compatibility} compatibilityFilter - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - */ - CheckCompatibilityRequest.prototype.compatibilityFilter = 0; - - /** - * Creates a new CheckCompatibilityRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest instance - */ - CheckCompatibilityRequest.create = function create(properties) { - return new CheckCompatibilityRequest(properties); - }; - - /** - * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckCompatibilityRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.compatibilityFilter != null && Object.hasOwnProperty.call(message, "compatibilityFilter")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.compatibilityFilter); - return writer; - }; - - /** - * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckCompatibilityRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 5: { - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.compatibilityFilter = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckCompatibilityRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckCompatibilityRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) - switch (message.compatibilityFilter) { - default: - return "compatibilityFilter: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CheckCompatibilityRequest} CheckCompatibilityRequest - */ - CheckCompatibilityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityRequest) - return object; - var message = new $root.google.analytics.data.v1beta.CheckCompatibilityRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityRequest.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); - } - switch (object.compatibilityFilter) { - default: - if (typeof object.compatibilityFilter === "number") { - message.compatibilityFilter = object.compatibilityFilter; - break; - } - break; - case "COMPATIBILITY_UNSPECIFIED": - case 0: - message.compatibilityFilter = 0; - break; - case "COMPATIBLE": - case 1: - message.compatibilityFilter = 1; - break; - case "INCOMPATIBLE": - case 2: - message.compatibilityFilter = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {google.analytics.data.v1beta.CheckCompatibilityRequest} message CheckCompatibilityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckCompatibilityRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - } - if (options.defaults) { - object.property = ""; - object.dimensionFilter = null; - object.metricFilter = null; - object.compatibilityFilter = options.enums === String ? "COMPATIBILITY_UNSPECIFIED" : 0; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); - if (message.compatibilityFilter != null && message.hasOwnProperty("compatibilityFilter")) - object.compatibilityFilter = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] === undefined ? message.compatibilityFilter : $root.google.analytics.data.v1beta.Compatibility[message.compatibilityFilter] : message.compatibilityFilter; - return object; - }; - - /** - * Converts this CheckCompatibilityRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @instance - * @returns {Object.} JSON object - */ - CheckCompatibilityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckCompatibilityRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CheckCompatibilityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityRequest"; - }; - - return CheckCompatibilityRequest; - })(); - - v1beta.CheckCompatibilityResponse = (function() { - - /** - * Properties of a CheckCompatibilityResponse. - * @memberof google.analytics.data.v1beta - * @interface ICheckCompatibilityResponse - * @property {Array.|null} [dimensionCompatibilities] CheckCompatibilityResponse dimensionCompatibilities - * @property {Array.|null} [metricCompatibilities] CheckCompatibilityResponse metricCompatibilities - */ - - /** - * Constructs a new CheckCompatibilityResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CheckCompatibilityResponse. - * @implements ICheckCompatibilityResponse - * @constructor - * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set - */ - function CheckCompatibilityResponse(properties) { - this.dimensionCompatibilities = []; - this.metricCompatibilities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckCompatibilityResponse dimensionCompatibilities. - * @member {Array.} dimensionCompatibilities - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @instance - */ - CheckCompatibilityResponse.prototype.dimensionCompatibilities = $util.emptyArray; - - /** - * CheckCompatibilityResponse metricCompatibilities. - * @member {Array.} metricCompatibilities - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @instance - */ - CheckCompatibilityResponse.prototype.metricCompatibilities = $util.emptyArray; - - /** - * Creates a new CheckCompatibilityResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse instance - */ - CheckCompatibilityResponse.create = function create(properties) { - return new CheckCompatibilityResponse(properties); - }; - - /** - * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckCompatibilityResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionCompatibilities != null && message.dimensionCompatibilities.length) - for (var i = 0; i < message.dimensionCompatibilities.length; ++i) - $root.google.analytics.data.v1beta.DimensionCompatibility.encode(message.dimensionCompatibilities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricCompatibilities != null && message.metricCompatibilities.length) - for (var i = 0; i < message.metricCompatibilities.length; ++i) - $root.google.analytics.data.v1beta.MetricCompatibility.encode(message.metricCompatibilities[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CheckCompatibilityResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {google.analytics.data.v1beta.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckCompatibilityResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionCompatibilities && message.dimensionCompatibilities.length)) - message.dimensionCompatibilities = []; - message.dimensionCompatibilities.push($root.google.analytics.data.v1beta.DimensionCompatibility.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricCompatibilities && message.metricCompatibilities.length)) - message.metricCompatibilities = []; - message.metricCompatibilities.push($root.google.analytics.data.v1beta.MetricCompatibility.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckCompatibilityResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckCompatibilityResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionCompatibilities != null && message.hasOwnProperty("dimensionCompatibilities")) { - if (!Array.isArray(message.dimensionCompatibilities)) - return "dimensionCompatibilities: array expected"; - for (var i = 0; i < message.dimensionCompatibilities.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionCompatibility.verify(message.dimensionCompatibilities[i]); - if (error) - return "dimensionCompatibilities." + error; - } - } - if (message.metricCompatibilities != null && message.hasOwnProperty("metricCompatibilities")) { - if (!Array.isArray(message.metricCompatibilities)) - return "metricCompatibilities: array expected"; - for (var i = 0; i < message.metricCompatibilities.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricCompatibility.verify(message.metricCompatibilities[i]); - if (error) - return "metricCompatibilities." + error; - } - } - return null; - }; - - /** - * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CheckCompatibilityResponse} CheckCompatibilityResponse - */ - CheckCompatibilityResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CheckCompatibilityResponse) - return object; - var message = new $root.google.analytics.data.v1beta.CheckCompatibilityResponse(); - if (object.dimensionCompatibilities) { - if (!Array.isArray(object.dimensionCompatibilities)) - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: array expected"); - message.dimensionCompatibilities = []; - for (var i = 0; i < object.dimensionCompatibilities.length; ++i) { - if (typeof object.dimensionCompatibilities[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.dimensionCompatibilities: object expected"); - message.dimensionCompatibilities[i] = $root.google.analytics.data.v1beta.DimensionCompatibility.fromObject(object.dimensionCompatibilities[i]); - } - } - if (object.metricCompatibilities) { - if (!Array.isArray(object.metricCompatibilities)) - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: array expected"); - message.metricCompatibilities = []; - for (var i = 0; i < object.metricCompatibilities.length; ++i) { - if (typeof object.metricCompatibilities[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.CheckCompatibilityResponse.metricCompatibilities: object expected"); - message.metricCompatibilities[i] = $root.google.analytics.data.v1beta.MetricCompatibility.fromObject(object.metricCompatibilities[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {google.analytics.data.v1beta.CheckCompatibilityResponse} message CheckCompatibilityResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckCompatibilityResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionCompatibilities = []; - object.metricCompatibilities = []; - } - if (message.dimensionCompatibilities && message.dimensionCompatibilities.length) { - object.dimensionCompatibilities = []; - for (var j = 0; j < message.dimensionCompatibilities.length; ++j) - object.dimensionCompatibilities[j] = $root.google.analytics.data.v1beta.DimensionCompatibility.toObject(message.dimensionCompatibilities[j], options); - } - if (message.metricCompatibilities && message.metricCompatibilities.length) { - object.metricCompatibilities = []; - for (var j = 0; j < message.metricCompatibilities.length; ++j) - object.metricCompatibilities[j] = $root.google.analytics.data.v1beta.MetricCompatibility.toObject(message.metricCompatibilities[j], options); - } - return object; - }; - - /** - * Converts this CheckCompatibilityResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @instance - * @returns {Object.} JSON object - */ - CheckCompatibilityResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckCompatibilityResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CheckCompatibilityResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CheckCompatibilityResponse"; - }; - - return CheckCompatibilityResponse; - })(); - - v1beta.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.analytics.data.v1beta - * @interface IMetadata - * @property {string|null} [name] Metadata name - * @property {Array.|null} [dimensions] Metadata dimensions - * @property {Array.|null} [metrics] Metadata metrics - * @property {Array.|null} [comparisons] Metadata comparisons - */ - - /** - * Constructs a new Metadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.dimensions = []; - this.metrics = []; - this.comparisons = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata name. - * @member {string} name - * @memberof google.analytics.data.v1beta.Metadata - * @instance - */ - Metadata.prototype.name = ""; - - /** - * Metadata dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.Metadata - * @instance - */ - Metadata.prototype.dimensions = $util.emptyArray; - - /** - * Metadata metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1beta.Metadata - * @instance - */ - Metadata.prototype.metrics = $util.emptyArray; - - /** - * Metadata comparisons. - * @member {Array.} comparisons - * @memberof google.analytics.data.v1beta.Metadata - * @instance - */ - Metadata.prototype.comparisons = $util.emptyArray; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {google.analytics.data.v1beta.IMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.comparisons != null && message.comparisons.length) - for (var i = 0; i < message.comparisons.length; ++i) - $root.google.analytics.data.v1beta.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {google.analytics.data.v1beta.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.name = reader.string(); - break; - } - case 1: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.comparisons && message.comparisons.length)) - message.comparisons = []; - message.comparisons.push($root.google.analytics.data.v1beta.ComparisonMetadata.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.comparisons != null && message.hasOwnProperty("comparisons")) { - if (!Array.isArray(message.comparisons)) - return "comparisons: array expected"; - for (var i = 0; i < message.comparisons.length; ++i) { - var error = $root.google.analytics.data.v1beta.ComparisonMetadata.verify(message.comparisons[i]); - if (error) - return "comparisons." + error; - } - } - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Metadata) - return object; - var message = new $root.google.analytics.data.v1beta.Metadata(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Metadata.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Metadata.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metrics[i]); - } - } - if (object.comparisons) { - if (!Array.isArray(object.comparisons)) - throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: array expected"); - message.comparisons = []; - for (var i = 0; i < object.comparisons.length; ++i) { - if (typeof object.comparisons[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: object expected"); - message.comparisons[i] = $root.google.analytics.data.v1beta.ComparisonMetadata.fromObject(object.comparisons[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {google.analytics.data.v1beta.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.comparisons = []; - } - if (options.defaults) - object.name = ""; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metrics[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.comparisons && message.comparisons.length) { - object.comparisons = []; - for (var j = 0; j < message.comparisons.length; ++j) - object.comparisons[j] = $root.google.analytics.data.v1beta.ComparisonMetadata.toObject(message.comparisons[j], options); - } - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Metadata"; - }; - - return Metadata; - })(); - - v1beta.RunReportRequest = (function() { - - /** - * Properties of a RunReportRequest. - * @memberof google.analytics.data.v1beta - * @interface IRunReportRequest - * @property {string|null} [property] RunReportRequest property - * @property {Array.|null} [dimensions] RunReportRequest dimensions - * @property {Array.|null} [metrics] RunReportRequest metrics - * @property {Array.|null} [dateRanges] RunReportRequest dateRanges - * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter - * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter - * @property {number|Long|null} [offset] RunReportRequest offset - * @property {number|Long|null} [limit] RunReportRequest limit - * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations - * @property {Array.|null} [orderBys] RunReportRequest orderBys - * @property {string|null} [currencyCode] RunReportRequest currencyCode - * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec - * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows - * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota - * @property {Array.|null} [comparisons] RunReportRequest comparisons - */ - - /** - * Constructs a new RunReportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunReportRequest. - * @implements IRunReportRequest - * @constructor - * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set - */ - function RunReportRequest(properties) { - this.dimensions = []; - this.metrics = []; - this.dateRanges = []; - this.metricAggregations = []; - this.orderBys = []; - this.comparisons = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.property = ""; - - /** - * RunReportRequest dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dimensions = $util.emptyArray; - - /** - * RunReportRequest metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metrics = $util.emptyArray; - - /** - * RunReportRequest dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dateRanges = $util.emptyArray; - - /** - * RunReportRequest dimensionFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.dimensionFilter = null; - - /** - * RunReportRequest metricFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metricFilter = null; - - /** - * RunReportRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunReportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunReportRequest metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.metricAggregations = $util.emptyArray; - - /** - * RunReportRequest orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.orderBys = $util.emptyArray; - - /** - * RunReportRequest currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.currencyCode = ""; - - /** - * RunReportRequest cohortSpec. - * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.cohortSpec = null; - - /** - * RunReportRequest keepEmptyRows. - * @member {boolean} keepEmptyRows - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.keepEmptyRows = false; - - /** - * RunReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.returnPropertyQuota = false; - - /** - * RunReportRequest comparisons. - * @member {Array.} comparisons - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - */ - RunReportRequest.prototype.comparisons = $util.emptyArray; - - /** - * Creates a new RunReportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest instance - */ - RunReportRequest.create = function create(properties) { - return new RunReportRequest(properties); - }; - - /** - * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); - if (message.metricAggregations != null && message.metricAggregations.length) { - writer.uint32(/* id 9, wireType 2 =*/74).fork(); - for (var i = 0; i < message.metricAggregations.length; ++i) - writer.int32(message.metricAggregations[i]); - writer.ldelim(); - } - if (message.orderBys != null && message.orderBys.length) - for (var i = 0; i < message.orderBys.length; ++i) - $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); - if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) - $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); - if (message.comparisons != null && message.comparisons.length) - for (var i = 0; i < message.comparisons.length; ++i) - $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunReportRequest} message RunReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); - break; - } - case 5: { - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 7: { - message.offset = reader.int64(); - break; - } - case 8: { - message.limit = reader.int64(); - break; - } - case 9: { - if (!(message.metricAggregations && message.metricAggregations.length)) - message.metricAggregations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metricAggregations.push(reader.int32()); - } else - message.metricAggregations.push(reader.int32()); - break; - } - case 10: { - if (!(message.orderBys && message.orderBys.length)) - message.orderBys = []; - message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); - break; - } - case 11: { - message.currencyCode = reader.string(); - break; - } - case 12: { - message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); - break; - } - case 13: { - message.keepEmptyRows = reader.bool(); - break; - } - case 14: { - message.returnPropertyQuota = reader.bool(); - break; - } - case 15: { - if (!(message.comparisons && message.comparisons.length)) - message.comparisons = []; - message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunReportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { - if (!Array.isArray(message.metricAggregations)) - return "metricAggregations: array expected"; - for (var i = 0; i < message.metricAggregations.length; ++i) - switch (message.metricAggregations[i]) { - default: - return "metricAggregations: enum value[] expected"; - case 0: - case 1: - case 5: - case 6: - case 4: - break; - } - } - if (message.orderBys != null && message.hasOwnProperty("orderBys")) { - if (!Array.isArray(message.orderBys)) - return "orderBys: array expected"; - for (var i = 0; i < message.orderBys.length; ++i) { - var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); - if (error) - return "orderBys." + error; - } - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { - var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); - if (error) - return "cohortSpec." + error; - } - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - if (typeof message.keepEmptyRows !== "boolean") - return "keepEmptyRows: boolean expected"; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; - if (message.comparisons != null && message.hasOwnProperty("comparisons")) { - if (!Array.isArray(message.comparisons)) - return "comparisons: array expected"; - for (var i = 0; i < message.comparisons.length; ++i) { - var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); - if (error) - return "comparisons." + error; - } - } - return null; - }; - - /** - * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunReportRequest} RunReportRequest - */ - RunReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunReportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.RunReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); - } - } - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); - } - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.metricAggregations) { - if (!Array.isArray(object.metricAggregations)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.metricAggregations: array expected"); - message.metricAggregations = []; - for (var i = 0; i < object.metricAggregations.length; ++i) - switch (object.metricAggregations[i]) { - default: - if (typeof object.metricAggregations[i] === "number") { - message.metricAggregations[i] = object.metricAggregations[i]; - break; - } - case "METRIC_AGGREGATION_UNSPECIFIED": - case 0: - message.metricAggregations[i] = 0; - break; - case "TOTAL": - case 1: - message.metricAggregations[i] = 1; - break; - case "MINIMUM": - case 5: - message.metricAggregations[i] = 5; - break; - case "MAXIMUM": - case 6: - message.metricAggregations[i] = 6; - break; - case "COUNT": - case 4: - message.metricAggregations[i] = 4; - break; - } - } - if (object.orderBys) { - if (!Array.isArray(object.orderBys)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: array expected"); - message.orderBys = []; - for (var i = 0; i < object.orderBys.length; ++i) { - if (typeof object.orderBys[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.orderBys: object expected"); - message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); - } - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.cohortSpec != null) { - if (typeof object.cohortSpec !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.cohortSpec: object expected"); - message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); - } - if (object.keepEmptyRows != null) - message.keepEmptyRows = Boolean(object.keepEmptyRows); - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); - if (object.comparisons) { - if (!Array.isArray(object.comparisons)) - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: array expected"); - message.comparisons = []; - for (var i = 0; i < object.comparisons.length; ++i) { - if (typeof object.comparisons[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: object expected"); - message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {google.analytics.data.v1beta.RunReportRequest} message RunReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.dateRanges = []; - object.metricAggregations = []; - object.orderBys = []; - object.comparisons = []; - } - if (options.defaults) { - object.property = ""; - object.dimensionFilter = null; - object.metricFilter = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.currencyCode = ""; - object.cohortSpec = null; - object.keepEmptyRows = false; - object.returnPropertyQuota = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); - } - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.metricAggregations && message.metricAggregations.length) { - object.metricAggregations = []; - for (var j = 0; j < message.metricAggregations.length; ++j) - object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; - } - if (message.orderBys && message.orderBys.length) { - object.orderBys = []; - for (var j = 0; j < message.orderBys.length; ++j) - object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) - object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - object.keepEmptyRows = message.keepEmptyRows; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; - if (message.comparisons && message.comparisons.length) { - object.comparisons = []; - for (var j = 0; j < message.comparisons.length; ++j) - object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); - } - return object; - }; - - /** - * Converts this RunReportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunReportRequest - * @instance - * @returns {Object.} JSON object - */ - RunReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunReportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportRequest"; - }; - - return RunReportRequest; - })(); - - v1beta.RunReportResponse = (function() { - - /** - * Properties of a RunReportResponse. - * @memberof google.analytics.data.v1beta - * @interface IRunReportResponse - * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders - * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders - * @property {Array.|null} [rows] RunReportResponse rows - * @property {Array.|null} [totals] RunReportResponse totals - * @property {Array.|null} [maximums] RunReportResponse maximums - * @property {Array.|null} [minimums] RunReportResponse minimums - * @property {number|null} [rowCount] RunReportResponse rowCount - * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunReportResponse metadata - * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota - * @property {string|null} [kind] RunReportResponse kind - */ - - /** - * Constructs a new RunReportResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunReportResponse. - * @implements IRunReportResponse - * @constructor - * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set - */ - function RunReportResponse(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - this.totals = []; - this.maximums = []; - this.minimums = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunReportResponse dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; - - /** - * RunReportResponse metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.metricHeaders = $util.emptyArray; - - /** - * RunReportResponse rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.rows = $util.emptyArray; - - /** - * RunReportResponse totals. - * @member {Array.} totals - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.totals = $util.emptyArray; - - /** - * RunReportResponse maximums. - * @member {Array.} maximums - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.maximums = $util.emptyArray; - - /** - * RunReportResponse minimums. - * @member {Array.} minimums - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.minimums = $util.emptyArray; - - /** - * RunReportResponse rowCount. - * @member {number} rowCount - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.rowCount = 0; - - /** - * RunReportResponse metadata. - * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.metadata = null; - - /** - * RunReportResponse propertyQuota. - * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.propertyQuota = null; - - /** - * RunReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - */ - RunReportResponse.prototype.kind = ""; - - /** - * Creates a new RunReportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse instance - */ - RunReportResponse.create = function create(properties) { - return new RunReportResponse(properties); - }; - - /** - * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totals != null && message.totals.length) - for (var i = 0; i < message.totals.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maximums != null && message.maximums.length) - for (var i = 0; i < message.maximums.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.minimums != null && message.minimums.length) - for (var i = 0; i < message.minimums.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); - return writer; - }; - - /** - * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunReportResponse} message RunReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.totals && message.totals.length)) - message.totals = []; - message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.maximums && message.maximums.length)) - message.maximums = []; - message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.minimums && message.minimums.length)) - message.minimums = []; - message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 7: { - message.rowCount = reader.int32(); - break; - } - case 8: { - message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); - break; - } - case 9: { - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 10: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunReportResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.totals != null && message.hasOwnProperty("totals")) { - if (!Array.isArray(message.totals)) - return "totals: array expected"; - for (var i = 0; i < message.totals.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); - if (error) - return "totals." + error; - } - } - if (message.maximums != null && message.hasOwnProperty("maximums")) { - if (!Array.isArray(message.maximums)) - return "maximums: array expected"; - for (var i = 0; i < message.maximums.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); - if (error) - return "maximums." + error; - } - } - if (message.minimums != null && message.hasOwnProperty("minimums")) { - if (!Array.isArray(message.minimums)) - return "minimums: array expected"; - for (var i = 0; i < message.minimums.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); - if (error) - return "minimums." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); - if (error) - return "propertyQuota." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunReportResponse} RunReportResponse - */ - RunReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunReportResponse) - return object; - var message = new $root.google.analytics.data.v1beta.RunReportResponse(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); - } - } - if (object.totals) { - if (!Array.isArray(object.totals)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: array expected"); - message.totals = []; - for (var i = 0; i < object.totals.length; ++i) { - if (typeof object.totals[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.totals: object expected"); - message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); - } - } - if (object.maximums) { - if (!Array.isArray(object.maximums)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: array expected"); - message.maximums = []; - for (var i = 0; i < object.maximums.length; ++i) { - if (typeof object.maximums[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.maximums: object expected"); - message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); - } - } - if (object.minimums) { - if (!Array.isArray(object.minimums)) - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: array expected"); - message.minimums = []; - for (var i = 0; i < object.minimums.length; ++i) { - if (typeof object.minimums[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.minimums: object expected"); - message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); - } - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1beta.RunReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {google.analytics.data.v1beta.RunReportResponse} message RunReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - object.totals = []; - object.maximums = []; - object.minimums = []; - } - if (options.defaults) { - object.rowCount = 0; - object.metadata = null; - object.propertyQuota = null; - object.kind = ""; - } - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); - } - if (message.totals && message.totals.length) { - object.totals = []; - for (var j = 0; j < message.totals.length; ++j) - object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); - } - if (message.maximums && message.maximums.length) { - object.maximums = []; - for (var j = 0; j < message.maximums.length; ++j) - object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); - } - if (message.minimums && message.minimums.length) { - object.minimums = []; - for (var j = 0; j < message.minimums.length; ++j) - object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this RunReportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunReportResponse - * @instance - * @returns {Object.} JSON object - */ - RunReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunReportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunReportResponse"; - }; - - return RunReportResponse; - })(); - - v1beta.RunPivotReportRequest = (function() { - - /** - * Properties of a RunPivotReportRequest. - * @memberof google.analytics.data.v1beta - * @interface IRunPivotReportRequest - * @property {string|null} [property] RunPivotReportRequest property - * @property {Array.|null} [dimensions] RunPivotReportRequest dimensions - * @property {Array.|null} [metrics] RunPivotReportRequest metrics - * @property {Array.|null} [dateRanges] RunPivotReportRequest dateRanges - * @property {Array.|null} [pivots] RunPivotReportRequest pivots - * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunPivotReportRequest dimensionFilter - * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunPivotReportRequest metricFilter - * @property {string|null} [currencyCode] RunPivotReportRequest currencyCode - * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunPivotReportRequest cohortSpec - * @property {boolean|null} [keepEmptyRows] RunPivotReportRequest keepEmptyRows - * @property {boolean|null} [returnPropertyQuota] RunPivotReportRequest returnPropertyQuota - * @property {Array.|null} [comparisons] RunPivotReportRequest comparisons - */ - - /** - * Constructs a new RunPivotReportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunPivotReportRequest. - * @implements IRunPivotReportRequest - * @constructor - * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set - */ - function RunPivotReportRequest(properties) { - this.dimensions = []; - this.metrics = []; - this.dateRanges = []; - this.pivots = []; - this.comparisons = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunPivotReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.property = ""; - - /** - * RunPivotReportRequest dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.dimensions = $util.emptyArray; - - /** - * RunPivotReportRequest metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.metrics = $util.emptyArray; - - /** - * RunPivotReportRequest dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.dateRanges = $util.emptyArray; - - /** - * RunPivotReportRequest pivots. - * @member {Array.} pivots - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.pivots = $util.emptyArray; - - /** - * RunPivotReportRequest dimensionFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.dimensionFilter = null; - - /** - * RunPivotReportRequest metricFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.metricFilter = null; - - /** - * RunPivotReportRequest currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.currencyCode = ""; - - /** - * RunPivotReportRequest cohortSpec. - * @member {google.analytics.data.v1beta.ICohortSpec|null|undefined} cohortSpec - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.cohortSpec = null; - - /** - * RunPivotReportRequest keepEmptyRows. - * @member {boolean} keepEmptyRows - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.keepEmptyRows = false; - - /** - * RunPivotReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.returnPropertyQuota = false; - - /** - * RunPivotReportRequest comparisons. - * @member {Array.} comparisons - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - */ - RunPivotReportRequest.prototype.comparisons = $util.emptyArray; - - /** - * Creates a new RunPivotReportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest instance - */ - RunPivotReportRequest.create = function create(properties) { - return new RunPivotReportRequest(properties); - }; - - /** - * Encodes the specified RunPivotReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunPivotReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1beta.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pivots != null && message.pivots.length) - for (var i = 0; i < message.pivots.length; ++i) - $root.google.analytics.data.v1beta.Pivot.encode(message.pivots[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); - if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) - $root.google.analytics.data.v1beta.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.keepEmptyRows); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnPropertyQuota); - if (message.comparisons != null && message.comparisons.length) - for (var i = 0; i < message.comparisons.length; ++i) - $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunPivotReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportRequest} message RunPivotReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunPivotReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunPivotReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunPivotReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.pivots && message.pivots.length)) - message.pivots = []; - message.pivots.push($root.google.analytics.data.v1beta.Pivot.decode(reader, reader.uint32())); - break; - } - case 6: { - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 7: { - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 8: { - message.currencyCode = reader.string(); - break; - } - case 9: { - message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.decode(reader, reader.uint32()); - break; - } - case 10: { - message.keepEmptyRows = reader.bool(); - break; - } - case 11: { - message.returnPropertyQuota = reader.bool(); - break; - } - case 12: { - if (!(message.comparisons && message.comparisons.length)) - message.comparisons = []; - message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunPivotReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunPivotReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunPivotReportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunPivotReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.pivots != null && message.hasOwnProperty("pivots")) { - if (!Array.isArray(message.pivots)) - return "pivots: array expected"; - for (var i = 0; i < message.pivots.length; ++i) { - var error = $root.google.analytics.data.v1beta.Pivot.verify(message.pivots[i]); - if (error) - return "pivots." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { - var error = $root.google.analytics.data.v1beta.CohortSpec.verify(message.cohortSpec); - if (error) - return "cohortSpec." + error; - } - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - if (typeof message.keepEmptyRows !== "boolean") - return "keepEmptyRows: boolean expected"; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; - if (message.comparisons != null && message.hasOwnProperty("comparisons")) { - if (!Array.isArray(message.comparisons)) - return "comparisons: array expected"; - for (var i = 0; i < message.comparisons.length; ++i) { - var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]); - if (error) - return "comparisons." + error; - } - } - return null; - }; - - /** - * Creates a RunPivotReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunPivotReportRequest} RunPivotReportRequest - */ - RunPivotReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.RunPivotReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); - } - } - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.pivots) { - if (!Array.isArray(object.pivots)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: array expected"); - message.pivots = []; - for (var i = 0; i < object.pivots.length; ++i) { - if (typeof object.pivots[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.pivots: object expected"); - message.pivots[i] = $root.google.analytics.data.v1beta.Pivot.fromObject(object.pivots[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.cohortSpec != null) { - if (typeof object.cohortSpec !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.cohortSpec: object expected"); - message.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.fromObject(object.cohortSpec); - } - if (object.keepEmptyRows != null) - message.keepEmptyRows = Boolean(object.keepEmptyRows); - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); - if (object.comparisons) { - if (!Array.isArray(object.comparisons)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: array expected"); - message.comparisons = []; - for (var i = 0; i < object.comparisons.length; ++i) { - if (typeof object.comparisons[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: object expected"); - message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RunPivotReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {google.analytics.data.v1beta.RunPivotReportRequest} message RunPivotReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunPivotReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.dateRanges = []; - object.pivots = []; - object.comparisons = []; - } - if (options.defaults) { - object.property = ""; - object.dimensionFilter = null; - object.metricFilter = null; - object.currencyCode = ""; - object.cohortSpec = null; - object.keepEmptyRows = false; - object.returnPropertyQuota = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); - } - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRanges[j], options); - } - if (message.pivots && message.pivots.length) { - object.pivots = []; - for (var j = 0; j < message.pivots.length; ++j) - object.pivots[j] = $root.google.analytics.data.v1beta.Pivot.toObject(message.pivots[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) - object.cohortSpec = $root.google.analytics.data.v1beta.CohortSpec.toObject(message.cohortSpec, options); - if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) - object.keepEmptyRows = message.keepEmptyRows; - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; - if (message.comparisons && message.comparisons.length) { - object.comparisons = []; - for (var j = 0; j < message.comparisons.length; ++j) - object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options); - } - return object; - }; - - /** - * Converts this RunPivotReportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @instance - * @returns {Object.} JSON object - */ - RunPivotReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunPivotReportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunPivotReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunPivotReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportRequest"; - }; - - return RunPivotReportRequest; - })(); - - v1beta.RunPivotReportResponse = (function() { - - /** - * Properties of a RunPivotReportResponse. - * @memberof google.analytics.data.v1beta - * @interface IRunPivotReportResponse - * @property {Array.|null} [pivotHeaders] RunPivotReportResponse pivotHeaders - * @property {Array.|null} [dimensionHeaders] RunPivotReportResponse dimensionHeaders - * @property {Array.|null} [metricHeaders] RunPivotReportResponse metricHeaders - * @property {Array.|null} [rows] RunPivotReportResponse rows - * @property {Array.|null} [aggregates] RunPivotReportResponse aggregates - * @property {google.analytics.data.v1beta.IResponseMetaData|null} [metadata] RunPivotReportResponse metadata - * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunPivotReportResponse propertyQuota - * @property {string|null} [kind] RunPivotReportResponse kind - */ - - /** - * Constructs a new RunPivotReportResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunPivotReportResponse. - * @implements IRunPivotReportResponse - * @constructor - * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set - */ - function RunPivotReportResponse(properties) { - this.pivotHeaders = []; - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - this.aggregates = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunPivotReportResponse pivotHeaders. - * @member {Array.} pivotHeaders - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.pivotHeaders = $util.emptyArray; - - /** - * RunPivotReportResponse dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.dimensionHeaders = $util.emptyArray; - - /** - * RunPivotReportResponse metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.metricHeaders = $util.emptyArray; - - /** - * RunPivotReportResponse rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.rows = $util.emptyArray; - - /** - * RunPivotReportResponse aggregates. - * @member {Array.} aggregates - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.aggregates = $util.emptyArray; - - /** - * RunPivotReportResponse metadata. - * @member {google.analytics.data.v1beta.IResponseMetaData|null|undefined} metadata - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.metadata = null; - - /** - * RunPivotReportResponse propertyQuota. - * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.propertyQuota = null; - - /** - * RunPivotReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - */ - RunPivotReportResponse.prototype.kind = ""; - - /** - * Creates a new RunPivotReportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse instance - */ - RunPivotReportResponse.create = function create(properties) { - return new RunPivotReportResponse(properties); - }; - - /** - * Encodes the specified RunPivotReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunPivotReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pivotHeaders != null && message.pivotHeaders.length) - for (var i = 0; i < message.pivotHeaders.length; ++i) - $root.google.analytics.data.v1beta.PivotHeader.encode(message.pivotHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregates != null && message.aggregates.length) - for (var i = 0; i < message.aggregates.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.aggregates[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1beta.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.kind); - return writer; - }; - - /** - * Encodes the specified RunPivotReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunPivotReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunPivotReportResponse} message RunPivotReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunPivotReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunPivotReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunPivotReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.pivotHeaders && message.pivotHeaders.length)) - message.pivotHeaders = []; - message.pivotHeaders.push($root.google.analytics.data.v1beta.PivotHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.aggregates && message.aggregates.length)) - message.aggregates = []; - message.aggregates.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 6: { - message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.decode(reader, reader.uint32()); - break; - } - case 7: { - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 8: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunPivotReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunPivotReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunPivotReportResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunPivotReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pivotHeaders != null && message.hasOwnProperty("pivotHeaders")) { - if (!Array.isArray(message.pivotHeaders)) - return "pivotHeaders: array expected"; - for (var i = 0; i < message.pivotHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.PivotHeader.verify(message.pivotHeaders[i]); - if (error) - return "pivotHeaders." + error; - } - } - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.aggregates != null && message.hasOwnProperty("aggregates")) { - if (!Array.isArray(message.aggregates)) - return "aggregates: array expected"; - for (var i = 0; i < message.aggregates.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.aggregates[i]); - if (error) - return "aggregates." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1beta.ResponseMetaData.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); - if (error) - return "propertyQuota." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a RunPivotReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunPivotReportResponse} RunPivotReportResponse - */ - RunPivotReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunPivotReportResponse) - return object; - var message = new $root.google.analytics.data.v1beta.RunPivotReportResponse(); - if (object.pivotHeaders) { - if (!Array.isArray(object.pivotHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: array expected"); - message.pivotHeaders = []; - for (var i = 0; i < object.pivotHeaders.length; ++i) { - if (typeof object.pivotHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.pivotHeaders: object expected"); - message.pivotHeaders[i] = $root.google.analytics.data.v1beta.PivotHeader.fromObject(object.pivotHeaders[i]); - } - } - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); - } - } - if (object.aggregates) { - if (!Array.isArray(object.aggregates)) - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: array expected"); - message.aggregates = []; - for (var i = 0; i < object.aggregates.length; ++i) { - if (typeof object.aggregates[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.aggregates: object expected"); - message.aggregates[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.aggregates[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.fromObject(object.metadata); - } - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1beta.RunPivotReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a RunPivotReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {google.analytics.data.v1beta.RunPivotReportResponse} message RunPivotReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunPivotReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pivotHeaders = []; - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - object.aggregates = []; - } - if (options.defaults) { - object.metadata = null; - object.propertyQuota = null; - object.kind = ""; - } - if (message.pivotHeaders && message.pivotHeaders.length) { - object.pivotHeaders = []; - for (var j = 0; j < message.pivotHeaders.length; ++j) - object.pivotHeaders[j] = $root.google.analytics.data.v1beta.PivotHeader.toObject(message.pivotHeaders[j], options); - } - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); - } - if (message.aggregates && message.aggregates.length) { - object.aggregates = []; - for (var j = 0; j < message.aggregates.length; ++j) - object.aggregates[j] = $root.google.analytics.data.v1beta.Row.toObject(message.aggregates[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1beta.ResponseMetaData.toObject(message.metadata, options); - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this RunPivotReportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @instance - * @returns {Object.} JSON object - */ - RunPivotReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunPivotReportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunPivotReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunPivotReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunPivotReportResponse"; - }; - - return RunPivotReportResponse; - })(); - - v1beta.BatchRunReportsRequest = (function() { - - /** - * Properties of a BatchRunReportsRequest. - * @memberof google.analytics.data.v1beta - * @interface IBatchRunReportsRequest - * @property {string|null} [property] BatchRunReportsRequest property - * @property {Array.|null} [requests] BatchRunReportsRequest requests - */ - - /** - * Constructs a new BatchRunReportsRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a BatchRunReportsRequest. - * @implements IBatchRunReportsRequest - * @constructor - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set - */ - function BatchRunReportsRequest(properties) { - this.requests = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchRunReportsRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @instance - */ - BatchRunReportsRequest.prototype.property = ""; - - /** - * BatchRunReportsRequest requests. - * @member {Array.} requests - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @instance - */ - BatchRunReportsRequest.prototype.requests = $util.emptyArray; - - /** - * Creates a new BatchRunReportsRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest instance - */ - BatchRunReportsRequest.create = function create(properties) { - return new BatchRunReportsRequest(properties); - }; - - /** - * Encodes the specified BatchRunReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunReportsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.requests != null && message.requests.length) - for (var i = 0; i < message.requests.length; ++i) - $root.google.analytics.data.v1beta.RunReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchRunReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsRequest} message BatchRunReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchRunReportsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunReportsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.requests && message.requests.length)) - message.requests = []; - message.requests.push($root.google.analytics.data.v1beta.RunReportRequest.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchRunReportsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunReportsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchRunReportsRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchRunReportsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.requests != null && message.hasOwnProperty("requests")) { - if (!Array.isArray(message.requests)) - return "requests: array expected"; - for (var i = 0; i < message.requests.length; ++i) { - var error = $root.google.analytics.data.v1beta.RunReportRequest.verify(message.requests[i]); - if (error) - return "requests." + error; - } - } - return null; - }; - - /** - * Creates a BatchRunReportsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.BatchRunReportsRequest} BatchRunReportsRequest - */ - BatchRunReportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsRequest) - return object; - var message = new $root.google.analytics.data.v1beta.BatchRunReportsRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.requests) { - if (!Array.isArray(object.requests)) - throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: array expected"); - message.requests = []; - for (var i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.BatchRunReportsRequest.requests: object expected"); - message.requests[i] = $root.google.analytics.data.v1beta.RunReportRequest.fromObject(object.requests[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BatchRunReportsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {google.analytics.data.v1beta.BatchRunReportsRequest} message BatchRunReportsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchRunReportsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.requests = []; - if (options.defaults) - object.property = ""; - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.requests && message.requests.length) { - object.requests = []; - for (var j = 0; j < message.requests.length; ++j) - object.requests[j] = $root.google.analytics.data.v1beta.RunReportRequest.toObject(message.requests[j], options); - } - return object; - }; - - /** - * Converts this BatchRunReportsRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @instance - * @returns {Object.} JSON object - */ - BatchRunReportsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchRunReportsRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.BatchRunReportsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchRunReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsRequest"; - }; - - return BatchRunReportsRequest; - })(); - - v1beta.BatchRunReportsResponse = (function() { - - /** - * Properties of a BatchRunReportsResponse. - * @memberof google.analytics.data.v1beta - * @interface IBatchRunReportsResponse - * @property {Array.|null} [reports] BatchRunReportsResponse reports - * @property {string|null} [kind] BatchRunReportsResponse kind - */ - - /** - * Constructs a new BatchRunReportsResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a BatchRunReportsResponse. - * @implements IBatchRunReportsResponse - * @constructor - * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set - */ - function BatchRunReportsResponse(properties) { - this.reports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchRunReportsResponse reports. - * @member {Array.} reports - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @instance - */ - BatchRunReportsResponse.prototype.reports = $util.emptyArray; - - /** - * BatchRunReportsResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @instance - */ - BatchRunReportsResponse.prototype.kind = ""; - - /** - * Creates a new BatchRunReportsResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse instance - */ - BatchRunReportsResponse.create = function create(properties) { - return new BatchRunReportsResponse(properties); - }; - - /** - * Encodes the specified BatchRunReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunReportsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reports != null && message.reports.length) - for (var i = 0; i < message.reports.length; ++i) - $root.google.analytics.data.v1beta.RunReportResponse.encode(message.reports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); - return writer; - }; - - /** - * Encodes the specified BatchRunReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunReportsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunReportsResponse} message BatchRunReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchRunReportsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunReportsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.reports && message.reports.length)) - message.reports = []; - message.reports.push($root.google.analytics.data.v1beta.RunReportResponse.decode(reader, reader.uint32())); - break; - } - case 2: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchRunReportsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunReportsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchRunReportsResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchRunReportsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reports != null && message.hasOwnProperty("reports")) { - if (!Array.isArray(message.reports)) - return "reports: array expected"; - for (var i = 0; i < message.reports.length; ++i) { - var error = $root.google.analytics.data.v1beta.RunReportResponse.verify(message.reports[i]); - if (error) - return "reports." + error; - } - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a BatchRunReportsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.BatchRunReportsResponse} BatchRunReportsResponse - */ - BatchRunReportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.BatchRunReportsResponse) - return object; - var message = new $root.google.analytics.data.v1beta.BatchRunReportsResponse(); - if (object.reports) { - if (!Array.isArray(object.reports)) - throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: array expected"); - message.reports = []; - for (var i = 0; i < object.reports.length; ++i) { - if (typeof object.reports[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.BatchRunReportsResponse.reports: object expected"); - message.reports[i] = $root.google.analytics.data.v1beta.RunReportResponse.fromObject(object.reports[i]); - } - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a BatchRunReportsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {google.analytics.data.v1beta.BatchRunReportsResponse} message BatchRunReportsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchRunReportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.reports = []; - if (options.defaults) - object.kind = ""; - if (message.reports && message.reports.length) { - object.reports = []; - for (var j = 0; j < message.reports.length; ++j) - object.reports[j] = $root.google.analytics.data.v1beta.RunReportResponse.toObject(message.reports[j], options); - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this BatchRunReportsResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @instance - * @returns {Object.} JSON object - */ - BatchRunReportsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchRunReportsResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.BatchRunReportsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchRunReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunReportsResponse"; - }; - - return BatchRunReportsResponse; - })(); - - v1beta.BatchRunPivotReportsRequest = (function() { - - /** - * Properties of a BatchRunPivotReportsRequest. - * @memberof google.analytics.data.v1beta - * @interface IBatchRunPivotReportsRequest - * @property {string|null} [property] BatchRunPivotReportsRequest property - * @property {Array.|null} [requests] BatchRunPivotReportsRequest requests - */ - - /** - * Constructs a new BatchRunPivotReportsRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a BatchRunPivotReportsRequest. - * @implements IBatchRunPivotReportsRequest - * @constructor - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set - */ - function BatchRunPivotReportsRequest(properties) { - this.requests = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchRunPivotReportsRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @instance - */ - BatchRunPivotReportsRequest.prototype.property = ""; - - /** - * BatchRunPivotReportsRequest requests. - * @member {Array.} requests - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @instance - */ - BatchRunPivotReportsRequest.prototype.requests = $util.emptyArray; - - /** - * Creates a new BatchRunPivotReportsRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest instance - */ - BatchRunPivotReportsRequest.create = function create(properties) { - return new BatchRunPivotReportsRequest(properties); - }; - - /** - * Encodes the specified BatchRunPivotReportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunPivotReportsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.requests != null && message.requests.length) - for (var i = 0; i < message.requests.length; ++i) - $root.google.analytics.data.v1beta.RunPivotReportRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchRunPivotReportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsRequest} message BatchRunPivotReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunPivotReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunPivotReportsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.requests && message.requests.length)) - message.requests = []; - message.requests.push($root.google.analytics.data.v1beta.RunPivotReportRequest.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchRunPivotReportsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunPivotReportsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchRunPivotReportsRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchRunPivotReportsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.requests != null && message.hasOwnProperty("requests")) { - if (!Array.isArray(message.requests)) - return "requests: array expected"; - for (var i = 0; i < message.requests.length; ++i) { - var error = $root.google.analytics.data.v1beta.RunPivotReportRequest.verify(message.requests[i]); - if (error) - return "requests." + error; - } - } - return null; - }; - - /** - * Creates a BatchRunPivotReportsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsRequest} BatchRunPivotReportsRequest - */ - BatchRunPivotReportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest) - return object; - var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.requests) { - if (!Array.isArray(object.requests)) - throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: array expected"); - message.requests = []; - for (var i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsRequest.requests: object expected"); - message.requests[i] = $root.google.analytics.data.v1beta.RunPivotReportRequest.fromObject(object.requests[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BatchRunPivotReportsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {google.analytics.data.v1beta.BatchRunPivotReportsRequest} message BatchRunPivotReportsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchRunPivotReportsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.requests = []; - if (options.defaults) - object.property = ""; - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.requests && message.requests.length) { - object.requests = []; - for (var j = 0; j < message.requests.length; ++j) - object.requests[j] = $root.google.analytics.data.v1beta.RunPivotReportRequest.toObject(message.requests[j], options); - } - return object; - }; - - /** - * Converts this BatchRunPivotReportsRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @instance - * @returns {Object.} JSON object - */ - BatchRunPivotReportsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchRunPivotReportsRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchRunPivotReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsRequest"; - }; - - return BatchRunPivotReportsRequest; - })(); - - v1beta.BatchRunPivotReportsResponse = (function() { - - /** - * Properties of a BatchRunPivotReportsResponse. - * @memberof google.analytics.data.v1beta - * @interface IBatchRunPivotReportsResponse - * @property {Array.|null} [pivotReports] BatchRunPivotReportsResponse pivotReports - * @property {string|null} [kind] BatchRunPivotReportsResponse kind - */ - - /** - * Constructs a new BatchRunPivotReportsResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a BatchRunPivotReportsResponse. - * @implements IBatchRunPivotReportsResponse - * @constructor - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set - */ - function BatchRunPivotReportsResponse(properties) { - this.pivotReports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchRunPivotReportsResponse pivotReports. - * @member {Array.} pivotReports - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @instance - */ - BatchRunPivotReportsResponse.prototype.pivotReports = $util.emptyArray; - - /** - * BatchRunPivotReportsResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @instance - */ - BatchRunPivotReportsResponse.prototype.kind = ""; - - /** - * Creates a new BatchRunPivotReportsResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse instance - */ - BatchRunPivotReportsResponse.create = function create(properties) { - return new BatchRunPivotReportsResponse(properties); - }; - - /** - * Encodes the specified BatchRunPivotReportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunPivotReportsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pivotReports != null && message.pivotReports.length) - for (var i = 0; i < message.pivotReports.length; ++i) - $root.google.analytics.data.v1beta.RunPivotReportResponse.encode(message.pivotReports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); - return writer; - }; - - /** - * Encodes the specified BatchRunPivotReportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {google.analytics.data.v1beta.IBatchRunPivotReportsResponse} message BatchRunPivotReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunPivotReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunPivotReportsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.pivotReports && message.pivotReports.length)) - message.pivotReports = []; - message.pivotReports.push($root.google.analytics.data.v1beta.RunPivotReportResponse.decode(reader, reader.uint32())); - break; - } - case 2: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchRunPivotReportsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunPivotReportsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchRunPivotReportsResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchRunPivotReportsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pivotReports != null && message.hasOwnProperty("pivotReports")) { - if (!Array.isArray(message.pivotReports)) - return "pivotReports: array expected"; - for (var i = 0; i < message.pivotReports.length; ++i) { - var error = $root.google.analytics.data.v1beta.RunPivotReportResponse.verify(message.pivotReports[i]); - if (error) - return "pivotReports." + error; - } - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a BatchRunPivotReportsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.BatchRunPivotReportsResponse} BatchRunPivotReportsResponse - */ - BatchRunPivotReportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse) - return object; - var message = new $root.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); - if (object.pivotReports) { - if (!Array.isArray(object.pivotReports)) - throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: array expected"); - message.pivotReports = []; - for (var i = 0; i < object.pivotReports.length; ++i) { - if (typeof object.pivotReports[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.BatchRunPivotReportsResponse.pivotReports: object expected"); - message.pivotReports[i] = $root.google.analytics.data.v1beta.RunPivotReportResponse.fromObject(object.pivotReports[i]); - } - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a BatchRunPivotReportsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {google.analytics.data.v1beta.BatchRunPivotReportsResponse} message BatchRunPivotReportsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchRunPivotReportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pivotReports = []; - if (options.defaults) - object.kind = ""; - if (message.pivotReports && message.pivotReports.length) { - object.pivotReports = []; - for (var j = 0; j < message.pivotReports.length; ++j) - object.pivotReports[j] = $root.google.analytics.data.v1beta.RunPivotReportResponse.toObject(message.pivotReports[j], options); - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this BatchRunPivotReportsResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @instance - * @returns {Object.} JSON object - */ - BatchRunPivotReportsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchRunPivotReportsResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.BatchRunPivotReportsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchRunPivotReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.BatchRunPivotReportsResponse"; - }; - - return BatchRunPivotReportsResponse; - })(); - - v1beta.GetMetadataRequest = (function() { - - /** - * Properties of a GetMetadataRequest. - * @memberof google.analytics.data.v1beta - * @interface IGetMetadataRequest - * @property {string|null} [name] GetMetadataRequest name - */ - - /** - * Constructs a new GetMetadataRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a GetMetadataRequest. - * @implements IGetMetadataRequest - * @constructor - * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set - */ - function GetMetadataRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetMetadataRequest name. - * @member {string} name - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @instance - */ - GetMetadataRequest.prototype.name = ""; - - /** - * Creates a new GetMetadataRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {google.analytics.data.v1beta.IGetMetadataRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest instance - */ - GetMetadataRequest.create = function create(properties) { - return new GetMetadataRequest(properties); - }; - - /** - * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetMetadataRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {google.analytics.data.v1beta.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMetadataRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMetadataRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.GetMetadataRequest} GetMetadataRequest - */ - GetMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.GetMetadataRequest) - return object; - var message = new $root.google.analytics.data.v1beta.GetMetadataRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {google.analytics.data.v1beta.GetMetadataRequest} message GetMetadataRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMetadataRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetMetadataRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @instance - * @returns {Object.} JSON object - */ - GetMetadataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMetadataRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.GetMetadataRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.GetMetadataRequest"; - }; - - return GetMetadataRequest; - })(); - - v1beta.RunRealtimeReportRequest = (function() { - - /** - * Properties of a RunRealtimeReportRequest. - * @memberof google.analytics.data.v1beta - * @interface IRunRealtimeReportRequest - * @property {string|null} [property] RunRealtimeReportRequest property - * @property {Array.|null} [dimensions] RunRealtimeReportRequest dimensions - * @property {Array.|null} [metrics] RunRealtimeReportRequest metrics - * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] RunRealtimeReportRequest dimensionFilter - * @property {google.analytics.data.v1beta.IFilterExpression|null} [metricFilter] RunRealtimeReportRequest metricFilter - * @property {number|Long|null} [limit] RunRealtimeReportRequest limit - * @property {Array.|null} [metricAggregations] RunRealtimeReportRequest metricAggregations - * @property {Array.|null} [orderBys] RunRealtimeReportRequest orderBys - * @property {boolean|null} [returnPropertyQuota] RunRealtimeReportRequest returnPropertyQuota - * @property {Array.|null} [minuteRanges] RunRealtimeReportRequest minuteRanges - */ - - /** - * Constructs a new RunRealtimeReportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunRealtimeReportRequest. - * @implements IRunRealtimeReportRequest - * @constructor - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set - */ - function RunRealtimeReportRequest(properties) { - this.dimensions = []; - this.metrics = []; - this.metricAggregations = []; - this.orderBys = []; - this.minuteRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunRealtimeReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.property = ""; - - /** - * RunRealtimeReportRequest dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.dimensions = $util.emptyArray; - - /** - * RunRealtimeReportRequest metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.metrics = $util.emptyArray; - - /** - * RunRealtimeReportRequest dimensionFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.dimensionFilter = null; - - /** - * RunRealtimeReportRequest metricFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.metricFilter = null; - - /** - * RunRealtimeReportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RunRealtimeReportRequest metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.metricAggregations = $util.emptyArray; - - /** - * RunRealtimeReportRequest orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.orderBys = $util.emptyArray; - - /** - * RunRealtimeReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.returnPropertyQuota = false; - - /** - * RunRealtimeReportRequest minuteRanges. - * @member {Array.} minuteRanges - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - */ - RunRealtimeReportRequest.prototype.minuteRanges = $util.emptyArray; - - /** - * Creates a new RunRealtimeReportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest instance - */ - RunRealtimeReportRequest.create = function create(properties) { - return new RunRealtimeReportRequest(properties); - }; - - /** - * Encodes the specified RunRealtimeReportRequest message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunRealtimeReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.analytics.data.v1beta.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.limit); - if (message.metricAggregations != null && message.metricAggregations.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.metricAggregations.length; ++i) - writer.int32(message.metricAggregations[i]); - writer.ldelim(); - } - if (message.orderBys != null && message.orderBys.length) - for (var i = 0; i < message.orderBys.length; ++i) - $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.returnPropertyQuota); - if (message.minuteRanges != null && message.minuteRanges.length) - for (var i = 0; i < message.minuteRanges.length; ++i) - $root.google.analytics.data.v1beta.MinuteRange.encode(message.minuteRanges[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunRealtimeReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportRequest} message RunRealtimeReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunRealtimeReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunRealtimeReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunRealtimeReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.property = reader.string(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.Dimension.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.analytics.data.v1beta.Metric.decode(reader, reader.uint32())); - break; - } - case 4: { - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 5: { - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.limit = reader.int64(); - break; - } - case 7: { - if (!(message.metricAggregations && message.metricAggregations.length)) - message.metricAggregations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metricAggregations.push(reader.int32()); - } else - message.metricAggregations.push(reader.int32()); - break; - } - case 8: { - if (!(message.orderBys && message.orderBys.length)) - message.orderBys = []; - message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); - break; - } - case 9: { - message.returnPropertyQuota = reader.bool(); - break; - } - case 10: { - if (!(message.minuteRanges && message.minuteRanges.length)) - message.minuteRanges = []; - message.minuteRanges.push($root.google.analytics.data.v1beta.MinuteRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunRealtimeReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunRealtimeReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunRealtimeReportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunRealtimeReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.Dimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.analytics.data.v1beta.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.metricFilter); - if (error) - return "metricFilter." + error; - } - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { - if (!Array.isArray(message.metricAggregations)) - return "metricAggregations: array expected"; - for (var i = 0; i < message.metricAggregations.length; ++i) - switch (message.metricAggregations[i]) { - default: - return "metricAggregations: enum value[] expected"; - case 0: - case 1: - case 5: - case 6: - case 4: - break; - } - } - if (message.orderBys != null && message.hasOwnProperty("orderBys")) { - if (!Array.isArray(message.orderBys)) - return "orderBys: array expected"; - for (var i = 0; i < message.orderBys.length; ++i) { - var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); - if (error) - return "orderBys." + error; - } - } - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; - if (message.minuteRanges != null && message.hasOwnProperty("minuteRanges")) { - if (!Array.isArray(message.minuteRanges)) - return "minuteRanges: array expected"; - for (var i = 0; i < message.minuteRanges.length; ++i) { - var error = $root.google.analytics.data.v1beta.MinuteRange.verify(message.minuteRanges[i]); - if (error) - return "minuteRanges." + error; - } - } - return null; - }; - - /** - * Creates a RunRealtimeReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunRealtimeReportRequest} RunRealtimeReportRequest - */ - RunRealtimeReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.RunRealtimeReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.Dimension.fromObject(object.dimensions[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metrics: object expected"); - message.metrics[i] = $root.google.analytics.data.v1beta.Metric.fromObject(object.metrics[i]); - } - } - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.metricFilter != null) { - if (typeof object.metricFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricFilter: object expected"); - message.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.metricFilter); - } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.metricAggregations) { - if (!Array.isArray(object.metricAggregations)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.metricAggregations: array expected"); - message.metricAggregations = []; - for (var i = 0; i < object.metricAggregations.length; ++i) - switch (object.metricAggregations[i]) { - default: - if (typeof object.metricAggregations[i] === "number") { - message.metricAggregations[i] = object.metricAggregations[i]; - break; - } - case "METRIC_AGGREGATION_UNSPECIFIED": - case 0: - message.metricAggregations[i] = 0; - break; - case "TOTAL": - case 1: - message.metricAggregations[i] = 1; - break; - case "MINIMUM": - case 5: - message.metricAggregations[i] = 5; - break; - case "MAXIMUM": - case 6: - message.metricAggregations[i] = 6; - break; - case "COUNT": - case 4: - message.metricAggregations[i] = 4; - break; - } - } - if (object.orderBys) { - if (!Array.isArray(object.orderBys)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: array expected"); - message.orderBys = []; - for (var i = 0; i < object.orderBys.length; ++i) { - if (typeof object.orderBys[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.orderBys: object expected"); - message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); - } - } - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); - if (object.minuteRanges) { - if (!Array.isArray(object.minuteRanges)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: array expected"); - message.minuteRanges = []; - for (var i = 0; i < object.minuteRanges.length; ++i) { - if (typeof object.minuteRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportRequest.minuteRanges: object expected"); - message.minuteRanges[i] = $root.google.analytics.data.v1beta.MinuteRange.fromObject(object.minuteRanges[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RunRealtimeReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {google.analytics.data.v1beta.RunRealtimeReportRequest} message RunRealtimeReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunRealtimeReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.metrics = []; - object.metricAggregations = []; - object.orderBys = []; - object.minuteRanges = []; - } - if (options.defaults) { - object.property = ""; - object.dimensionFilter = null; - object.metricFilter = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.returnPropertyQuota = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.Dimension.toObject(message.dimensions[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.analytics.data.v1beta.Metric.toObject(message.metrics[j], options); - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); - if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) - object.metricFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.metricFilter, options); - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.metricAggregations && message.metricAggregations.length) { - object.metricAggregations = []; - for (var j = 0; j < message.metricAggregations.length; ++j) - object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; - } - if (message.orderBys && message.orderBys.length) { - object.orderBys = []; - for (var j = 0; j < message.orderBys.length; ++j) - object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); - } - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; - if (message.minuteRanges && message.minuteRanges.length) { - object.minuteRanges = []; - for (var j = 0; j < message.minuteRanges.length; ++j) - object.minuteRanges[j] = $root.google.analytics.data.v1beta.MinuteRange.toObject(message.minuteRanges[j], options); - } - return object; - }; - - /** - * Converts this RunRealtimeReportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @instance - * @returns {Object.} JSON object - */ - RunRealtimeReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunRealtimeReportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunRealtimeReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunRealtimeReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportRequest"; - }; - - return RunRealtimeReportRequest; - })(); - - v1beta.RunRealtimeReportResponse = (function() { - - /** - * Properties of a RunRealtimeReportResponse. - * @memberof google.analytics.data.v1beta - * @interface IRunRealtimeReportResponse - * @property {Array.|null} [dimensionHeaders] RunRealtimeReportResponse dimensionHeaders - * @property {Array.|null} [metricHeaders] RunRealtimeReportResponse metricHeaders - * @property {Array.|null} [rows] RunRealtimeReportResponse rows - * @property {Array.|null} [totals] RunRealtimeReportResponse totals - * @property {Array.|null} [maximums] RunRealtimeReportResponse maximums - * @property {Array.|null} [minimums] RunRealtimeReportResponse minimums - * @property {number|null} [rowCount] RunRealtimeReportResponse rowCount - * @property {google.analytics.data.v1beta.IPropertyQuota|null} [propertyQuota] RunRealtimeReportResponse propertyQuota - * @property {string|null} [kind] RunRealtimeReportResponse kind - */ - - /** - * Constructs a new RunRealtimeReportResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a RunRealtimeReportResponse. - * @implements IRunRealtimeReportResponse - * @constructor - * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set - */ - function RunRealtimeReportResponse(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; - this.totals = []; - this.maximums = []; - this.minimums = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunRealtimeReportResponse dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.dimensionHeaders = $util.emptyArray; - - /** - * RunRealtimeReportResponse metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.metricHeaders = $util.emptyArray; - - /** - * RunRealtimeReportResponse rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.rows = $util.emptyArray; - - /** - * RunRealtimeReportResponse totals. - * @member {Array.} totals - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.totals = $util.emptyArray; - - /** - * RunRealtimeReportResponse maximums. - * @member {Array.} maximums - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.maximums = $util.emptyArray; - - /** - * RunRealtimeReportResponse minimums. - * @member {Array.} minimums - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.minimums = $util.emptyArray; - - /** - * RunRealtimeReportResponse rowCount. - * @member {number} rowCount - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.rowCount = 0; - - /** - * RunRealtimeReportResponse propertyQuota. - * @member {google.analytics.data.v1beta.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.propertyQuota = null; - - /** - * RunRealtimeReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - */ - RunRealtimeReportResponse.prototype.kind = ""; - - /** - * Creates a new RunRealtimeReportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse instance - */ - RunRealtimeReportResponse.create = function create(properties) { - return new RunRealtimeReportResponse(properties); - }; - - /** - * Encodes the specified RunRealtimeReportResponse message. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunRealtimeReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1beta.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1beta.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totals != null && message.totals.length) - for (var i = 0; i < message.totals.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maximums != null && message.maximums.length) - for (var i = 0; i < message.maximums.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.minimums != null && message.minimums.length) - for (var i = 0; i < message.minimums.length; ++i) - $root.google.analytics.data.v1beta.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1beta.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.kind); - return writer; - }; - - /** - * Encodes the specified RunRealtimeReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.RunRealtimeReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {google.analytics.data.v1beta.IRunRealtimeReportResponse} message RunRealtimeReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunRealtimeReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunRealtimeReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunRealtimeReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1beta.DimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1beta.MetricHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.totals && message.totals.length)) - message.totals = []; - message.totals.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.maximums && message.maximums.length)) - message.maximums = []; - message.maximums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.minimums && message.minimums.length)) - message.minimums = []; - message.minimums.push($root.google.analytics.data.v1beta.Row.decode(reader, reader.uint32())); - break; - } - case 7: { - message.rowCount = reader.int32(); - break; - } - case 8: { - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 9: { - message.kind = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunRealtimeReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunRealtimeReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunRealtimeReportResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunRealtimeReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.totals != null && message.hasOwnProperty("totals")) { - if (!Array.isArray(message.totals)) - return "totals: array expected"; - for (var i = 0; i < message.totals.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.totals[i]); - if (error) - return "totals." + error; - } - } - if (message.maximums != null && message.hasOwnProperty("maximums")) { - if (!Array.isArray(message.maximums)) - return "maximums: array expected"; - for (var i = 0; i < message.maximums.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.maximums[i]); - if (error) - return "maximums." + error; - } - } - if (message.minimums != null && message.hasOwnProperty("minimums")) { - if (!Array.isArray(message.minimums)) - return "minimums: array expected"; - for (var i = 0; i < message.minimums.length; ++i) { - var error = $root.google.analytics.data.v1beta.Row.verify(message.minimums[i]); - if (error) - return "minimums." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1beta.PropertyQuota.verify(message.propertyQuota); - if (error) - return "propertyQuota." + error; - } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - return null; - }; - - /** - * Creates a RunRealtimeReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.RunRealtimeReportResponse} RunRealtimeReportResponse - */ - RunRealtimeReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.RunRealtimeReportResponse) - return object; - var message = new $root.google.analytics.data.v1beta.RunRealtimeReportResponse(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1beta.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1beta.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.rows[i]); - } - } - if (object.totals) { - if (!Array.isArray(object.totals)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: array expected"); - message.totals = []; - for (var i = 0; i < object.totals.length; ++i) { - if (typeof object.totals[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.totals: object expected"); - message.totals[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.totals[i]); - } - } - if (object.maximums) { - if (!Array.isArray(object.maximums)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: array expected"); - message.maximums = []; - for (var i = 0; i < object.maximums.length; ++i) { - if (typeof object.maximums[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.maximums: object expected"); - message.maximums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.maximums[i]); - } - } - if (object.minimums) { - if (!Array.isArray(object.minimums)) - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: array expected"); - message.minimums = []; - for (var i = 0; i < object.minimums.length; ++i) { - if (typeof object.minimums[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.minimums: object expected"); - message.minimums[i] = $root.google.analytics.data.v1beta.Row.fromObject(object.minimums[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1beta.RunRealtimeReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.fromObject(object.propertyQuota); - } - if (object.kind != null) - message.kind = String(object.kind); - return message; - }; - - /** - * Creates a plain object from a RunRealtimeReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {google.analytics.data.v1beta.RunRealtimeReportResponse} message RunRealtimeReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunRealtimeReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - object.totals = []; - object.maximums = []; - object.minimums = []; - } - if (options.defaults) { - object.rowCount = 0; - object.propertyQuota = null; - object.kind = ""; - } - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1beta.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1beta.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1beta.Row.toObject(message.rows[j], options); - } - if (message.totals && message.totals.length) { - object.totals = []; - for (var j = 0; j < message.totals.length; ++j) - object.totals[j] = $root.google.analytics.data.v1beta.Row.toObject(message.totals[j], options); - } - if (message.maximums && message.maximums.length) { - object.maximums = []; - for (var j = 0; j < message.maximums.length; ++j) - object.maximums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.maximums[j], options); - } - if (message.minimums && message.minimums.length) { - object.minimums = []; - for (var j = 0; j < message.minimums.length; ++j) - object.minimums[j] = $root.google.analytics.data.v1beta.Row.toObject(message.minimums[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1beta.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - return object; - }; - - /** - * Converts this RunRealtimeReportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @instance - * @returns {Object.} JSON object - */ - RunRealtimeReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunRealtimeReportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.RunRealtimeReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunRealtimeReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.RunRealtimeReportResponse"; - }; - - return RunRealtimeReportResponse; - })(); - - v1beta.GetAudienceExportRequest = (function() { - - /** - * Properties of a GetAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @interface IGetAudienceExportRequest - * @property {string|null} [name] GetAudienceExportRequest name - */ - - /** - * Constructs a new GetAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a GetAudienceExportRequest. - * @implements IGetAudienceExportRequest - * @constructor - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set - */ - function GetAudienceExportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAudienceExportRequest name. - * @member {string} name - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @instance - */ - GetAudienceExportRequest.prototype.name = ""; - - /** - * Creates a new GetAudienceExportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest instance - */ - GetAudienceExportRequest.create = function create(properties) { - return new GetAudienceExportRequest(properties); - }; - - /** - * Encodes the specified GetAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAudienceExportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.GetAudienceExportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IGetAudienceExportRequest} message GetAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAudienceExportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAudienceExportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetAudienceExportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAudienceExportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAudienceExportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.GetAudienceExportRequest} GetAudienceExportRequest - */ - GetAudienceExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.GetAudienceExportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.GetAudienceExportRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAudienceExportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.GetAudienceExportRequest} message GetAudienceExportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAudienceExportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetAudienceExportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @instance - * @returns {Object.} JSON object - */ - GetAudienceExportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAudienceExportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.GetAudienceExportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.GetAudienceExportRequest"; - }; - - return GetAudienceExportRequest; - })(); - - v1beta.ListAudienceExportsRequest = (function() { - - /** - * Properties of a ListAudienceExportsRequest. - * @memberof google.analytics.data.v1beta - * @interface IListAudienceExportsRequest - * @property {string|null} [parent] ListAudienceExportsRequest parent - * @property {number|null} [pageSize] ListAudienceExportsRequest pageSize - * @property {string|null} [pageToken] ListAudienceExportsRequest pageToken - */ - - /** - * Constructs a new ListAudienceExportsRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a ListAudienceExportsRequest. - * @implements IListAudienceExportsRequest - * @constructor - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set - */ - function ListAudienceExportsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAudienceExportsRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @instance - */ - ListAudienceExportsRequest.prototype.parent = ""; - - /** - * ListAudienceExportsRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @instance - */ - ListAudienceExportsRequest.prototype.pageSize = 0; - - /** - * ListAudienceExportsRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @instance - */ - ListAudienceExportsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAudienceExportsRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest instance - */ - ListAudienceExportsRequest.create = function create(properties) { - return new ListAudienceExportsRequest(properties); - }; - - /** - * Encodes the specified ListAudienceExportsRequest message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceExportsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListAudienceExportsRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsRequest} message ListAudienceExportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceExportsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAudienceExportsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceExportsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAudienceExportsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceExportsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAudienceExportsRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAudienceExportsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListAudienceExportsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ListAudienceExportsRequest} ListAudienceExportsRequest - */ - ListAudienceExportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsRequest) - return object; - var message = new $root.google.analytics.data.v1beta.ListAudienceExportsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListAudienceExportsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {google.analytics.data.v1beta.ListAudienceExportsRequest} message ListAudienceExportsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAudienceExportsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListAudienceExportsRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAudienceExportsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAudienceExportsRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ListAudienceExportsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAudienceExportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsRequest"; - }; - - return ListAudienceExportsRequest; - })(); - - v1beta.ListAudienceExportsResponse = (function() { - - /** - * Properties of a ListAudienceExportsResponse. - * @memberof google.analytics.data.v1beta - * @interface IListAudienceExportsResponse - * @property {Array.|null} [audienceExports] ListAudienceExportsResponse audienceExports - * @property {string|null} [nextPageToken] ListAudienceExportsResponse nextPageToken - */ - - /** - * Constructs a new ListAudienceExportsResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a ListAudienceExportsResponse. - * @implements IListAudienceExportsResponse - * @constructor - * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set - */ - function ListAudienceExportsResponse(properties) { - this.audienceExports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAudienceExportsResponse audienceExports. - * @member {Array.} audienceExports - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @instance - */ - ListAudienceExportsResponse.prototype.audienceExports = $util.emptyArray; - - /** - * ListAudienceExportsResponse nextPageToken. - * @member {string|null|undefined} nextPageToken - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @instance - */ - ListAudienceExportsResponse.prototype.nextPageToken = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ListAudienceExportsResponse.prototype, "_nextPageToken", { - get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListAudienceExportsResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse instance - */ - ListAudienceExportsResponse.create = function create(properties) { - return new ListAudienceExportsResponse(properties); - }; - - /** - * Encodes the specified ListAudienceExportsResponse message. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceExportsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.audienceExports != null && message.audienceExports.length) - for (var i = 0; i < message.audienceExports.length; ++i) - $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListAudienceExportsResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ListAudienceExportsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {google.analytics.data.v1beta.IListAudienceExportsResponse} message ListAudienceExportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAudienceExportsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAudienceExportsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceExportsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.audienceExports && message.audienceExports.length)) - message.audienceExports = []; - message.audienceExports.push($root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAudienceExportsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAudienceExportsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAudienceExportsResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAudienceExportsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.audienceExports != null && message.hasOwnProperty("audienceExports")) { - if (!Array.isArray(message.audienceExports)) - return "audienceExports: array expected"; - for (var i = 0; i < message.audienceExports.length; ++i) { - var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExports[i]); - if (error) - return "audienceExports." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - properties._nextPageToken = 1; - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - } - return null; - }; - - /** - * Creates a ListAudienceExportsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ListAudienceExportsResponse} ListAudienceExportsResponse - */ - ListAudienceExportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ListAudienceExportsResponse) - return object; - var message = new $root.google.analytics.data.v1beta.ListAudienceExportsResponse(); - if (object.audienceExports) { - if (!Array.isArray(object.audienceExports)) - throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: array expected"); - message.audienceExports = []; - for (var i = 0; i < object.audienceExports.length; ++i) { - if (typeof object.audienceExports[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.ListAudienceExportsResponse.audienceExports: object expected"); - message.audienceExports[i] = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExports[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListAudienceExportsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {google.analytics.data.v1beta.ListAudienceExportsResponse} message ListAudienceExportsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAudienceExportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.audienceExports = []; - if (message.audienceExports && message.audienceExports.length) { - object.audienceExports = []; - for (var j = 0; j < message.audienceExports.length; ++j) - object.audienceExports[j] = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { - object.nextPageToken = message.nextPageToken; - if (options.oneofs) - object._nextPageToken = "nextPageToken"; - } - return object; - }; - - /** - * Converts this ListAudienceExportsResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAudienceExportsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAudienceExportsResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ListAudienceExportsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAudienceExportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ListAudienceExportsResponse"; - }; - - return ListAudienceExportsResponse; - })(); - - v1beta.CreateAudienceExportRequest = (function() { - - /** - * Properties of a CreateAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @interface ICreateAudienceExportRequest - * @property {string|null} [parent] CreateAudienceExportRequest parent - * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] CreateAudienceExportRequest audienceExport - */ - - /** - * Constructs a new CreateAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CreateAudienceExportRequest. - * @implements ICreateAudienceExportRequest - * @constructor - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set - */ - function CreateAudienceExportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateAudienceExportRequest parent. - * @member {string} parent - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @instance - */ - CreateAudienceExportRequest.prototype.parent = ""; - - /** - * CreateAudienceExportRequest audienceExport. - * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @instance - */ - CreateAudienceExportRequest.prototype.audienceExport = null; - - /** - * Creates a new CreateAudienceExportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest instance - */ - CreateAudienceExportRequest.create = function create(properties) { - return new CreateAudienceExportRequest(properties); - }; - - /** - * Encodes the specified CreateAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAudienceExportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) - $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CreateAudienceExportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.ICreateAudienceExportRequest} message CreateAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateAudienceExportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAudienceExportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateAudienceExportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateAudienceExportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateAudienceExportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { - var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); - if (error) - return "audienceExport." + error; - } - return null; - }; - - /** - * Creates a CreateAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CreateAudienceExportRequest} CreateAudienceExportRequest - */ - CreateAudienceExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CreateAudienceExportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.CreateAudienceExportRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.audienceExport != null) { - if (typeof object.audienceExport !== "object") - throw TypeError(".google.analytics.data.v1beta.CreateAudienceExportRequest.audienceExport: object expected"); - message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); - } - return message; - }; - - /** - * Creates a plain object from a CreateAudienceExportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.CreateAudienceExportRequest} message CreateAudienceExportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAudienceExportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.audienceExport = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) - object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); - return object; - }; - - /** - * Converts this CreateAudienceExportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAudienceExportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAudienceExportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CreateAudienceExportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CreateAudienceExportRequest"; - }; - - return CreateAudienceExportRequest; - })(); - - v1beta.AudienceExport = (function() { - - /** - * Properties of an AudienceExport. - * @memberof google.analytics.data.v1beta - * @interface IAudienceExport - * @property {string|null} [name] AudienceExport name - * @property {string|null} [audience] AudienceExport audience - * @property {string|null} [audienceDisplayName] AudienceExport audienceDisplayName - * @property {Array.|null} [dimensions] AudienceExport dimensions - * @property {google.analytics.data.v1beta.AudienceExport.State|null} [state] AudienceExport state - * @property {google.protobuf.ITimestamp|null} [beginCreatingTime] AudienceExport beginCreatingTime - * @property {number|null} [creationQuotaTokensCharged] AudienceExport creationQuotaTokensCharged - * @property {number|null} [rowCount] AudienceExport rowCount - * @property {string|null} [errorMessage] AudienceExport errorMessage - * @property {number|null} [percentageCompleted] AudienceExport percentageCompleted - */ - - /** - * Constructs a new AudienceExport. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an AudienceExport. - * @implements IAudienceExport - * @constructor - * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set - */ - function AudienceExport(properties) { - this.dimensions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceExport name. - * @member {string} name - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.name = ""; - - /** - * AudienceExport audience. - * @member {string} audience - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.audience = ""; - - /** - * AudienceExport audienceDisplayName. - * @member {string} audienceDisplayName - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.audienceDisplayName = ""; - - /** - * AudienceExport dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.dimensions = $util.emptyArray; - - /** - * AudienceExport state. - * @member {google.analytics.data.v1beta.AudienceExport.State|null|undefined} state - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.state = null; - - /** - * AudienceExport beginCreatingTime. - * @member {google.protobuf.ITimestamp|null|undefined} beginCreatingTime - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.beginCreatingTime = null; - - /** - * AudienceExport creationQuotaTokensCharged. - * @member {number} creationQuotaTokensCharged - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.creationQuotaTokensCharged = 0; - - /** - * AudienceExport rowCount. - * @member {number|null|undefined} rowCount - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.rowCount = null; - - /** - * AudienceExport errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.errorMessage = null; - - /** - * AudienceExport percentageCompleted. - * @member {number|null|undefined} percentageCompleted - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - */ - AudienceExport.prototype.percentageCompleted = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceExport.prototype, "_state", { - get: $util.oneOfGetter($oneOfFields = ["state"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceExport.prototype, "_beginCreatingTime", { - get: $util.oneOfGetter($oneOfFields = ["beginCreatingTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceExport.prototype, "_rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceExport.prototype, "_errorMessage", { - get: $util.oneOfGetter($oneOfFields = ["errorMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AudienceExport.prototype, "_percentageCompleted", { - get: $util.oneOfGetter($oneOfFields = ["percentageCompleted"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AudienceExport instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {google.analytics.data.v1beta.IAudienceExport=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport instance - */ - AudienceExport.create = function create(properties) { - return new AudienceExport(properties); - }; - - /** - * Encodes the specified AudienceExport message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceExport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); - if (message.audienceDisplayName != null && Object.hasOwnProperty.call(message, "audienceDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.audienceDisplayName); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.analytics.data.v1beta.AudienceDimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.beginCreatingTime != null && Object.hasOwnProperty.call(message, "beginCreatingTime")) - $root.google.protobuf.Timestamp.encode(message.beginCreatingTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.creationQuotaTokensCharged != null && Object.hasOwnProperty.call(message, "creationQuotaTokensCharged")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creationQuotaTokensCharged); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.rowCount); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.errorMessage); - if (message.percentageCompleted != null && Object.hasOwnProperty.call(message, "percentageCompleted")) - writer.uint32(/* id 10, wireType 1 =*/81).double(message.percentageCompleted); - return writer; - }; - - /** - * Encodes the specified AudienceExport message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {google.analytics.data.v1beta.IAudienceExport} message AudienceExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceExport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceExport message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceExport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.audience = reader.string(); - break; - } - case 3: { - message.audienceDisplayName = reader.string(); - break; - } - case 4: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.analytics.data.v1beta.AudienceDimension.decode(reader, reader.uint32())); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.beginCreatingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.creationQuotaTokensCharged = reader.int32(); - break; - } - case 8: { - message.rowCount = reader.int32(); - break; - } - case 9: { - message.errorMessage = reader.string(); - break; - } - case 10: { - message.percentageCompleted = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceExport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceExport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceExport message. - * @function verify - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceExport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.audience != null && message.hasOwnProperty("audience")) - if (!$util.isString(message.audience)) - return "audience: string expected"; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - if (!$util.isString(message.audienceDisplayName)) - return "audienceDisplayName: string expected"; - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.analytics.data.v1beta.AudienceDimension.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) { - properties._state = 1; - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - properties._beginCreatingTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.beginCreatingTime); - if (error) - return "beginCreatingTime." + error; - } - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - if (!$util.isInteger(message.creationQuotaTokensCharged)) - return "creationQuotaTokensCharged: integer expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - properties._rowCount = 1; - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - properties._errorMessage = 1; - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - } - if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { - properties._percentageCompleted = 1; - if (typeof message.percentageCompleted !== "number") - return "percentageCompleted: number expected"; - } - return null; - }; - - /** - * Creates an AudienceExport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.AudienceExport} AudienceExport - */ - AudienceExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.AudienceExport) - return object; - var message = new $root.google.analytics.data.v1beta.AudienceExport(); - if (object.name != null) - message.name = String(object.name); - if (object.audience != null) - message.audience = String(object.audience); - if (object.audienceDisplayName != null) - message.audienceDisplayName = String(object.audienceDisplayName); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.AudienceExport.dimensions: object expected"); - message.dimensions[i] = $root.google.analytics.data.v1beta.AudienceDimension.fromObject(object.dimensions[i]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.beginCreatingTime != null) { - if (typeof object.beginCreatingTime !== "object") - throw TypeError(".google.analytics.data.v1beta.AudienceExport.beginCreatingTime: object expected"); - message.beginCreatingTime = $root.google.protobuf.Timestamp.fromObject(object.beginCreatingTime); - } - if (object.creationQuotaTokensCharged != null) - message.creationQuotaTokensCharged = object.creationQuotaTokensCharged | 0; - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.percentageCompleted != null) - message.percentageCompleted = Number(object.percentageCompleted); - return message; - }; - - /** - * Creates a plain object from an AudienceExport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {google.analytics.data.v1beta.AudienceExport} message AudienceExport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceExport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensions = []; - if (options.defaults) { - object.name = ""; - object.audience = ""; - object.audienceDisplayName = ""; - object.creationQuotaTokensCharged = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.audience != null && message.hasOwnProperty("audience")) - object.audience = message.audience; - if (message.audienceDisplayName != null && message.hasOwnProperty("audienceDisplayName")) - object.audienceDisplayName = message.audienceDisplayName; - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.analytics.data.v1beta.AudienceDimension.toObject(message.dimensions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) { - object.state = options.enums === String ? $root.google.analytics.data.v1beta.AudienceExport.State[message.state] === undefined ? message.state : $root.google.analytics.data.v1beta.AudienceExport.State[message.state] : message.state; - if (options.oneofs) - object._state = "state"; - } - if (message.beginCreatingTime != null && message.hasOwnProperty("beginCreatingTime")) { - object.beginCreatingTime = $root.google.protobuf.Timestamp.toObject(message.beginCreatingTime, options); - if (options.oneofs) - object._beginCreatingTime = "beginCreatingTime"; - } - if (message.creationQuotaTokensCharged != null && message.hasOwnProperty("creationQuotaTokensCharged")) - object.creationQuotaTokensCharged = message.creationQuotaTokensCharged; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - object.rowCount = message.rowCount; - if (options.oneofs) - object._rowCount = "rowCount"; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { - object.errorMessage = message.errorMessage; - if (options.oneofs) - object._errorMessage = "errorMessage"; - } - if (message.percentageCompleted != null && message.hasOwnProperty("percentageCompleted")) { - object.percentageCompleted = options.json && !isFinite(message.percentageCompleted) ? String(message.percentageCompleted) : message.percentageCompleted; - if (options.oneofs) - object._percentageCompleted = "percentageCompleted"; - } - return object; - }; - - /** - * Converts this AudienceExport to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.AudienceExport - * @instance - * @returns {Object.} JSON object - */ - AudienceExport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceExport - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.AudienceExport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExport"; - }; - - /** - * State enum. - * @name google.analytics.data.v1beta.AudienceExport.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} FAILED=3 FAILED value - */ - AudienceExport.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return AudienceExport; - })(); - - v1beta.AudienceExportMetadata = (function() { - - /** - * Properties of an AudienceExportMetadata. - * @memberof google.analytics.data.v1beta - * @interface IAudienceExportMetadata - */ - - /** - * Constructs a new AudienceExportMetadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an AudienceExportMetadata. - * @implements IAudienceExportMetadata - * @constructor - * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set - */ - function AudienceExportMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new AudienceExportMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {google.analytics.data.v1beta.IAudienceExportMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata instance - */ - AudienceExportMetadata.create = function create(properties) { - return new AudienceExportMetadata(properties); - }; - - /** - * Encodes the specified AudienceExportMetadata message. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceExportMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AudienceExportMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceExportMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {google.analytics.data.v1beta.IAudienceExportMetadata} message AudienceExportMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceExportMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceExportMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceExportMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceExportMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceExportMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceExportMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceExportMetadata message. - * @function verify - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceExportMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AudienceExportMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.AudienceExportMetadata} AudienceExportMetadata - */ - AudienceExportMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.AudienceExportMetadata) - return object; - return new $root.google.analytics.data.v1beta.AudienceExportMetadata(); - }; - - /** - * Creates a plain object from an AudienceExportMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {google.analytics.data.v1beta.AudienceExportMetadata} message AudienceExportMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceExportMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AudienceExportMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @instance - * @returns {Object.} JSON object - */ - AudienceExportMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceExportMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.AudienceExportMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceExportMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceExportMetadata"; - }; - - return AudienceExportMetadata; - })(); - - v1beta.QueryAudienceExportRequest = (function() { - - /** - * Properties of a QueryAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @interface IQueryAudienceExportRequest - * @property {string|null} [name] QueryAudienceExportRequest name - * @property {number|Long|null} [offset] QueryAudienceExportRequest offset - * @property {number|Long|null} [limit] QueryAudienceExportRequest limit - */ - - /** - * Constructs a new QueryAudienceExportRequest. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a QueryAudienceExportRequest. - * @implements IQueryAudienceExportRequest - * @constructor - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set - */ - function QueryAudienceExportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAudienceExportRequest name. - * @member {string} name - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @instance - */ - QueryAudienceExportRequest.prototype.name = ""; - - /** - * QueryAudienceExportRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @instance - */ - QueryAudienceExportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QueryAudienceExportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @instance - */ - QueryAudienceExportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new QueryAudienceExportRequest instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest instance - */ - QueryAudienceExportRequest.create = function create(properties) { - return new QueryAudienceExportRequest(properties); - }; - - /** - * Encodes the specified QueryAudienceExportRequest message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceExportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); - return writer; - }; - - /** - * Encodes the specified QueryAudienceExportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportRequest} message QueryAudienceExportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceExportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAudienceExportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceExportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.offset = reader.int64(); - break; - } - case 3: { - message.limit = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAudienceExportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceExportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAudienceExportRequest message. - * @function verify - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAudienceExportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryAudienceExportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.QueryAudienceExportRequest} QueryAudienceExportRequest - */ - QueryAudienceExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportRequest) - return object; - var message = new $root.google.analytics.data.v1beta.QueryAudienceExportRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryAudienceExportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {google.analytics.data.v1beta.QueryAudienceExportRequest} message QueryAudienceExportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAudienceExportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - return object; - }; - - /** - * Converts this QueryAudienceExportRequest to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAudienceExportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryAudienceExportRequest - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.QueryAudienceExportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryAudienceExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportRequest"; - }; - - return QueryAudienceExportRequest; - })(); - - v1beta.QueryAudienceExportResponse = (function() { - - /** - * Properties of a QueryAudienceExportResponse. - * @memberof google.analytics.data.v1beta - * @interface IQueryAudienceExportResponse - * @property {google.analytics.data.v1beta.IAudienceExport|null} [audienceExport] QueryAudienceExportResponse audienceExport - * @property {Array.|null} [audienceRows] QueryAudienceExportResponse audienceRows - * @property {number|null} [rowCount] QueryAudienceExportResponse rowCount - */ - - /** - * Constructs a new QueryAudienceExportResponse. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a QueryAudienceExportResponse. - * @implements IQueryAudienceExportResponse - * @constructor - * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set - */ - function QueryAudienceExportResponse(properties) { - this.audienceRows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAudienceExportResponse audienceExport. - * @member {google.analytics.data.v1beta.IAudienceExport|null|undefined} audienceExport - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @instance - */ - QueryAudienceExportResponse.prototype.audienceExport = null; - - /** - * QueryAudienceExportResponse audienceRows. - * @member {Array.} audienceRows - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @instance - */ - QueryAudienceExportResponse.prototype.audienceRows = $util.emptyArray; - - /** - * QueryAudienceExportResponse rowCount. - * @member {number|null|undefined} rowCount - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @instance - */ - QueryAudienceExportResponse.prototype.rowCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QueryAudienceExportResponse.prototype, "_audienceExport", { - get: $util.oneOfGetter($oneOfFields = ["audienceExport"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QueryAudienceExportResponse.prototype, "_rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new QueryAudienceExportResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse instance - */ - QueryAudienceExportResponse.create = function create(properties) { - return new QueryAudienceExportResponse(properties); - }; - - /** - * Encodes the specified QueryAudienceExportResponse message. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceExportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.audienceExport != null && Object.hasOwnProperty.call(message, "audienceExport")) - $root.google.analytics.data.v1beta.AudienceExport.encode(message.audienceExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.audienceRows != null && message.audienceRows.length) - for (var i = 0; i < message.audienceRows.length; ++i) - $root.google.analytics.data.v1beta.AudienceRow.encode(message.audienceRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); - return writer; - }; - - /** - * Encodes the specified QueryAudienceExportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QueryAudienceExportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {google.analytics.data.v1beta.IQueryAudienceExportResponse} message QueryAudienceExportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAudienceExportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAudienceExportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceExportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.audienceRows && message.audienceRows.length)) - message.audienceRows = []; - message.audienceRows.push($root.google.analytics.data.v1beta.AudienceRow.decode(reader, reader.uint32())); - break; - } - case 3: { - message.rowCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAudienceExportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAudienceExportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAudienceExportResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAudienceExportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { - properties._audienceExport = 1; - { - var error = $root.google.analytics.data.v1beta.AudienceExport.verify(message.audienceExport); - if (error) - return "audienceExport." + error; - } - } - if (message.audienceRows != null && message.hasOwnProperty("audienceRows")) { - if (!Array.isArray(message.audienceRows)) - return "audienceRows: array expected"; - for (var i = 0; i < message.audienceRows.length; ++i) { - var error = $root.google.analytics.data.v1beta.AudienceRow.verify(message.audienceRows[i]); - if (error) - return "audienceRows." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - properties._rowCount = 1; - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - } - return null; - }; - - /** - * Creates a QueryAudienceExportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.QueryAudienceExportResponse} QueryAudienceExportResponse - */ - QueryAudienceExportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.QueryAudienceExportResponse) - return object; - var message = new $root.google.analytics.data.v1beta.QueryAudienceExportResponse(); - if (object.audienceExport != null) { - if (typeof object.audienceExport !== "object") - throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceExport: object expected"); - message.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.fromObject(object.audienceExport); - } - if (object.audienceRows) { - if (!Array.isArray(object.audienceRows)) - throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: array expected"); - message.audienceRows = []; - for (var i = 0; i < object.audienceRows.length; ++i) { - if (typeof object.audienceRows[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.QueryAudienceExportResponse.audienceRows: object expected"); - message.audienceRows[i] = $root.google.analytics.data.v1beta.AudienceRow.fromObject(object.audienceRows[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - return message; - }; - - /** - * Creates a plain object from a QueryAudienceExportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {google.analytics.data.v1beta.QueryAudienceExportResponse} message QueryAudienceExportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAudienceExportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.audienceRows = []; - if (message.audienceExport != null && message.hasOwnProperty("audienceExport")) { - object.audienceExport = $root.google.analytics.data.v1beta.AudienceExport.toObject(message.audienceExport, options); - if (options.oneofs) - object._audienceExport = "audienceExport"; - } - if (message.audienceRows && message.audienceRows.length) { - object.audienceRows = []; - for (var j = 0; j < message.audienceRows.length; ++j) - object.audienceRows[j] = $root.google.analytics.data.v1beta.AudienceRow.toObject(message.audienceRows[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - object.rowCount = message.rowCount; - if (options.oneofs) - object._rowCount = "rowCount"; - } - return object; - }; - - /** - * Converts this QueryAudienceExportResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAudienceExportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryAudienceExportResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.QueryAudienceExportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryAudienceExportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.QueryAudienceExportResponse"; - }; - - return QueryAudienceExportResponse; - })(); - - v1beta.AudienceRow = (function() { - - /** - * Properties of an AudienceRow. - * @memberof google.analytics.data.v1beta - * @interface IAudienceRow - * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues - */ - - /** - * Constructs a new AudienceRow. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an AudienceRow. - * @implements IAudienceRow - * @constructor - * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set - */ - function AudienceRow(properties) { - this.dimensionValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceRow dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1beta.AudienceRow - * @instance - */ - AudienceRow.prototype.dimensionValues = $util.emptyArray; - - /** - * Creates a new AudienceRow instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {google.analytics.data.v1beta.IAudienceRow=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow instance - */ - AudienceRow.create = function create(properties) { - return new AudienceRow(properties); - }; - - /** - * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceRow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1beta.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceRow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {google.analytics.data.v1beta.IAudienceRow} message AudienceRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceRow message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceRow.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceRow(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1beta.AudienceDimensionValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceRow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceRow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceRow message. - * @function verify - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceRow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1beta.AudienceDimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - return null; - }; - - /** - * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.AudienceRow} AudienceRow - */ - AudienceRow.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.AudienceRow) - return object; - var message = new $root.google.analytics.data.v1beta.AudienceRow(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.AudienceRow.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1beta.AudienceDimensionValue.fromObject(object.dimensionValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {google.analytics.data.v1beta.AudienceRow} message AudienceRow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceRow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionValues = []; - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1beta.AudienceDimensionValue.toObject(message.dimensionValues[j], options); - } - return object; - }; - - /** - * Converts this AudienceRow to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.AudienceRow - * @instance - * @returns {Object.} JSON object - */ - AudienceRow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceRow - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.AudienceRow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceRow"; - }; - - return AudienceRow; - })(); - - v1beta.AudienceDimension = (function() { - - /** - * Properties of an AudienceDimension. - * @memberof google.analytics.data.v1beta - * @interface IAudienceDimension - * @property {string|null} [dimensionName] AudienceDimension dimensionName - */ - - /** - * Constructs a new AudienceDimension. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an AudienceDimension. - * @implements IAudienceDimension - * @constructor - * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set - */ - function AudienceDimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceDimension dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1beta.AudienceDimension - * @instance - */ - AudienceDimension.prototype.dimensionName = ""; - - /** - * Creates a new AudienceDimension instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {google.analytics.data.v1beta.IAudienceDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension instance - */ - AudienceDimension.create = function create(properties) { - return new AudienceDimension(properties); - }; - - /** - * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimension.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - return writer; - }; - - /** - * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimension.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {google.analytics.data.v1beta.IAudienceDimension} message AudienceDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimension.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimension(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceDimension message. - * @function verify - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceDimension.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; - - /** - * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.AudienceDimension} AudienceDimension - */ - AudienceDimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.AudienceDimension) - return object; - var message = new $root.google.analytics.data.v1beta.AudienceDimension(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; - - /** - * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {google.analytics.data.v1beta.AudienceDimension} message AudienceDimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceDimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - return object; - }; - - /** - * Converts this AudienceDimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.AudienceDimension - * @instance - * @returns {Object.} JSON object - */ - AudienceDimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceDimension - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.AudienceDimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimension"; - }; - - return AudienceDimension; - })(); - - v1beta.AudienceDimensionValue = (function() { - - /** - * Properties of an AudienceDimensionValue. - * @memberof google.analytics.data.v1beta - * @interface IAudienceDimensionValue - * @property {string|null} [value] AudienceDimensionValue value - */ - - /** - * Constructs a new AudienceDimensionValue. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an AudienceDimensionValue. - * @implements IAudienceDimensionValue - * @constructor - * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set - */ - function AudienceDimensionValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceDimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @instance - */ - AudienceDimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AudienceDimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @instance - */ - Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AudienceDimensionValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1beta.IAudienceDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue instance - */ - AudienceDimensionValue.create = function create(properties) { - return new AudienceDimensionValue(properties); - }; - - /** - * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.AudienceDimensionValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1beta.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimensionValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceDimensionValue message. - * @function verify - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceDimensionValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.AudienceDimensionValue} AudienceDimensionValue - */ - AudienceDimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.AudienceDimensionValue) - return object; - var message = new $root.google.analytics.data.v1beta.AudienceDimensionValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1beta.AudienceDimensionValue} message AudienceDimensionValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceDimensionValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this AudienceDimensionValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @instance - * @returns {Object.} JSON object - */ - AudienceDimensionValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceDimensionValue - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.AudienceDimensionValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.AudienceDimensionValue"; - }; - - return AudienceDimensionValue; - })(); - - v1beta.DateRange = (function() { - - /** - * Properties of a DateRange. - * @memberof google.analytics.data.v1beta - * @interface IDateRange - * @property {string|null} [startDate] DateRange startDate - * @property {string|null} [endDate] DateRange endDate - * @property {string|null} [name] DateRange name - */ - - /** - * Constructs a new DateRange. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DateRange. - * @implements IDateRange - * @constructor - * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set - */ - function DateRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DateRange startDate. - * @member {string} startDate - * @memberof google.analytics.data.v1beta.DateRange - * @instance - */ - DateRange.prototype.startDate = ""; - - /** - * DateRange endDate. - * @member {string} endDate - * @memberof google.analytics.data.v1beta.DateRange - * @instance - */ - DateRange.prototype.endDate = ""; - - /** - * DateRange name. - * @member {string} name - * @memberof google.analytics.data.v1beta.DateRange - * @instance - */ - DateRange.prototype.name = ""; - - /** - * Creates a new DateRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {google.analytics.data.v1beta.IDateRange=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DateRange} DateRange instance - */ - DateRange.create = function create(properties) { - return new DateRange(properties); - }; - - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DateRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {google.analytics.data.v1beta.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DateRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DateRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DateRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startDate = reader.string(); - break; - } - case 2: { - message.endDate = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DateRange message. - * @function verify - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DateRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startDate != null && message.hasOwnProperty("startDate")) - if (!$util.isString(message.startDate)) - return "startDate: string expected"; - if (message.endDate != null && message.hasOwnProperty("endDate")) - if (!$util.isString(message.endDate)) - return "endDate: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DateRange} DateRange - */ - DateRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DateRange) - return object; - var message = new $root.google.analytics.data.v1beta.DateRange(); - if (object.startDate != null) - message.startDate = String(object.startDate); - if (object.endDate != null) - message.endDate = String(object.endDate); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {google.analytics.data.v1beta.DateRange} message DateRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DateRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startDate = ""; - object.endDate = ""; - object.name = ""; - } - if (message.startDate != null && message.hasOwnProperty("startDate")) - object.startDate = message.startDate; - if (message.endDate != null && message.hasOwnProperty("endDate")) - object.endDate = message.endDate; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DateRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DateRange - * @instance - * @returns {Object.} JSON object - */ - DateRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DateRange - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DateRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DateRange"; - }; - - return DateRange; - })(); - - v1beta.MinuteRange = (function() { - - /** - * Properties of a MinuteRange. - * @memberof google.analytics.data.v1beta - * @interface IMinuteRange - * @property {number|null} [startMinutesAgo] MinuteRange startMinutesAgo - * @property {number|null} [endMinutesAgo] MinuteRange endMinutesAgo - * @property {string|null} [name] MinuteRange name - */ - - /** - * Constructs a new MinuteRange. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a MinuteRange. - * @implements IMinuteRange - * @constructor - * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set - */ - function MinuteRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MinuteRange startMinutesAgo. - * @member {number|null|undefined} startMinutesAgo - * @memberof google.analytics.data.v1beta.MinuteRange - * @instance - */ - MinuteRange.prototype.startMinutesAgo = null; - - /** - * MinuteRange endMinutesAgo. - * @member {number|null|undefined} endMinutesAgo - * @memberof google.analytics.data.v1beta.MinuteRange - * @instance - */ - MinuteRange.prototype.endMinutesAgo = null; - - /** - * MinuteRange name. - * @member {string} name - * @memberof google.analytics.data.v1beta.MinuteRange - * @instance - */ - MinuteRange.prototype.name = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MinuteRange.prototype, "_startMinutesAgo", { - get: $util.oneOfGetter($oneOfFields = ["startMinutesAgo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MinuteRange.prototype, "_endMinutesAgo", { - get: $util.oneOfGetter($oneOfFields = ["endMinutesAgo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MinuteRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {google.analytics.data.v1beta.IMinuteRange=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange instance - */ - MinuteRange.create = function create(properties) { - return new MinuteRange(properties); - }; - - /** - * Encodes the specified MinuteRange message. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinuteRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startMinutesAgo != null && Object.hasOwnProperty.call(message, "startMinutesAgo")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startMinutesAgo); - if (message.endMinutesAgo != null && Object.hasOwnProperty.call(message, "endMinutesAgo")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endMinutesAgo); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified MinuteRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MinuteRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {google.analytics.data.v1beta.IMinuteRange} message MinuteRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinuteRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MinuteRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinuteRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MinuteRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startMinutesAgo = reader.int32(); - break; - } - case 2: { - message.endMinutesAgo = reader.int32(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MinuteRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinuteRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MinuteRange message. - * @function verify - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MinuteRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { - properties._startMinutesAgo = 1; - if (!$util.isInteger(message.startMinutesAgo)) - return "startMinutesAgo: integer expected"; - } - if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { - properties._endMinutesAgo = 1; - if (!$util.isInteger(message.endMinutesAgo)) - return "endMinutesAgo: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a MinuteRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.MinuteRange} MinuteRange - */ - MinuteRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.MinuteRange) - return object; - var message = new $root.google.analytics.data.v1beta.MinuteRange(); - if (object.startMinutesAgo != null) - message.startMinutesAgo = object.startMinutesAgo | 0; - if (object.endMinutesAgo != null) - message.endMinutesAgo = object.endMinutesAgo | 0; - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a MinuteRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {google.analytics.data.v1beta.MinuteRange} message MinuteRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MinuteRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.startMinutesAgo != null && message.hasOwnProperty("startMinutesAgo")) { - object.startMinutesAgo = message.startMinutesAgo; - if (options.oneofs) - object._startMinutesAgo = "startMinutesAgo"; - } - if (message.endMinutesAgo != null && message.hasOwnProperty("endMinutesAgo")) { - object.endMinutesAgo = message.endMinutesAgo; - if (options.oneofs) - object._endMinutesAgo = "endMinutesAgo"; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this MinuteRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.MinuteRange - * @instance - * @returns {Object.} JSON object - */ - MinuteRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MinuteRange - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.MinuteRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MinuteRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.MinuteRange"; - }; - - return MinuteRange; - })(); - - v1beta.Dimension = (function() { - - /** - * Properties of a Dimension. - * @memberof google.analytics.data.v1beta - * @interface IDimension - * @property {string|null} [name] Dimension name - * @property {google.analytics.data.v1beta.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression - */ - - /** - * Constructs a new Dimension. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Dimension. - * @implements IDimension - * @constructor - * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set - */ - function Dimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Dimension name. - * @member {string} name - * @memberof google.analytics.data.v1beta.Dimension - * @instance - */ - Dimension.prototype.name = ""; - - /** - * Dimension dimensionExpression. - * @member {google.analytics.data.v1beta.IDimensionExpression|null|undefined} dimensionExpression - * @memberof google.analytics.data.v1beta.Dimension - * @instance - */ - Dimension.prototype.dimensionExpression = null; - - /** - * Creates a new Dimension instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {google.analytics.data.v1beta.IDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Dimension} Dimension instance - */ - Dimension.create = function create(properties) { - return new Dimension(properties); - }; - - /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dimension.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) - $root.google.analytics.data.v1beta.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Dimension.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {google.analytics.data.v1beta.IDimension} message Dimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dimension.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Dimension message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Dimension} Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dimension.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Dimension(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Dimension} Dimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Dimension message. - * @function verify - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Dimension.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { - var error = $root.google.analytics.data.v1beta.DimensionExpression.verify(message.dimensionExpression); - if (error) - return "dimensionExpression." + error; - } - return null; - }; - - /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Dimension} Dimension - */ - Dimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Dimension) - return object; - var message = new $root.google.analytics.data.v1beta.Dimension(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensionExpression != null) { - if (typeof object.dimensionExpression !== "object") - throw TypeError(".google.analytics.data.v1beta.Dimension.dimensionExpression: object expected"); - message.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.fromObject(object.dimensionExpression); - } - return message; - }; - - /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {google.analytics.data.v1beta.Dimension} message Dimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Dimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.dimensionExpression = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) - object.dimensionExpression = $root.google.analytics.data.v1beta.DimensionExpression.toObject(message.dimensionExpression, options); - return object; - }; - - /** - * Converts this Dimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Dimension - * @instance - * @returns {Object.} JSON object - */ - Dimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Dimension - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Dimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Dimension"; - }; - - return Dimension; - })(); - - v1beta.DimensionExpression = (function() { - - /** - * Properties of a DimensionExpression. - * @memberof google.analytics.data.v1beta - * @interface IDimensionExpression - * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase - * @property {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase - * @property {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate - */ - - /** - * Constructs a new DimensionExpression. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DimensionExpression. - * @implements IDimensionExpression - * @constructor - * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set - */ - function DimensionExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionExpression lowerCase. - * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} lowerCase - * @memberof google.analytics.data.v1beta.DimensionExpression - * @instance - */ - DimensionExpression.prototype.lowerCase = null; - - /** - * DimensionExpression upperCase. - * @member {google.analytics.data.v1beta.DimensionExpression.ICaseExpression|null|undefined} upperCase - * @memberof google.analytics.data.v1beta.DimensionExpression - * @instance - */ - DimensionExpression.prototype.upperCase = null; - - /** - * DimensionExpression concatenate. - * @member {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression|null|undefined} concatenate - * @memberof google.analytics.data.v1beta.DimensionExpression - * @instance - */ - DimensionExpression.prototype.concatenate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DimensionExpression oneExpression. - * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression - * @memberof google.analytics.data.v1beta.DimensionExpression - * @instance - */ - Object.defineProperty(DimensionExpression.prototype, "oneExpression", { - get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DimensionExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {google.analytics.data.v1beta.IDimensionExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression instance - */ - DimensionExpression.create = function create(properties) { - return new DimensionExpression(properties); - }; - - /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) - $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) - $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) - $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {google.analytics.data.v1beta.IDimensionExpression} message DimensionExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); - break; - } - case 5: { - message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); - break; - } - case 6: { - message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionExpression message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.lowerCase); - if (error) - return "lowerCase." + error; - } - } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify(message.upperCase); - if (error) - return "upperCase." + error; - } - } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify(message.concatenate); - if (error) - return "concatenate." + error; - } - } - return null; - }; - - /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionExpression} DimensionExpression - */ - DimensionExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionExpression(); - if (object.lowerCase != null) { - if (typeof object.lowerCase !== "object") - throw TypeError(".google.analytics.data.v1beta.DimensionExpression.lowerCase: object expected"); - message.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.lowerCase); - } - if (object.upperCase != null) { - if (typeof object.upperCase !== "object") - throw TypeError(".google.analytics.data.v1beta.DimensionExpression.upperCase: object expected"); - message.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.fromObject(object.upperCase); - } - if (object.concatenate != null) { - if (typeof object.concatenate !== "object") - throw TypeError(".google.analytics.data.v1beta.DimensionExpression.concatenate: object expected"); - message.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); - } - return message; - }; - - /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression} message DimensionExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - object.lowerCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); - if (options.oneofs) - object.oneExpression = "lowerCase"; - } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - object.upperCase = $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression.toObject(message.upperCase, options); - if (options.oneofs) - object.oneExpression = "upperCase"; - } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - object.concatenate = $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); - if (options.oneofs) - object.oneExpression = "concatenate"; - } - return object; - }; - - /** - * Converts this DimensionExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionExpression - * @instance - * @returns {Object.} JSON object - */ - DimensionExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression"; - }; - - DimensionExpression.CaseExpression = (function() { - - /** - * Properties of a CaseExpression. - * @memberof google.analytics.data.v1beta.DimensionExpression - * @interface ICaseExpression - * @property {string|null} [dimensionName] CaseExpression dimensionName - */ - - /** - * Constructs a new CaseExpression. - * @memberof google.analytics.data.v1beta.DimensionExpression - * @classdesc Represents a CaseExpression. - * @implements ICaseExpression - * @constructor - * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set - */ - function CaseExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CaseExpression dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @instance - */ - CaseExpression.prototype.dimensionName = ""; - - /** - * Creates a new CaseExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression instance - */ - CaseExpression.create = function create(properties) { - return new CaseExpression(properties); - }; - - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - return writer; - }; - - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseExpression message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; - - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionExpression.CaseExpression} CaseExpression - */ - CaseExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; - - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.CaseExpression} message CaseExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - return object; - }; - - /** - * Converts this CaseExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @instance - * @returns {Object.} JSON object - */ - CaseExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CaseExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionExpression.CaseExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.CaseExpression"; - }; - - return CaseExpression; - })(); - - DimensionExpression.ConcatenateExpression = (function() { - - /** - * Properties of a ConcatenateExpression. - * @memberof google.analytics.data.v1beta.DimensionExpression - * @interface IConcatenateExpression - * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames - * @property {string|null} [delimiter] ConcatenateExpression delimiter - */ - - /** - * Constructs a new ConcatenateExpression. - * @memberof google.analytics.data.v1beta.DimensionExpression - * @classdesc Represents a ConcatenateExpression. - * @implements IConcatenateExpression - * @constructor - * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - */ - function ConcatenateExpression(properties) { - this.dimensionNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConcatenateExpression dimensionNames. - * @member {Array.} dimensionNames - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; - - /** - * ConcatenateExpression delimiter. - * @member {string} delimiter - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.delimiter = ""; - - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance - */ - ConcatenateExpression.create = function create(properties) { - return new ConcatenateExpression(properties); - }; - - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionNames != null && message.dimensionNames.length) - for (var i = 0; i < message.dimensionNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - return writer; - }; - - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionNames && message.dimensionNames.length)) - message.dimensionNames = []; - message.dimensionNames.push(reader.string()); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConcatenateExpression message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConcatenateExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { - if (!Array.isArray(message.dimensionNames)) - return "dimensionNames: array expected"; - for (var i = 0; i < message.dimensionNames.length; ++i) - if (!$util.isString(message.dimensionNames[i])) - return "dimensionNames: string[] expected"; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - return null; - }; - - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} ConcatenateExpression - */ - ConcatenateExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); - if (object.dimensionNames) { - if (!Array.isArray(object.dimensionNames)) - throw TypeError(".google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); - message.dimensionNames = []; - for (var i = 0; i < object.dimensionNames.length; ++i) - message.dimensionNames[i] = String(object.dimensionNames[i]); - } - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - return message; - }; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} message ConcatenateExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcatenateExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionNames = []; - if (options.defaults) - object.delimiter = ""; - if (message.dimensionNames && message.dimensionNames.length) { - object.dimensionNames = []; - for (var j = 0; j < message.dimensionNames.length; ++j) - object.dimensionNames[j] = message.dimensionNames[j]; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - return object; - }; - - /** - * Converts this ConcatenateExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @instance - * @returns {Object.} JSON object - */ - ConcatenateExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConcatenateExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression"; - }; - - return ConcatenateExpression; - })(); - - return DimensionExpression; - })(); - - v1beta.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.analytics.data.v1beta - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {string|null} [expression] Metric expression - * @property {boolean|null} [invisible] Metric invisible - */ - - /** - * Constructs a new Metric. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric name. - * @member {string} name - * @memberof google.analytics.data.v1beta.Metric - * @instance - */ - Metric.prototype.name = ""; - - /** - * Metric expression. - * @member {string} expression - * @memberof google.analytics.data.v1beta.Metric - * @instance - */ - Metric.prototype.expression = ""; - - /** - * Metric invisible. - * @member {boolean} invisible - * @memberof google.analytics.data.v1beta.Metric - * @instance - */ - Metric.prototype.invisible = false; - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {google.analytics.data.v1beta.IMetric=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); - if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {google.analytics.data.v1beta.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.expression = reader.string(); - break; - } - case 3: { - message.invisible = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.invisible != null && message.hasOwnProperty("invisible")) - if (typeof message.invisible !== "boolean") - return "invisible: boolean expected"; - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Metric) - return object; - var message = new $root.google.analytics.data.v1beta.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.expression != null) - message.expression = String(object.expression); - if (object.invisible != null) - message.invisible = Boolean(object.invisible); - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {google.analytics.data.v1beta.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.expression = ""; - object.invisible = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.invisible != null && message.hasOwnProperty("invisible")) - object.invisible = message.invisible; - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Metric"; - }; - - return Metric; - })(); - - v1beta.Comparison = (function() { - - /** - * Properties of a Comparison. - * @memberof google.analytics.data.v1beta - * @interface IComparison - * @property {string|null} [name] Comparison name - * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter - * @property {string|null} [comparison] Comparison comparison - */ - - /** - * Constructs a new Comparison. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Comparison. - * @implements IComparison - * @constructor - * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set - */ - function Comparison(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Comparison name. - * @member {string|null|undefined} name - * @memberof google.analytics.data.v1beta.Comparison - * @instance - */ - Comparison.prototype.name = null; - - /** - * Comparison dimensionFilter. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1beta.Comparison - * @instance - */ - Comparison.prototype.dimensionFilter = null; - - /** - * Comparison comparison. - * @member {string|null|undefined} comparison - * @memberof google.analytics.data.v1beta.Comparison - * @instance - */ - Comparison.prototype.comparison = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Comparison.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Comparison oneComparison. - * @member {"dimensionFilter"|"comparison"|undefined} oneComparison - * @memberof google.analytics.data.v1beta.Comparison - * @instance - */ - Object.defineProperty(Comparison.prototype, "oneComparison", { - get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Comparison instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Comparison} Comparison instance - */ - Comparison.create = function create(properties) { - return new Comparison(properties); - }; - - /** - * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Comparison.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); - return writer; - }; - - /** - * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Comparison.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Comparison message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Comparison} Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Comparison.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Comparison(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 3: { - message.comparison = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Comparison message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Comparison} Comparison - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Comparison.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Comparison message. - * @function verify - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Comparison.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - properties.oneComparison = 1; - { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter); - if (error) - return "dimensionFilter." + error; - } - } - if (message.comparison != null && message.hasOwnProperty("comparison")) { - if (properties.oneComparison === 1) - return "oneComparison: multiple values"; - properties.oneComparison = 1; - if (!$util.isString(message.comparison)) - return "comparison: string expected"; - } - return null; - }; - - /** - * Creates a Comparison message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Comparison} Comparison - */ - Comparison.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Comparison) - return object; - var message = new $root.google.analytics.data.v1beta.Comparison(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Comparison.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter); - } - if (object.comparison != null) - message.comparison = String(object.comparison); - return message; - }; - - /** - * Creates a plain object from a Comparison message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {google.analytics.data.v1beta.Comparison} message Comparison - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Comparison.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options); - if (options.oneofs) - object.oneComparison = "dimensionFilter"; - } - if (message.comparison != null && message.hasOwnProperty("comparison")) { - object.comparison = message.comparison; - if (options.oneofs) - object.oneComparison = "comparison"; - } - return object; - }; - - /** - * Converts this Comparison to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Comparison - * @instance - * @returns {Object.} JSON object - */ - Comparison.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Comparison - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Comparison - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Comparison"; - }; - - return Comparison; - })(); - - v1beta.FilterExpression = (function() { - - /** - * Properties of a FilterExpression. - * @memberof google.analytics.data.v1beta - * @interface IFilterExpression - * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [andGroup] FilterExpression andGroup - * @property {google.analytics.data.v1beta.IFilterExpressionList|null} [orGroup] FilterExpression orGroup - * @property {google.analytics.data.v1beta.IFilterExpression|null} [notExpression] FilterExpression notExpression - * @property {google.analytics.data.v1beta.IFilter|null} [filter] FilterExpression filter - */ - - /** - * Constructs a new FilterExpression. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a FilterExpression. - * @implements IFilterExpression - * @constructor - * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set - */ - function FilterExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterExpression andGroup. - * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - */ - FilterExpression.prototype.andGroup = null; - - /** - * FilterExpression orGroup. - * @member {google.analytics.data.v1beta.IFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - */ - FilterExpression.prototype.orGroup = null; - - /** - * FilterExpression notExpression. - * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - */ - FilterExpression.prototype.notExpression = null; - - /** - * FilterExpression filter. - * @member {google.analytics.data.v1beta.IFilter|null|undefined} filter - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - */ - FilterExpression.prototype.filter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - */ - Object.defineProperty(FilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FilterExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {google.analytics.data.v1beta.IFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression instance - */ - FilterExpression.create = function create(properties) { - return new FilterExpression(properties); - }; - - /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1beta.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.analytics.data.v1beta.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {google.analytics.data.v1beta.IFilterExpression} message FilterExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filter = $root.google.analytics.data.v1beta.Filter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterExpression message. - * @function verify - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1beta.FilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.filter != null && message.hasOwnProperty("filter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - } - return null; - }; - - /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.FilterExpression} FilterExpression - */ - FilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.FilterExpression) - return object; - var message = new $root.google.analytics.data.v1beta.FilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1beta.FilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1beta.FilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1beta.FilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.notExpression); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.analytics.data.v1beta.FilterExpression.filter: object expected"); - message.filter = $root.google.analytics.data.v1beta.Filter.fromObject(object.filter); - } - return message; - }; - - /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {google.analytics.data.v1beta.FilterExpression} message FilterExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1beta.FilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = $root.google.analytics.data.v1beta.Filter.toObject(message.filter, options); - if (options.oneofs) - object.expr = "filter"; - } - return object; - }; - - /** - * Converts this FilterExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.FilterExpression - * @instance - * @returns {Object.} JSON object - */ - FilterExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FilterExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.FilterExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpression"; - }; - - return FilterExpression; - })(); - - v1beta.FilterExpressionList = (function() { - - /** - * Properties of a FilterExpressionList. - * @memberof google.analytics.data.v1beta - * @interface IFilterExpressionList - * @property {Array.|null} [expressions] FilterExpressionList expressions - */ - - /** - * Constructs a new FilterExpressionList. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a FilterExpressionList. - * @implements IFilterExpressionList - * @constructor - * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set - */ - function FilterExpressionList(properties) { - this.expressions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @instance - */ - FilterExpressionList.prototype.expressions = $util.emptyArray; - - /** - * Creates a new FilterExpressionList instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {google.analytics.data.v1beta.IFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList instance - */ - FilterExpressionList.create = function create(properties) { - return new FilterExpressionList(properties); - }; - - /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpressionList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1beta.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.FilterExpressionList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {google.analytics.data.v1beta.IFilterExpressionList} message FilterExpressionList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpressionList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.FilterExpressionList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterExpressionList message. - * @function verify - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterExpressionList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } - } - return null; - }; - - /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.FilterExpressionList} FilterExpressionList - */ - FilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.FilterExpressionList) - return object; - var message = new $root.google.analytics.data.v1beta.FilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.FilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.expressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {google.analytics.data.v1beta.FilterExpressionList} message FilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.expressions[j], options); - } - return object; - }; - - /** - * Converts this FilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - FilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.FilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.FilterExpressionList"; - }; - - return FilterExpressionList; - })(); - - v1beta.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof google.analytics.data.v1beta - * @interface IFilter - * @property {string|null} [fieldName] Filter fieldName - * @property {google.analytics.data.v1beta.Filter.IStringFilter|null} [stringFilter] Filter stringFilter - * @property {google.analytics.data.v1beta.Filter.IInListFilter|null} [inListFilter] Filter inListFilter - * @property {google.analytics.data.v1beta.Filter.INumericFilter|null} [numericFilter] Filter numericFilter - * @property {google.analytics.data.v1beta.Filter.IBetweenFilter|null} [betweenFilter] Filter betweenFilter - * @property {google.analytics.data.v1beta.Filter.IEmptyFilter|null} [emptyFilter] Filter emptyFilter - */ - - /** - * Constructs a new Filter. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.fieldName = ""; - - /** - * Filter stringFilter. - * @member {google.analytics.data.v1beta.Filter.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.stringFilter = null; - - /** - * Filter inListFilter. - * @member {google.analytics.data.v1beta.Filter.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.inListFilter = null; - - /** - * Filter numericFilter. - * @member {google.analytics.data.v1beta.Filter.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.numericFilter = null; - - /** - * Filter betweenFilter. - * @member {google.analytics.data.v1beta.Filter.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.betweenFilter = null; - - /** - * Filter emptyFilter. - * @member {google.analytics.data.v1beta.Filter.IEmptyFilter|null|undefined} emptyFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Filter.prototype.emptyFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Filter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1beta.Filter - * @instance - */ - Object.defineProperty(Filter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {google.analytics.data.v1beta.IFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1beta.Filter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1beta.Filter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1beta.Filter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1beta.Filter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) - $root.google.analytics.data.v1beta.Filter.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {google.analytics.data.v1beta.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 3: { - message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.decode(reader, reader.uint32()); - break; - } - case 8: { - message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } - } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1beta.Filter.EmptyFilter.verify(message.emptyFilter); - if (error) - return "emptyFilter." + error; - } - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter) - return object; - var message = new $root.google.analytics.data.v1beta.Filter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.fromObject(object.betweenFilter); - } - if (object.emptyFilter != null) { - if (typeof object.emptyFilter !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.emptyFilter: object expected"); - message.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.fromObject(object.emptyFilter); - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {google.analytics.data.v1beta.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1beta.Filter.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1beta.Filter.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1beta.Filter.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1beta.Filter.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; - } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - object.emptyFilter = $root.google.analytics.data.v1beta.Filter.EmptyFilter.toObject(message.emptyFilter, options); - if (options.oneofs) - object.oneFilter = "emptyFilter"; - } - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter"; - }; - - Filter.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.data.v1beta.Filter - * @interface IStringFilter - * @property {google.analytics.data.v1beta.Filter.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ - - /** - * Constructs a new StringFilter. - * @memberof google.analytics.data.v1beta.Filter - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set - */ - function StringFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringFilter matchType. - * @member {google.analytics.data.v1beta.Filter.StringFilter.MatchType} matchType - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; - - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; - - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; - - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter.StringFilter) - return object; - var message = new $root.google.analytics.data.v1beta.Filter.StringFilter(); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "BEGINS_WITH": - case 2: - message.matchType = 2; - break; - case "ENDS_WITH": - case 3: - message.matchType = 3; - break; - case "CONTAINS": - case 4: - message.matchType = 4; - break; - case "FULL_REGEXP": - case 5: - message.matchType = 5; - break; - case "PARTIAL_REGEXP": - case 6: - message.matchType = 6; - break; - } - if (object.value != null) - message.value = String(object.value); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {google.analytics.data.v1beta.Filter.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1beta.Filter.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.StringFilter"; - }; - - /** - * MatchType enum. - * @name google.analytics.data.v1beta.Filter.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BEGINS_WITH=2 BEGINS_WITH value - * @property {number} ENDS_WITH=3 ENDS_WITH value - * @property {number} CONTAINS=4 CONTAINS value - * @property {number} FULL_REGEXP=5 FULL_REGEXP value - * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BEGINS_WITH"] = 2; - values[valuesById[3] = "ENDS_WITH"] = 3; - values[valuesById[4] = "CONTAINS"] = 4; - values[valuesById[5] = "FULL_REGEXP"] = 5; - values[valuesById[6] = "PARTIAL_REGEXP"] = 6; - return values; - })(); - - return StringFilter; - })(); - - Filter.InListFilter = (function() { - - /** - * Properties of an InListFilter. - * @memberof google.analytics.data.v1beta.Filter - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ - - /** - * Constructs a new InListFilter. - * @memberof google.analytics.data.v1beta.Filter - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set - */ - function InListFilter(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; - - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; - - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; - - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 2: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter.InListFilter) - return object; - var message = new $root.google.analytics.data.v1beta.Filter.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.data.v1beta.Filter.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {google.analytics.data.v1beta.Filter.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.InListFilter"; - }; - - return InListFilter; - })(); - - Filter.NumericFilter = (function() { - - /** - * Properties of a NumericFilter. - * @memberof google.analytics.data.v1beta.Filter - * @interface INumericFilter - * @property {google.analytics.data.v1beta.Filter.NumericFilter.Operation|null} [operation] NumericFilter operation - * @property {google.analytics.data.v1beta.INumericValue|null} [value] NumericFilter value - */ - - /** - * Constructs a new NumericFilter. - * @memberof google.analytics.data.v1beta.Filter - * @classdesc Represents a NumericFilter. - * @implements INumericFilter - * @constructor - * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set - */ - function NumericFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NumericFilter operation. - * @member {google.analytics.data.v1beta.Filter.NumericFilter.Operation} operation - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @instance - */ - NumericFilter.prototype.operation = 0; - - /** - * NumericFilter value. - * @member {google.analytics.data.v1beta.INumericValue|null|undefined} value - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @instance - */ - NumericFilter.prototype.value = null; - - /** - * Creates a new NumericFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {google.analytics.data.v1beta.Filter.INumericFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter instance - */ - NumericFilter.create = function create(properties) { - return new NumericFilter(properties); - }; - - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.analytics.data.v1beta.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.NumericFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {google.analytics.data.v1beta.Filter.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.operation = reader.int32(); - break; - } - case 2: { - message.value = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NumericFilter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter.NumericFilter} NumericFilter - */ - NumericFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter.NumericFilter) - return object; - var message = new $root.google.analytics.data.v1beta.Filter.NumericFilter(); - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; - break; - } - break; - case "OPERATION_UNSPECIFIED": - case 0: - message.operation = 0; - break; - case "EQUAL": - case 1: - message.operation = 1; - break; - case "LESS_THAN": - case 2: - message.operation = 2; - break; - case "LESS_THAN_OR_EQUAL": - case 3: - message.operation = 3; - break; - case "GREATER_THAN": - case 4: - message.operation = 4; - break; - case "GREATER_THAN_OR_EQUAL": - case 5: - message.operation = 5; - break; - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.NumericFilter.value: object expected"); - message.value = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {google.analytics.data.v1beta.Filter.NumericFilter} message NumericFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.value = null; - } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1beta.Filter.NumericFilter.Operation[message.operation] : message.operation; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.analytics.data.v1beta.NumericValue.toObject(message.value, options); - return object; - }; - - /** - * Converts this NumericFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @instance - * @returns {Object.} JSON object - */ - NumericFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NumericFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter.NumericFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.NumericFilter"; - }; - - /** - * Operation enum. - * @name google.analytics.data.v1beta.Filter.NumericFilter.Operation - * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} EQUAL=1 EQUAL value - * @property {number} LESS_THAN=2 LESS_THAN value - * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value - * @property {number} GREATER_THAN=4 GREATER_THAN value - * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value - */ - NumericFilter.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EQUAL"] = 1; - values[valuesById[2] = "LESS_THAN"] = 2; - values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; - values[valuesById[4] = "GREATER_THAN"] = 4; - values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; - return values; - })(); - - return NumericFilter; - })(); - - Filter.BetweenFilter = (function() { - - /** - * Properties of a BetweenFilter. - * @memberof google.analytics.data.v1beta.Filter - * @interface IBetweenFilter - * @property {google.analytics.data.v1beta.INumericValue|null} [fromValue] BetweenFilter fromValue - * @property {google.analytics.data.v1beta.INumericValue|null} [toValue] BetweenFilter toValue - */ - - /** - * Constructs a new BetweenFilter. - * @memberof google.analytics.data.v1beta.Filter - * @classdesc Represents a BetweenFilter. - * @implements IBetweenFilter - * @constructor - * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set - */ - function BetweenFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BetweenFilter fromValue. - * @member {google.analytics.data.v1beta.INumericValue|null|undefined} fromValue - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @instance - */ - BetweenFilter.prototype.fromValue = null; - - /** - * BetweenFilter toValue. - * @member {google.analytics.data.v1beta.INumericValue|null|undefined} toValue - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @instance - */ - BetweenFilter.prototype.toValue = null; - - /** - * Creates a new BetweenFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IBetweenFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter instance - */ - BetweenFilter.create = function create(properties) { - return new BetweenFilter(properties); - }; - - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) - $root.google.analytics.data.v1beta.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) - $root.google.analytics.data.v1beta.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.BetweenFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fromValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.toValue = $root.google.analytics.data.v1beta.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BetweenFilter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BetweenFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fromValue != null && message.hasOwnProperty("fromValue")) { - var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.fromValue); - if (error) - return "fromValue." + error; - } - if (message.toValue != null && message.hasOwnProperty("toValue")) { - var error = $root.google.analytics.data.v1beta.NumericValue.verify(message.toValue); - if (error) - return "toValue." + error; - } - return null; - }; - - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter.BetweenFilter} BetweenFilter - */ - BetweenFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter.BetweenFilter) - return object; - var message = new $root.google.analytics.data.v1beta.Filter.BetweenFilter(); - if (object.fromValue != null) { - if (typeof object.fromValue !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.fromValue: object expected"); - message.fromValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.fromValue); - } - if (object.toValue != null) { - if (typeof object.toValue !== "object") - throw TypeError(".google.analytics.data.v1beta.Filter.BetweenFilter.toValue: object expected"); - message.toValue = $root.google.analytics.data.v1beta.NumericValue.fromObject(object.toValue); - } - return message; - }; - - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {google.analytics.data.v1beta.Filter.BetweenFilter} message BetweenFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BetweenFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fromValue = null; - object.toValue = null; - } - if (message.fromValue != null && message.hasOwnProperty("fromValue")) - object.fromValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.fromValue, options); - if (message.toValue != null && message.hasOwnProperty("toValue")) - object.toValue = $root.google.analytics.data.v1beta.NumericValue.toObject(message.toValue, options); - return object; - }; - - /** - * Converts this BetweenFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @instance - * @returns {Object.} JSON object - */ - BetweenFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BetweenFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter.BetweenFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.BetweenFilter"; - }; - - return BetweenFilter; - })(); - - Filter.EmptyFilter = (function() { - - /** - * Properties of an EmptyFilter. - * @memberof google.analytics.data.v1beta.Filter - * @interface IEmptyFilter - */ - - /** - * Constructs a new EmptyFilter. - * @memberof google.analytics.data.v1beta.Filter - * @classdesc Represents an EmptyFilter. - * @implements IEmptyFilter - * @constructor - * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set - */ - function EmptyFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new EmptyFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IEmptyFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter instance - */ - EmptyFilter.create = function create(properties) { - return new EmptyFilter(properties); - }; - - /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmptyFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Filter.EmptyFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {google.analytics.data.v1beta.Filter.IEmptyFilter} message EmptyFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmptyFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmptyFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EmptyFilter message. - * @function verify - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EmptyFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Filter.EmptyFilter} EmptyFilter - */ - EmptyFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Filter.EmptyFilter) - return object; - return new $root.google.analytics.data.v1beta.Filter.EmptyFilter(); - }; - - /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {google.analytics.data.v1beta.Filter.EmptyFilter} message EmptyFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EmptyFilter.toObject = function toObject() { - return {}; - }; - - /** - * Converts this EmptyFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @instance - * @returns {Object.} JSON object - */ - EmptyFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EmptyFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Filter.EmptyFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Filter.EmptyFilter"; - }; - - return EmptyFilter; - })(); - - return Filter; - })(); - - v1beta.OrderBy = (function() { - - /** - * Properties of an OrderBy. - * @memberof google.analytics.data.v1beta - * @interface IOrderBy - * @property {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric - * @property {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension - * @property {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null} [pivot] OrderBy pivot - * @property {boolean|null} [desc] OrderBy desc - */ - - /** - * Constructs a new OrderBy. - * @memberof google.analytics.data.v1beta - * @classdesc Represents an OrderBy. - * @implements IOrderBy - * @constructor - * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set - */ - function OrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OrderBy metric. - * @member {google.analytics.data.v1beta.OrderBy.IMetricOrderBy|null|undefined} metric - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - */ - OrderBy.prototype.metric = null; - - /** - * OrderBy dimension. - * @member {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy|null|undefined} dimension - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - */ - OrderBy.prototype.dimension = null; - - /** - * OrderBy pivot. - * @member {google.analytics.data.v1beta.OrderBy.IPivotOrderBy|null|undefined} pivot - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - */ - OrderBy.prototype.pivot = null; - - /** - * OrderBy desc. - * @member {boolean} desc - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - */ - OrderBy.prototype.desc = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OrderBy oneOrderBy. - * @member {"metric"|"dimension"|"pivot"|undefined} oneOrderBy - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - */ - Object.defineProperty(OrderBy.prototype, "oneOrderBy", { - get: $util.oneOfGetter($oneOfFields = ["metric", "dimension", "pivot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {google.analytics.data.v1beta.IOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.OrderBy} OrderBy instance - */ - OrderBy.create = function create(properties) { - return new OrderBy(properties); - }; - - /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pivot != null && Object.hasOwnProperty.call(message, "pivot")) - $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.encode(message.pivot, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); - return writer; - }; - - /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {google.analytics.data.v1beta.IOrderBy} message OrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.OrderBy} OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.decode(reader, reader.uint32()); - break; - } - case 4: { - message.desc = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.OrderBy} OrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OrderBy message. - * @function verify - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metric != null && message.hasOwnProperty("metric")) { - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify(message.metric); - if (error) - return "metric." + error; - } - } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - if (properties.oneOrderBy === 1) - return "oneOrderBy: multiple values"; - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify(message.dimension); - if (error) - return "dimension." + error; - } - } - if (message.pivot != null && message.hasOwnProperty("pivot")) { - if (properties.oneOrderBy === 1) - return "oneOrderBy: multiple values"; - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify(message.pivot); - if (error) - return "pivot." + error; - } - } - if (message.desc != null && message.hasOwnProperty("desc")) - if (typeof message.desc !== "boolean") - return "desc: boolean expected"; - return null; - }; - - /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.OrderBy} OrderBy - */ - OrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.OrderBy) - return object; - var message = new $root.google.analytics.data.v1beta.OrderBy(); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.analytics.data.v1beta.OrderBy.metric: object expected"); - message.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.fromObject(object.metric); - } - if (object.dimension != null) { - if (typeof object.dimension !== "object") - throw TypeError(".google.analytics.data.v1beta.OrderBy.dimension: object expected"); - message.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.fromObject(object.dimension); - } - if (object.pivot != null) { - if (typeof object.pivot !== "object") - throw TypeError(".google.analytics.data.v1beta.OrderBy.pivot: object expected"); - message.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.fromObject(object.pivot); - } - if (object.desc != null) - message.desc = Boolean(object.desc); - return message; - }; - - /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy} message OrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.desc = false; - if (message.metric != null && message.hasOwnProperty("metric")) { - object.metric = $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy.toObject(message.metric, options); - if (options.oneofs) - object.oneOrderBy = "metric"; - } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - object.dimension = $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.toObject(message.dimension, options); - if (options.oneofs) - object.oneOrderBy = "dimension"; - } - if (message.pivot != null && message.hasOwnProperty("pivot")) { - object.pivot = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.toObject(message.pivot, options); - if (options.oneofs) - object.oneOrderBy = "pivot"; - } - if (message.desc != null && message.hasOwnProperty("desc")) - object.desc = message.desc; - return object; - }; - - /** - * Converts this OrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.OrderBy - * @instance - * @returns {Object.} JSON object - */ - OrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.OrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy"; - }; - - OrderBy.MetricOrderBy = (function() { - - /** - * Properties of a MetricOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @interface IMetricOrderBy - * @property {string|null} [metricName] MetricOrderBy metricName - */ - - /** - * Constructs a new MetricOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @classdesc Represents a MetricOrderBy. - * @implements IMetricOrderBy - * @constructor - * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set - */ - function MetricOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricOrderBy metricName. - * @member {string} metricName - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @instance - */ - MetricOrderBy.prototype.metricName = ""; - - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy instance - */ - MetricOrderBy.create = function create(properties) { - return new MetricOrderBy(properties); - }; - - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - return writer; - }; - - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricOrderBy message. - * @function verify - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; - - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.OrderBy.MetricOrderBy} MetricOrderBy - */ - MetricOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy) - return object; - var message = new $root.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; - - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.MetricOrderBy} message MetricOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; - - /** - * Converts this MetricOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @instance - * @returns {Object.} JSON object - */ - MetricOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.OrderBy.MetricOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.MetricOrderBy"; - }; - - return MetricOrderBy; - })(); - - OrderBy.DimensionOrderBy = (function() { - - /** - * Properties of a DimensionOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @interface IDimensionOrderBy - * @property {string|null} [dimensionName] DimensionOrderBy dimensionName - * @property {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType - */ - - /** - * Constructs a new DimensionOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @classdesc Represents a DimensionOrderBy. - * @implements IDimensionOrderBy - * @constructor - * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set - */ - function DimensionOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionOrderBy dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.dimensionName = ""; - - /** - * DimensionOrderBy orderType. - * @member {google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType} orderType - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.orderType = 0; - - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy instance - */ - DimensionOrderBy.create = function create(properties) { - return new DimensionOrderBy(properties); - }; - - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); - return writer; - }; - - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - case 2: { - message.orderType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionOrderBy message. - * @function verify - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - if (message.orderType != null && message.hasOwnProperty("orderType")) - switch (message.orderType) { - default: - return "orderType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} DimensionOrderBy - */ - DimensionOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) - return object; - var message = new $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - switch (object.orderType) { - default: - if (typeof object.orderType === "number") { - message.orderType = object.orderType; - break; - } - break; - case "ORDER_TYPE_UNSPECIFIED": - case 0: - message.orderType = 0; - break; - case "ALPHANUMERIC": - case 1: - message.orderType = 1; - break; - case "CASE_INSENSITIVE_ALPHANUMERIC": - case 2: - message.orderType = 2; - break; - case "NUMERIC": - case 3: - message.orderType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.DimensionOrderBy} message DimensionOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimensionName = ""; - object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; - } - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - if (message.orderType != null && message.hasOwnProperty("orderType")) - object.orderType = options.enums === String ? $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; - return object; - }; - - /** - * Converts this DimensionOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @instance - * @returns {Object.} JSON object - */ - DimensionOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.OrderBy.DimensionOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.DimensionOrderBy"; - }; - - /** - * OrderType enum. - * @name google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType - * @enum {number} - * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value - * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value - * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value - * @property {number} NUMERIC=3 NUMERIC value - */ - DimensionOrderBy.OrderType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALPHANUMERIC"] = 1; - values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; - values[valuesById[3] = "NUMERIC"] = 3; - return values; - })(); - - return DimensionOrderBy; - })(); - - OrderBy.PivotOrderBy = (function() { - - /** - * Properties of a PivotOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @interface IPivotOrderBy - * @property {string|null} [metricName] PivotOrderBy metricName - * @property {Array.|null} [pivotSelections] PivotOrderBy pivotSelections - */ - - /** - * Constructs a new PivotOrderBy. - * @memberof google.analytics.data.v1beta.OrderBy - * @classdesc Represents a PivotOrderBy. - * @implements IPivotOrderBy - * @constructor - * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set - */ - function PivotOrderBy(properties) { - this.pivotSelections = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PivotOrderBy metricName. - * @member {string} metricName - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @instance - */ - PivotOrderBy.prototype.metricName = ""; - - /** - * PivotOrderBy pivotSelections. - * @member {Array.} pivotSelections - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @instance - */ - PivotOrderBy.prototype.pivotSelections = $util.emptyArray; - - /** - * Creates a new PivotOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy instance - */ - PivotOrderBy.create = function create(properties) { - return new PivotOrderBy(properties); - }; - - /** - * Encodes the specified PivotOrderBy message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.pivotSelections != null && message.pivotSelections.length) - for (var i = 0; i < message.pivotSelections.length; ++i) - $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.encode(message.pivotSelections[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PivotOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.IPivotOrderBy} message PivotOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PivotOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - case 2: { - if (!(message.pivotSelections && message.pivotSelections.length)) - message.pivotSelections = []; - message.pivotSelections.push($root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PivotOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PivotOrderBy message. - * @function verify - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PivotOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - if (message.pivotSelections != null && message.hasOwnProperty("pivotSelections")) { - if (!Array.isArray(message.pivotSelections)) - return "pivotSelections: array expected"; - for (var i = 0; i < message.pivotSelections.length; ++i) { - var error = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify(message.pivotSelections[i]); - if (error) - return "pivotSelections." + error; - } - } - return null; - }; - - /** - * Creates a PivotOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy} PivotOrderBy - */ - PivotOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy) - return object; - var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.pivotSelections) { - if (!Array.isArray(object.pivotSelections)) - throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: array expected"); - message.pivotSelections = []; - for (var i = 0; i < object.pivotSelections.length; ++i) { - if (typeof object.pivotSelections[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.OrderBy.PivotOrderBy.pivotSelections: object expected"); - message.pivotSelections[i] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.fromObject(object.pivotSelections[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PivotOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy} message PivotOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PivotOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pivotSelections = []; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - if (message.pivotSelections && message.pivotSelections.length) { - object.pivotSelections = []; - for (var j = 0; j < message.pivotSelections.length; ++j) - object.pivotSelections[j] = $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.toObject(message.pivotSelections[j], options); - } - return object; - }; - - /** - * Converts this PivotOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @instance - * @returns {Object.} JSON object - */ - PivotOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PivotOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PivotOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy"; - }; - - PivotOrderBy.PivotSelection = (function() { - - /** - * Properties of a PivotSelection. - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @interface IPivotSelection - * @property {string|null} [dimensionName] PivotSelection dimensionName - * @property {string|null} [dimensionValue] PivotSelection dimensionValue - */ - - /** - * Constructs a new PivotSelection. - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy - * @classdesc Represents a PivotSelection. - * @implements IPivotSelection - * @constructor - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set - */ - function PivotSelection(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PivotSelection dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @instance - */ - PivotSelection.prototype.dimensionName = ""; - - /** - * PivotSelection dimensionValue. - * @member {string} dimensionValue - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @instance - */ - PivotSelection.prototype.dimensionValue = ""; - - /** - * Creates a new PivotSelection instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection instance - */ - PivotSelection.create = function create(properties) { - return new PivotSelection(properties); - }; - - /** - * Encodes the specified PivotSelection message. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotSelection.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - if (message.dimensionValue != null && Object.hasOwnProperty.call(message, "dimensionValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimensionValue); - return writer; - }; - - /** - * Encodes the specified PivotSelection message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.IPivotSelection} message PivotSelection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotSelection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PivotSelection message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotSelection.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - case 2: { - message.dimensionValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PivotSelection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotSelection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PivotSelection message. - * @function verify - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PivotSelection.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) - if (!$util.isString(message.dimensionValue)) - return "dimensionValue: string expected"; - return null; - }; - - /** - * Creates a PivotSelection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} PivotSelection - */ - PivotSelection.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) - return object; - var message = new $root.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - if (object.dimensionValue != null) - message.dimensionValue = String(object.dimensionValue); - return message; - }; - - /** - * Creates a plain object from a PivotSelection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} message PivotSelection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PivotSelection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimensionName = ""; - object.dimensionValue = ""; - } - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - if (message.dimensionValue != null && message.hasOwnProperty("dimensionValue")) - object.dimensionValue = message.dimensionValue; - return object; - }; - - /** - * Converts this PivotSelection to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @instance - * @returns {Object.} JSON object - */ - PivotSelection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PivotSelection - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PivotSelection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection"; - }; - - return PivotSelection; - })(); - - return PivotOrderBy; - })(); - - return OrderBy; - })(); - - v1beta.Pivot = (function() { - - /** - * Properties of a Pivot. - * @memberof google.analytics.data.v1beta - * @interface IPivot - * @property {Array.|null} [fieldNames] Pivot fieldNames - * @property {Array.|null} [orderBys] Pivot orderBys - * @property {number|Long|null} [offset] Pivot offset - * @property {number|Long|null} [limit] Pivot limit - * @property {Array.|null} [metricAggregations] Pivot metricAggregations - */ - - /** - * Constructs a new Pivot. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Pivot. - * @implements IPivot - * @constructor - * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set - */ - function Pivot(properties) { - this.fieldNames = []; - this.orderBys = []; - this.metricAggregations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Pivot fieldNames. - * @member {Array.} fieldNames - * @memberof google.analytics.data.v1beta.Pivot - * @instance - */ - Pivot.prototype.fieldNames = $util.emptyArray; - - /** - * Pivot orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1beta.Pivot - * @instance - */ - Pivot.prototype.orderBys = $util.emptyArray; - - /** - * Pivot offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1beta.Pivot - * @instance - */ - Pivot.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Pivot limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1beta.Pivot - * @instance - */ - Pivot.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Pivot metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1beta.Pivot - * @instance - */ - Pivot.prototype.metricAggregations = $util.emptyArray; - - /** - * Creates a new Pivot instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {google.analytics.data.v1beta.IPivot=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Pivot} Pivot instance - */ - Pivot.create = function create(properties) { - return new Pivot(properties); - }; - - /** - * Encodes the specified Pivot message. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pivot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldNames != null && message.fieldNames.length) - for (var i = 0; i < message.fieldNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldNames[i]); - if (message.orderBys != null && message.orderBys.length) - for (var i = 0; i < message.orderBys.length; ++i) - $root.google.analytics.data.v1beta.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.limit); - if (message.metricAggregations != null && message.metricAggregations.length) { - writer.uint32(/* id 5, wireType 2 =*/42).fork(); - for (var i = 0; i < message.metricAggregations.length; ++i) - writer.int32(message.metricAggregations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Pivot message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Pivot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {google.analytics.data.v1beta.IPivot} message Pivot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pivot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pivot message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Pivot} Pivot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pivot.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Pivot(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.fieldNames && message.fieldNames.length)) - message.fieldNames = []; - message.fieldNames.push(reader.string()); - break; - } - case 2: { - if (!(message.orderBys && message.orderBys.length)) - message.orderBys = []; - message.orderBys.push($root.google.analytics.data.v1beta.OrderBy.decode(reader, reader.uint32())); - break; - } - case 3: { - message.offset = reader.int64(); - break; - } - case 4: { - message.limit = reader.int64(); - break; - } - case 5: { - if (!(message.metricAggregations && message.metricAggregations.length)) - message.metricAggregations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.metricAggregations.push(reader.int32()); - } else - message.metricAggregations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Pivot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Pivot} Pivot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pivot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pivot message. - * @function verify - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pivot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldNames != null && message.hasOwnProperty("fieldNames")) { - if (!Array.isArray(message.fieldNames)) - return "fieldNames: array expected"; - for (var i = 0; i < message.fieldNames.length; ++i) - if (!$util.isString(message.fieldNames[i])) - return "fieldNames: string[] expected"; - } - if (message.orderBys != null && message.hasOwnProperty("orderBys")) { - if (!Array.isArray(message.orderBys)) - return "orderBys: array expected"; - for (var i = 0; i < message.orderBys.length; ++i) { - var error = $root.google.analytics.data.v1beta.OrderBy.verify(message.orderBys[i]); - if (error) - return "orderBys." + error; - } - } - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { - if (!Array.isArray(message.metricAggregations)) - return "metricAggregations: array expected"; - for (var i = 0; i < message.metricAggregations.length; ++i) - switch (message.metricAggregations[i]) { - default: - return "metricAggregations: enum value[] expected"; - case 0: - case 1: - case 5: - case 6: - case 4: - break; - } - } - return null; - }; - - /** - * Creates a Pivot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Pivot} Pivot - */ - Pivot.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Pivot) - return object; - var message = new $root.google.analytics.data.v1beta.Pivot(); - if (object.fieldNames) { - if (!Array.isArray(object.fieldNames)) - throw TypeError(".google.analytics.data.v1beta.Pivot.fieldNames: array expected"); - message.fieldNames = []; - for (var i = 0; i < object.fieldNames.length; ++i) - message.fieldNames[i] = String(object.fieldNames[i]); - } - if (object.orderBys) { - if (!Array.isArray(object.orderBys)) - throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: array expected"); - message.orderBys = []; - for (var i = 0; i < object.orderBys.length; ++i) { - if (typeof object.orderBys[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Pivot.orderBys: object expected"); - message.orderBys[i] = $root.google.analytics.data.v1beta.OrderBy.fromObject(object.orderBys[i]); - } - } - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.metricAggregations) { - if (!Array.isArray(object.metricAggregations)) - throw TypeError(".google.analytics.data.v1beta.Pivot.metricAggregations: array expected"); - message.metricAggregations = []; - for (var i = 0; i < object.metricAggregations.length; ++i) - switch (object.metricAggregations[i]) { - default: - if (typeof object.metricAggregations[i] === "number") { - message.metricAggregations[i] = object.metricAggregations[i]; - break; - } - case "METRIC_AGGREGATION_UNSPECIFIED": - case 0: - message.metricAggregations[i] = 0; - break; - case "TOTAL": - case 1: - message.metricAggregations[i] = 1; - break; - case "MINIMUM": - case 5: - message.metricAggregations[i] = 5; - break; - case "MAXIMUM": - case 6: - message.metricAggregations[i] = 6; - break; - case "COUNT": - case 4: - message.metricAggregations[i] = 4; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Pivot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {google.analytics.data.v1beta.Pivot} message Pivot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pivot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fieldNames = []; - object.orderBys = []; - object.metricAggregations = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.fieldNames && message.fieldNames.length) { - object.fieldNames = []; - for (var j = 0; j < message.fieldNames.length; ++j) - object.fieldNames[j] = message.fieldNames[j]; - } - if (message.orderBys && message.orderBys.length) { - object.orderBys = []; - for (var j = 0; j < message.orderBys.length; ++j) - object.orderBys[j] = $root.google.analytics.data.v1beta.OrderBy.toObject(message.orderBys[j], options); - } - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.metricAggregations && message.metricAggregations.length) { - object.metricAggregations = []; - for (var j = 0; j < message.metricAggregations.length; ++j) - object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1beta.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; - } - return object; - }; - - /** - * Converts this Pivot to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Pivot - * @instance - * @returns {Object.} JSON object - */ - Pivot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Pivot - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Pivot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Pivot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Pivot"; - }; - - return Pivot; - })(); - - v1beta.CohortSpec = (function() { - - /** - * Properties of a CohortSpec. - * @memberof google.analytics.data.v1beta - * @interface ICohortSpec - * @property {Array.|null} [cohorts] CohortSpec cohorts - * @property {google.analytics.data.v1beta.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange - * @property {google.analytics.data.v1beta.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings - */ - - /** - * Constructs a new CohortSpec. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CohortSpec. - * @implements ICohortSpec - * @constructor - * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set - */ - function CohortSpec(properties) { - this.cohorts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortSpec cohorts. - * @member {Array.} cohorts - * @memberof google.analytics.data.v1beta.CohortSpec - * @instance - */ - CohortSpec.prototype.cohorts = $util.emptyArray; - - /** - * CohortSpec cohortsRange. - * @member {google.analytics.data.v1beta.ICohortsRange|null|undefined} cohortsRange - * @memberof google.analytics.data.v1beta.CohortSpec - * @instance - */ - CohortSpec.prototype.cohortsRange = null; - - /** - * CohortSpec cohortReportSettings. - * @member {google.analytics.data.v1beta.ICohortReportSettings|null|undefined} cohortReportSettings - * @memberof google.analytics.data.v1beta.CohortSpec - * @instance - */ - CohortSpec.prototype.cohortReportSettings = null; - - /** - * Creates a new CohortSpec instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {google.analytics.data.v1beta.ICohortSpec=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec instance - */ - CohortSpec.create = function create(properties) { - return new CohortSpec(properties); - }; - - /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cohorts != null && message.cohorts.length) - for (var i = 0; i < message.cohorts.length; ++i) - $root.google.analytics.data.v1beta.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) - $root.google.analytics.data.v1beta.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) - $root.google.analytics.data.v1beta.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {google.analytics.data.v1beta.ICohortSpec} message CohortSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortSpec message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.cohorts && message.cohorts.length)) - message.cohorts = []; - message.cohorts.push($root.google.analytics.data.v1beta.Cohort.decode(reader, reader.uint32())); - break; - } - case 2: { - message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortSpec message. - * @function verify - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cohorts != null && message.hasOwnProperty("cohorts")) { - if (!Array.isArray(message.cohorts)) - return "cohorts: array expected"; - for (var i = 0; i < message.cohorts.length; ++i) { - var error = $root.google.analytics.data.v1beta.Cohort.verify(message.cohorts[i]); - if (error) - return "cohorts." + error; - } - } - if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { - var error = $root.google.analytics.data.v1beta.CohortsRange.verify(message.cohortsRange); - if (error) - return "cohortsRange." + error; - } - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { - var error = $root.google.analytics.data.v1beta.CohortReportSettings.verify(message.cohortReportSettings); - if (error) - return "cohortReportSettings." + error; - } - return null; - }; - - /** - * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CohortSpec} CohortSpec - */ - CohortSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CohortSpec) - return object; - var message = new $root.google.analytics.data.v1beta.CohortSpec(); - if (object.cohorts) { - if (!Array.isArray(object.cohorts)) - throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: array expected"); - message.cohorts = []; - for (var i = 0; i < object.cohorts.length; ++i) { - if (typeof object.cohorts[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohorts: object expected"); - message.cohorts[i] = $root.google.analytics.data.v1beta.Cohort.fromObject(object.cohorts[i]); - } - } - if (object.cohortsRange != null) { - if (typeof object.cohortsRange !== "object") - throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortsRange: object expected"); - message.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.fromObject(object.cohortsRange); - } - if (object.cohortReportSettings != null) { - if (typeof object.cohortReportSettings !== "object") - throw TypeError(".google.analytics.data.v1beta.CohortSpec.cohortReportSettings: object expected"); - message.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.fromObject(object.cohortReportSettings); - } - return message; - }; - - /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {google.analytics.data.v1beta.CohortSpec} message CohortSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cohorts = []; - if (options.defaults) { - object.cohortsRange = null; - object.cohortReportSettings = null; - } - if (message.cohorts && message.cohorts.length) { - object.cohorts = []; - for (var j = 0; j < message.cohorts.length; ++j) - object.cohorts[j] = $root.google.analytics.data.v1beta.Cohort.toObject(message.cohorts[j], options); - } - if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) - object.cohortsRange = $root.google.analytics.data.v1beta.CohortsRange.toObject(message.cohortsRange, options); - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) - object.cohortReportSettings = $root.google.analytics.data.v1beta.CohortReportSettings.toObject(message.cohortReportSettings, options); - return object; - }; - - /** - * Converts this CohortSpec to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CohortSpec - * @instance - * @returns {Object.} JSON object - */ - CohortSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortSpec - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CohortSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CohortSpec"; - }; - - return CohortSpec; - })(); - - v1beta.Cohort = (function() { - - /** - * Properties of a Cohort. - * @memberof google.analytics.data.v1beta - * @interface ICohort - * @property {string|null} [name] Cohort name - * @property {string|null} [dimension] Cohort dimension - * @property {google.analytics.data.v1beta.IDateRange|null} [dateRange] Cohort dateRange - */ - - /** - * Constructs a new Cohort. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Cohort. - * @implements ICohort - * @constructor - * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set - */ - function Cohort(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Cohort name. - * @member {string} name - * @memberof google.analytics.data.v1beta.Cohort - * @instance - */ - Cohort.prototype.name = ""; - - /** - * Cohort dimension. - * @member {string} dimension - * @memberof google.analytics.data.v1beta.Cohort - * @instance - */ - Cohort.prototype.dimension = ""; - - /** - * Cohort dateRange. - * @member {google.analytics.data.v1beta.IDateRange|null|undefined} dateRange - * @memberof google.analytics.data.v1beta.Cohort - * @instance - */ - Cohort.prototype.dateRange = null; - - /** - * Creates a new Cohort instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {google.analytics.data.v1beta.ICohort=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Cohort} Cohort instance - */ - Cohort.create = function create(properties) { - return new Cohort(properties); - }; - - /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cohort.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); - if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) - $root.google.analytics.data.v1beta.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Cohort.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {google.analytics.data.v1beta.ICohort} message Cohort message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cohort.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Cohort message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Cohort} Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cohort.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Cohort(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dimension = reader.string(); - break; - } - case 3: { - message.dateRange = $root.google.analytics.data.v1beta.DateRange.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Cohort} Cohort - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cohort.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cohort message. - * @function verify - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cohort.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - if (!$util.isString(message.dimension)) - return "dimension: string expected"; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) { - var error = $root.google.analytics.data.v1beta.DateRange.verify(message.dateRange); - if (error) - return "dateRange." + error; - } - return null; - }; - - /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Cohort} Cohort - */ - Cohort.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Cohort) - return object; - var message = new $root.google.analytics.data.v1beta.Cohort(); - if (object.name != null) - message.name = String(object.name); - if (object.dimension != null) - message.dimension = String(object.dimension); - if (object.dateRange != null) { - if (typeof object.dateRange !== "object") - throw TypeError(".google.analytics.data.v1beta.Cohort.dateRange: object expected"); - message.dateRange = $root.google.analytics.data.v1beta.DateRange.fromObject(object.dateRange); - } - return message; - }; - - /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {google.analytics.data.v1beta.Cohort} message Cohort - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Cohort.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.dimension = ""; - object.dateRange = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = message.dimension; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) - object.dateRange = $root.google.analytics.data.v1beta.DateRange.toObject(message.dateRange, options); - return object; - }; - - /** - * Converts this Cohort to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Cohort - * @instance - * @returns {Object.} JSON object - */ - Cohort.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Cohort - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Cohort - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Cohort"; - }; - - return Cohort; - })(); - - v1beta.CohortsRange = (function() { - - /** - * Properties of a CohortsRange. - * @memberof google.analytics.data.v1beta - * @interface ICohortsRange - * @property {google.analytics.data.v1beta.CohortsRange.Granularity|null} [granularity] CohortsRange granularity - * @property {number|null} [startOffset] CohortsRange startOffset - * @property {number|null} [endOffset] CohortsRange endOffset - */ - - /** - * Constructs a new CohortsRange. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CohortsRange. - * @implements ICohortsRange - * @constructor - * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set - */ - function CohortsRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortsRange granularity. - * @member {google.analytics.data.v1beta.CohortsRange.Granularity} granularity - * @memberof google.analytics.data.v1beta.CohortsRange - * @instance - */ - CohortsRange.prototype.granularity = 0; - - /** - * CohortsRange startOffset. - * @member {number} startOffset - * @memberof google.analytics.data.v1beta.CohortsRange - * @instance - */ - CohortsRange.prototype.startOffset = 0; - - /** - * CohortsRange endOffset. - * @member {number} endOffset - * @memberof google.analytics.data.v1beta.CohortsRange - * @instance - */ - CohortsRange.prototype.endOffset = 0; - - /** - * Creates a new CohortsRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {google.analytics.data.v1beta.ICohortsRange=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange instance - */ - CohortsRange.create = function create(properties) { - return new CohortsRange(properties); - }; - - /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortsRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); - return writer; - }; - - /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortsRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {google.analytics.data.v1beta.ICohortsRange} message CohortsRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortsRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortsRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortsRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.granularity = reader.int32(); - break; - } - case 2: { - message.startOffset = reader.int32(); - break; - } - case 3: { - message.endOffset = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortsRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortsRange message. - * @function verify - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortsRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.granularity != null && message.hasOwnProperty("granularity")) - switch (message.granularity) { - default: - return "granularity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset)) - return "startOffset: integer expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset)) - return "endOffset: integer expected"; - return null; - }; - - /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CohortsRange} CohortsRange - */ - CohortsRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CohortsRange) - return object; - var message = new $root.google.analytics.data.v1beta.CohortsRange(); - switch (object.granularity) { - default: - if (typeof object.granularity === "number") { - message.granularity = object.granularity; - break; - } - break; - case "GRANULARITY_UNSPECIFIED": - case 0: - message.granularity = 0; - break; - case "DAILY": - case 1: - message.granularity = 1; - break; - case "WEEKLY": - case 2: - message.granularity = 2; - break; - case "MONTHLY": - case 3: - message.granularity = 3; - break; - } - if (object.startOffset != null) - message.startOffset = object.startOffset | 0; - if (object.endOffset != null) - message.endOffset = object.endOffset | 0; - return message; - }; - - /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {google.analytics.data.v1beta.CohortsRange} message CohortsRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortsRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; - object.startOffset = 0; - object.endOffset = 0; - } - if (message.granularity != null && message.hasOwnProperty("granularity")) - object.granularity = options.enums === String ? $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1beta.CohortsRange.Granularity[message.granularity] : message.granularity; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = message.endOffset; - return object; - }; - - /** - * Converts this CohortsRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CohortsRange - * @instance - * @returns {Object.} JSON object - */ - CohortsRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortsRange - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CohortsRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CohortsRange"; - }; - - /** - * Granularity enum. - * @name google.analytics.data.v1beta.CohortsRange.Granularity - * @enum {number} - * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value - * @property {number} DAILY=1 DAILY value - * @property {number} WEEKLY=2 WEEKLY value - * @property {number} MONTHLY=3 MONTHLY value - */ - CohortsRange.Granularity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DAILY"] = 1; - values[valuesById[2] = "WEEKLY"] = 2; - values[valuesById[3] = "MONTHLY"] = 3; - return values; - })(); - - return CohortsRange; - })(); - - v1beta.CohortReportSettings = (function() { - - /** - * Properties of a CohortReportSettings. - * @memberof google.analytics.data.v1beta - * @interface ICohortReportSettings - * @property {boolean|null} [accumulate] CohortReportSettings accumulate - */ - - /** - * Constructs a new CohortReportSettings. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a CohortReportSettings. - * @implements ICohortReportSettings - * @constructor - * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set - */ - function CohortReportSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CohortReportSettings accumulate. - * @member {boolean} accumulate - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @instance - */ - CohortReportSettings.prototype.accumulate = false; - - /** - * Creates a new CohortReportSettings instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {google.analytics.data.v1beta.ICohortReportSettings=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings instance - */ - CohortReportSettings.create = function create(properties) { - return new CohortReportSettings(properties); - }; - - /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortReportSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); - return writer; - }; - - /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.CohortReportSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {google.analytics.data.v1beta.ICohortReportSettings} message CohortReportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortReportSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.CohortReportSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.accumulate = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CohortReportSettings message. - * @function verify - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CohortReportSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - if (typeof message.accumulate !== "boolean") - return "accumulate: boolean expected"; - return null; - }; - - /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.CohortReportSettings} CohortReportSettings - */ - CohortReportSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.CohortReportSettings) - return object; - var message = new $root.google.analytics.data.v1beta.CohortReportSettings(); - if (object.accumulate != null) - message.accumulate = Boolean(object.accumulate); - return message; - }; - - /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {google.analytics.data.v1beta.CohortReportSettings} message CohortReportSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CohortReportSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.accumulate = false; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - object.accumulate = message.accumulate; - return object; - }; - - /** - * Converts this CohortReportSettings to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @instance - * @returns {Object.} JSON object - */ - CohortReportSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CohortReportSettings - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.CohortReportSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.CohortReportSettings"; - }; - - return CohortReportSettings; - })(); - - v1beta.ResponseMetaData = (function() { - - /** - * Properties of a ResponseMetaData. - * @memberof google.analytics.data.v1beta - * @interface IResponseMetaData - * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow - * @property {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse - * @property {string|null} [currencyCode] ResponseMetaData currencyCode - * @property {string|null} [timeZone] ResponseMetaData timeZone - * @property {string|null} [emptyReason] ResponseMetaData emptyReason - * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding - * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas - */ - - /** - * Constructs a new ResponseMetaData. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a ResponseMetaData. - * @implements IResponseMetaData - * @constructor - * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set - */ - function ResponseMetaData(properties) { - this.samplingMetadatas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseMetaData dataLossFromOtherRow. - * @member {boolean} dataLossFromOtherRow - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.dataLossFromOtherRow = false; - - /** - * ResponseMetaData schemaRestrictionResponse. - * @member {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.schemaRestrictionResponse = null; - - /** - * ResponseMetaData currencyCode. - * @member {string|null|undefined} currencyCode - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.currencyCode = null; - - /** - * ResponseMetaData timeZone. - * @member {string|null|undefined} timeZone - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.timeZone = null; - - /** - * ResponseMetaData emptyReason. - * @member {string|null|undefined} emptyReason - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.emptyReason = null; - - /** - * ResponseMetaData subjectToThresholding. - * @member {boolean|null|undefined} subjectToThresholding - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.subjectToThresholding = null; - - /** - * ResponseMetaData samplingMetadatas. - * @member {Array.} samplingMetadatas - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { - get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { - get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { - get: $util.oneOfGetter($oneOfFields = ["timeZone"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { - get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { - get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ResponseMetaData instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {google.analytics.data.v1beta.IResponseMetaData=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData instance - */ - ResponseMetaData.create = function create(properties) { - return new ResponseMetaData(properties); - }; - - /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMetaData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); - if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) - $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); - if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); - if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); - if (message.samplingMetadatas != null && message.samplingMetadatas.length) - for (var i = 0; i < message.samplingMetadatas.length; ++i) - $root.google.analytics.data.v1beta.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {google.analytics.data.v1beta.IResponseMetaData} message ResponseMetaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMetaData.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.dataLossFromOtherRow = reader.bool(); - break; - } - case 4: { - message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); - break; - } - case 5: { - message.currencyCode = reader.string(); - break; - } - case 6: { - message.timeZone = reader.string(); - break; - } - case 7: { - message.emptyReason = reader.string(); - break; - } - case 8: { - message.subjectToThresholding = reader.bool(); - break; - } - case 9: { - if (!(message.samplingMetadatas && message.samplingMetadatas.length)) - message.samplingMetadatas = []; - message.samplingMetadatas.push($root.google.analytics.data.v1beta.SamplingMetadata.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseMetaData message. - * @function verify - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseMetaData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - if (typeof message.dataLossFromOtherRow !== "boolean") - return "dataLossFromOtherRow: boolean expected"; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - properties._schemaRestrictionResponse = 1; - { - var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); - if (error) - return "schemaRestrictionResponse." + error; - } - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - properties._currencyCode = 1; - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - properties._timeZone = 1; - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - properties._emptyReason = 1; - if (!$util.isString(message.emptyReason)) - return "emptyReason: string expected"; - } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - properties._subjectToThresholding = 1; - if (typeof message.subjectToThresholding !== "boolean") - return "subjectToThresholding: boolean expected"; - } - if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { - if (!Array.isArray(message.samplingMetadatas)) - return "samplingMetadatas: array expected"; - for (var i = 0; i < message.samplingMetadatas.length; ++i) { - var error = $root.google.analytics.data.v1beta.SamplingMetadata.verify(message.samplingMetadatas[i]); - if (error) - return "samplingMetadatas." + error; - } - } - return null; - }; - - /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ResponseMetaData} ResponseMetaData - */ - ResponseMetaData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData) - return object; - var message = new $root.google.analytics.data.v1beta.ResponseMetaData(); - if (object.dataLossFromOtherRow != null) - message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); - if (object.schemaRestrictionResponse != null) { - if (typeof object.schemaRestrictionResponse !== "object") - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.schemaRestrictionResponse: object expected"); - message.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); - } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.emptyReason != null) - message.emptyReason = String(object.emptyReason); - if (object.subjectToThresholding != null) - message.subjectToThresholding = Boolean(object.subjectToThresholding); - if (object.samplingMetadatas) { - if (!Array.isArray(object.samplingMetadatas)) - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: array expected"); - message.samplingMetadatas = []; - for (var i = 0; i < object.samplingMetadatas.length; ++i) { - if (typeof object.samplingMetadatas[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.samplingMetadatas: object expected"); - message.samplingMetadatas[i] = $root.google.analytics.data.v1beta.SamplingMetadata.fromObject(object.samplingMetadatas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData} message ResponseMetaData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseMetaData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.samplingMetadatas = []; - if (options.defaults) - object.dataLossFromOtherRow = false; - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - object.dataLossFromOtherRow = message.dataLossFromOtherRow; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - object.schemaRestrictionResponse = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); - if (options.oneofs) - object._schemaRestrictionResponse = "schemaRestrictionResponse"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - object.currencyCode = message.currencyCode; - if (options.oneofs) - object._currencyCode = "currencyCode"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = message.timeZone; - if (options.oneofs) - object._timeZone = "timeZone"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - object.emptyReason = message.emptyReason; - if (options.oneofs) - object._emptyReason = "emptyReason"; - } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - object.subjectToThresholding = message.subjectToThresholding; - if (options.oneofs) - object._subjectToThresholding = "subjectToThresholding"; - } - if (message.samplingMetadatas && message.samplingMetadatas.length) { - object.samplingMetadatas = []; - for (var j = 0; j < message.samplingMetadatas.length; ++j) - object.samplingMetadatas[j] = $root.google.analytics.data.v1beta.SamplingMetadata.toObject(message.samplingMetadatas[j], options); - } - return object; - }; - - /** - * Converts this ResponseMetaData to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @instance - * @returns {Object.} JSON object - */ - ResponseMetaData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResponseMetaData - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData"; - }; - - ResponseMetaData.SchemaRestrictionResponse = (function() { - - /** - * Properties of a SchemaRestrictionResponse. - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @interface ISchemaRestrictionResponse - * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions - */ - - /** - * Constructs a new SchemaRestrictionResponse. - * @memberof google.analytics.data.v1beta.ResponseMetaData - * @classdesc Represents a SchemaRestrictionResponse. - * @implements ISchemaRestrictionResponse - * @constructor - * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - */ - function SchemaRestrictionResponse(properties) { - this.activeMetricRestrictions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchemaRestrictionResponse activeMetricRestrictions. - * @member {Array.} activeMetricRestrictions - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @instance - */ - SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; - - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance - */ - SchemaRestrictionResponse.create = function create(properties) { - return new SchemaRestrictionResponse(properties); - }; - - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) - $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) - message.activeMetricRestrictions = []; - message.activeMetricRestrictions.push($root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaRestrictionResponse message. - * @function verify - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaRestrictionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { - if (!Array.isArray(message.activeMetricRestrictions)) - return "activeMetricRestrictions: array expected"; - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { - var error = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); - if (error) - return "activeMetricRestrictions." + error; - } - } - return null; - }; - - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - */ - SchemaRestrictionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse) - return object; - var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse(); - if (object.activeMetricRestrictions) { - if (!Array.isArray(object.activeMetricRestrictions)) - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); - message.activeMetricRestrictions = []; - for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { - if (typeof object.activeMetricRestrictions[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); - message.activeMetricRestrictions[i] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaRestrictionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.activeMetricRestrictions = []; - if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { - object.activeMetricRestrictions = []; - for (var j = 0; j < message.activeMetricRestrictions.length; ++j) - object.activeMetricRestrictions[j] = $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); - } - return object; - }; - - /** - * Converts this SchemaRestrictionResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @instance - * @returns {Object.} JSON object - */ - SchemaRestrictionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchemaRestrictionResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse"; - }; - - SchemaRestrictionResponse.ActiveMetricRestriction = (function() { - - /** - * Properties of an ActiveMetricRestriction. - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @interface IActiveMetricRestriction - * @property {string|null} [metricName] ActiveMetricRestriction metricName - * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes - */ - - /** - * Constructs a new ActiveMetricRestriction. - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse - * @classdesc Represents an ActiveMetricRestriction. - * @implements IActiveMetricRestriction - * @constructor - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - */ - function ActiveMetricRestriction(properties) { - this.restrictedMetricTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActiveMetricRestriction metricName. - * @member {string|null|undefined} metricName - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.metricName = null; - - /** - * ActiveMetricRestriction restrictedMetricTypes. - * @member {Array.} restrictedMetricTypes - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { - get: $util.oneOfGetter($oneOfFields = ["metricName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance - */ - ActiveMetricRestriction.create = function create(properties) { - return new ActiveMetricRestriction(properties); - }; - - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - writer.int32(message.restrictedMetricTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - case 2: { - if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) - message.restrictedMetricTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedMetricTypes.push(reader.int32()); - } else - message.restrictedMetricTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActiveMetricRestriction message. - * @function verify - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveMetricRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - properties._metricName = 1; - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - } - if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { - if (!Array.isArray(message.restrictedMetricTypes)) - return "restrictedMetricTypes: array expected"; - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - switch (message.restrictedMetricTypes[i]) { - default: - return "restrictedMetricTypes: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - */ - ActiveMetricRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) - return object; - var message = new $root.google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.restrictedMetricTypes) { - if (!Array.isArray(object.restrictedMetricTypes)) - throw TypeError(".google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); - message.restrictedMetricTypes = []; - for (var i = 0; i < object.restrictedMetricTypes.length; ++i) - switch (object.restrictedMetricTypes[i]) { - default: - if (typeof object.restrictedMetricTypes[i] === "number") { - message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; - break; - } - case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": - case 0: - message.restrictedMetricTypes[i] = 0; - break; - case "COST_DATA": - case 1: - message.restrictedMetricTypes[i] = 1; - break; - case "REVENUE_DATA": - case 2: - message.restrictedMetricTypes[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveMetricRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.restrictedMetricTypes = []; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - object.metricName = message.metricName; - if (options.oneofs) - object._metricName = "metricName"; - } - if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { - object.restrictedMetricTypes = []; - for (var j = 0; j < message.restrictedMetricTypes.length; ++j) - object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1beta.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; - } - return object; - }; - - /** - * Converts this ActiveMetricRestriction to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - * @returns {Object.} JSON object - */ - ActiveMetricRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActiveMetricRestriction - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; - }; - - return ActiveMetricRestriction; - })(); - - return SchemaRestrictionResponse; - })(); - - return ResponseMetaData; - })(); - - v1beta.SamplingMetadata = (function() { - - /** - * Properties of a SamplingMetadata. - * @memberof google.analytics.data.v1beta - * @interface ISamplingMetadata - * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount - * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize - */ - - /** - * Constructs a new SamplingMetadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a SamplingMetadata. - * @implements ISamplingMetadata - * @constructor - * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set - */ - function SamplingMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SamplingMetadata samplesReadCount. - * @member {number|Long} samplesReadCount - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @instance - */ - SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SamplingMetadata samplingSpaceSize. - * @member {number|Long} samplingSpaceSize - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @instance - */ - SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SamplingMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {google.analytics.data.v1beta.ISamplingMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata instance - */ - SamplingMetadata.create = function create(properties) { - return new SamplingMetadata(properties); - }; - - /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SamplingMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); - if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); - return writer; - }; - - /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.SamplingMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {google.analytics.data.v1beta.ISamplingMetadata} message SamplingMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SamplingMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.SamplingMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.samplesReadCount = reader.int64(); - break; - } - case 2: { - message.samplingSpaceSize = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SamplingMetadata message. - * @function verify - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SamplingMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) - return "samplesReadCount: integer|Long expected"; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) - return "samplingSpaceSize: integer|Long expected"; - return null; - }; - - /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.SamplingMetadata} SamplingMetadata - */ - SamplingMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.SamplingMetadata) - return object; - var message = new $root.google.analytics.data.v1beta.SamplingMetadata(); - if (object.samplesReadCount != null) - if ($util.Long) - (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; - else if (typeof object.samplesReadCount === "string") - message.samplesReadCount = parseInt(object.samplesReadCount, 10); - else if (typeof object.samplesReadCount === "number") - message.samplesReadCount = object.samplesReadCount; - else if (typeof object.samplesReadCount === "object") - message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); - if (object.samplingSpaceSize != null) - if ($util.Long) - (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; - else if (typeof object.samplingSpaceSize === "string") - message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); - else if (typeof object.samplingSpaceSize === "number") - message.samplingSpaceSize = object.samplingSpaceSize; - else if (typeof object.samplingSpaceSize === "object") - message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {google.analytics.data.v1beta.SamplingMetadata} message SamplingMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SamplingMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplesReadCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplingSpaceSize = options.longs === String ? "0" : 0; - } - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (typeof message.samplesReadCount === "number") - object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; - else - object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (typeof message.samplingSpaceSize === "number") - object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; - else - object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; - return object; - }; - - /** - * Converts this SamplingMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @instance - * @returns {Object.} JSON object - */ - SamplingMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SamplingMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.SamplingMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.SamplingMetadata"; - }; - - return SamplingMetadata; - })(); - - v1beta.DimensionHeader = (function() { - - /** - * Properties of a DimensionHeader. - * @memberof google.analytics.data.v1beta - * @interface IDimensionHeader - * @property {string|null} [name] DimensionHeader name - */ - - /** - * Constructs a new DimensionHeader. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DimensionHeader. - * @implements IDimensionHeader - * @constructor - * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set - */ - function DimensionHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionHeader name. - * @member {string} name - * @memberof google.analytics.data.v1beta.DimensionHeader - * @instance - */ - DimensionHeader.prototype.name = ""; - - /** - * Creates a new DimensionHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {google.analytics.data.v1beta.IDimensionHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader instance - */ - DimensionHeader.create = function create(properties) { - return new DimensionHeader(properties); - }; - - /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {google.analytics.data.v1beta.IDimensionHeader} message DimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionHeader message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionHeader} DimensionHeader - */ - DimensionHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionHeader) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionHeader(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {google.analytics.data.v1beta.DimensionHeader} message DimensionHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DimensionHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionHeader - * @instance - * @returns {Object.} JSON object - */ - DimensionHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionHeader"; - }; - - return DimensionHeader; - })(); - - v1beta.MetricHeader = (function() { - - /** - * Properties of a MetricHeader. - * @memberof google.analytics.data.v1beta - * @interface IMetricHeader - * @property {string|null} [name] MetricHeader name - * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricHeader type - */ - - /** - * Constructs a new MetricHeader. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a MetricHeader. - * @implements IMetricHeader - * @constructor - * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set - */ - function MetricHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricHeader name. - * @member {string} name - * @memberof google.analytics.data.v1beta.MetricHeader - * @instance - */ - MetricHeader.prototype.name = ""; - - /** - * MetricHeader type. - * @member {google.analytics.data.v1beta.MetricType} type - * @memberof google.analytics.data.v1beta.MetricHeader - * @instance - */ - MetricHeader.prototype.type = 0; - - /** - * Creates a new MetricHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {google.analytics.data.v1beta.IMetricHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader instance - */ - MetricHeader.create = function create(properties) { - return new MetricHeader(properties); - }; - - /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {google.analytics.data.v1beta.IMetricHeader} message MetricHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricHeader message. - * @function verify - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - return null; - }; - - /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.MetricHeader} MetricHeader - */ - MetricHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.MetricHeader) - return object; - var message = new $root.google.analytics.data.v1beta.MetricHeader(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_INTEGER": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_SECONDS": - case 4: - message.type = 4; - break; - case "TYPE_MILLISECONDS": - case 5: - message.type = 5; - break; - case "TYPE_MINUTES": - case 6: - message.type = 6; - break; - case "TYPE_HOURS": - case 7: - message.type = 7; - break; - case "TYPE_STANDARD": - case 8: - message.type = 8; - break; - case "TYPE_CURRENCY": - case 9: - message.type = 9; - break; - case "TYPE_FEET": - case 10: - message.type = 10; - break; - case "TYPE_MILES": - case 11: - message.type = 11; - break; - case "TYPE_METERS": - case 12: - message.type = 12; - break; - case "TYPE_KILOMETERS": - case 13: - message.type = 13; - break; - } - return message; - }; - - /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {google.analytics.data.v1beta.MetricHeader} message MetricHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; - return object; - }; - - /** - * Converts this MetricHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.MetricHeader - * @instance - * @returns {Object.} JSON object - */ - MetricHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.MetricHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.MetricHeader"; - }; - - return MetricHeader; - })(); - - v1beta.PivotHeader = (function() { - - /** - * Properties of a PivotHeader. - * @memberof google.analytics.data.v1beta - * @interface IPivotHeader - * @property {Array.|null} [pivotDimensionHeaders] PivotHeader pivotDimensionHeaders - * @property {number|null} [rowCount] PivotHeader rowCount - */ - - /** - * Constructs a new PivotHeader. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a PivotHeader. - * @implements IPivotHeader - * @constructor - * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set - */ - function PivotHeader(properties) { - this.pivotDimensionHeaders = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PivotHeader pivotDimensionHeaders. - * @member {Array.} pivotDimensionHeaders - * @memberof google.analytics.data.v1beta.PivotHeader - * @instance - */ - PivotHeader.prototype.pivotDimensionHeaders = $util.emptyArray; - - /** - * PivotHeader rowCount. - * @member {number} rowCount - * @memberof google.analytics.data.v1beta.PivotHeader - * @instance - */ - PivotHeader.prototype.rowCount = 0; - - /** - * Creates a new PivotHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {google.analytics.data.v1beta.IPivotHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader instance - */ - PivotHeader.create = function create(properties) { - return new PivotHeader(properties); - }; - - /** - * Encodes the specified PivotHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pivotDimensionHeaders != null && message.pivotDimensionHeaders.length) - for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) - $root.google.analytics.data.v1beta.PivotDimensionHeader.encode(message.pivotDimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rowCount); - return writer; - }; - - /** - * Encodes the specified PivotHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {google.analytics.data.v1beta.IPivotHeader} message PivotHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PivotHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.pivotDimensionHeaders && message.pivotDimensionHeaders.length)) - message.pivotDimensionHeaders = []; - message.pivotDimensionHeaders.push($root.google.analytics.data.v1beta.PivotDimensionHeader.decode(reader, reader.uint32())); - break; - } - case 2: { - message.rowCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PivotHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PivotHeader message. - * @function verify - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PivotHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pivotDimensionHeaders != null && message.hasOwnProperty("pivotDimensionHeaders")) { - if (!Array.isArray(message.pivotDimensionHeaders)) - return "pivotDimensionHeaders: array expected"; - for (var i = 0; i < message.pivotDimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1beta.PivotDimensionHeader.verify(message.pivotDimensionHeaders[i]); - if (error) - return "pivotDimensionHeaders." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - return null; - }; - - /** - * Creates a PivotHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.PivotHeader} PivotHeader - */ - PivotHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.PivotHeader) - return object; - var message = new $root.google.analytics.data.v1beta.PivotHeader(); - if (object.pivotDimensionHeaders) { - if (!Array.isArray(object.pivotDimensionHeaders)) - throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: array expected"); - message.pivotDimensionHeaders = []; - for (var i = 0; i < object.pivotDimensionHeaders.length; ++i) { - if (typeof object.pivotDimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.PivotHeader.pivotDimensionHeaders: object expected"); - message.pivotDimensionHeaders[i] = $root.google.analytics.data.v1beta.PivotDimensionHeader.fromObject(object.pivotDimensionHeaders[i]); - } - } - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - return message; - }; - - /** - * Creates a plain object from a PivotHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {google.analytics.data.v1beta.PivotHeader} message PivotHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PivotHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pivotDimensionHeaders = []; - if (options.defaults) - object.rowCount = 0; - if (message.pivotDimensionHeaders && message.pivotDimensionHeaders.length) { - object.pivotDimensionHeaders = []; - for (var j = 0; j < message.pivotDimensionHeaders.length; ++j) - object.pivotDimensionHeaders[j] = $root.google.analytics.data.v1beta.PivotDimensionHeader.toObject(message.pivotDimensionHeaders[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - return object; - }; - - /** - * Converts this PivotHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.PivotHeader - * @instance - * @returns {Object.} JSON object - */ - PivotHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PivotHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.PivotHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PivotHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.PivotHeader"; - }; - - return PivotHeader; - })(); - - v1beta.PivotDimensionHeader = (function() { - - /** - * Properties of a PivotDimensionHeader. - * @memberof google.analytics.data.v1beta - * @interface IPivotDimensionHeader - * @property {Array.|null} [dimensionValues] PivotDimensionHeader dimensionValues - */ - - /** - * Constructs a new PivotDimensionHeader. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a PivotDimensionHeader. - * @implements IPivotDimensionHeader - * @constructor - * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set - */ - function PivotDimensionHeader(properties) { - this.dimensionValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PivotDimensionHeader dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @instance - */ - PivotDimensionHeader.prototype.dimensionValues = $util.emptyArray; - - /** - * Creates a new PivotDimensionHeader instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {google.analytics.data.v1beta.IPivotDimensionHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader instance - */ - PivotDimensionHeader.create = function create(properties) { - return new PivotDimensionHeader(properties); - }; - - /** - * Encodes the specified PivotDimensionHeader message. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotDimensionHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PivotDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PivotDimensionHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {google.analytics.data.v1beta.IPivotDimensionHeader} message PivotDimensionHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PivotDimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PivotDimensionHeader message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotDimensionHeader.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PivotDimensionHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PivotDimensionHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PivotDimensionHeader message. - * @function verify - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PivotDimensionHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - return null; - }; - - /** - * Creates a PivotDimensionHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.PivotDimensionHeader} PivotDimensionHeader - */ - PivotDimensionHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.PivotDimensionHeader) - return object; - var message = new $root.google.analytics.data.v1beta.PivotDimensionHeader(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.PivotDimensionHeader.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PivotDimensionHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {google.analytics.data.v1beta.PivotDimensionHeader} message PivotDimensionHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PivotDimensionHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionValues = []; - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); - } - return object; - }; - - /** - * Converts this PivotDimensionHeader to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @instance - * @returns {Object.} JSON object - */ - PivotDimensionHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PivotDimensionHeader - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.PivotDimensionHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PivotDimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.PivotDimensionHeader"; - }; - - return PivotDimensionHeader; - })(); - - v1beta.Row = (function() { - - /** - * Properties of a Row. - * @memberof google.analytics.data.v1beta - * @interface IRow - * @property {Array.|null} [dimensionValues] Row dimensionValues - * @property {Array.|null} [metricValues] Row metricValues - */ - - /** - * Constructs a new Row. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.dimensionValues = []; - this.metricValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Row dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1beta.Row - * @instance - */ - Row.prototype.dimensionValues = $util.emptyArray; - - /** - * Row metricValues. - * @member {Array.} metricValues - * @memberof google.analytics.data.v1beta.Row - * @instance - */ - Row.prototype.metricValues = $util.emptyArray; - - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {google.analytics.data.v1beta.IRow=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; - - /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1beta.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricValues != null && message.metricValues.length) - for (var i = 0; i < message.metricValues.length; ++i) - $root.google.analytics.data.v1beta.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {google.analytics.data.v1beta.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1beta.DimensionValue.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.metricValues && message.metricValues.length)) - message.metricValues = []; - message.metricValues.push($root.google.analytics.data.v1beta.MetricValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Row message. - * @function verify - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1beta.DimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } - } - if (message.metricValues != null && message.hasOwnProperty("metricValues")) { - if (!Array.isArray(message.metricValues)) - return "metricValues: array expected"; - for (var i = 0; i < message.metricValues.length; ++i) { - var error = $root.google.analytics.data.v1beta.MetricValue.verify(message.metricValues[i]); - if (error) - return "metricValues." + error; - } - } - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.Row) - return object; - var message = new $root.google.analytics.data.v1beta.Row(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Row.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1beta.DimensionValue.fromObject(object.dimensionValues[i]); - } - } - if (object.metricValues) { - if (!Array.isArray(object.metricValues)) - throw TypeError(".google.analytics.data.v1beta.Row.metricValues: array expected"); - message.metricValues = []; - for (var i = 0; i < object.metricValues.length; ++i) { - if (typeof object.metricValues[i] !== "object") - throw TypeError(".google.analytics.data.v1beta.Row.metricValues: object expected"); - message.metricValues[i] = $root.google.analytics.data.v1beta.MetricValue.fromObject(object.metricValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {google.analytics.data.v1beta.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensionValues = []; - object.metricValues = []; - } - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1beta.DimensionValue.toObject(message.dimensionValues[j], options); - } - if (message.metricValues && message.metricValues.length) { - object.metricValues = []; - for (var j = 0; j < message.metricValues.length; ++j) - object.metricValues[j] = $root.google.analytics.data.v1beta.MetricValue.toObject(message.metricValues[j], options); - } - return object; - }; - - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Row - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.Row - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.Row"; - }; - - return Row; - })(); - - v1beta.DimensionValue = (function() { - - /** - * Properties of a DimensionValue. - * @memberof google.analytics.data.v1beta - * @interface IDimensionValue - * @property {string|null} [value] DimensionValue value - */ - - /** - * Constructs a new DimensionValue. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DimensionValue. - * @implements IDimensionValue - * @constructor - * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set - */ - function DimensionValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1beta.DimensionValue - * @instance - */ - DimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1beta.DimensionValue - * @instance - */ - Object.defineProperty(DimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DimensionValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {google.analytics.data.v1beta.IDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue instance - */ - DimensionValue.create = function create(properties) { - return new DimensionValue(properties); - }; - - /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {google.analytics.data.v1beta.IDimensionValue} message DimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionValue message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionValue} DimensionValue - */ - DimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionValue) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {google.analytics.data.v1beta.DimensionValue} message DimensionValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this DimensionValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionValue - * @instance - * @returns {Object.} JSON object - */ - DimensionValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionValue - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionValue"; - }; - - return DimensionValue; - })(); - - v1beta.MetricValue = (function() { - - /** - * Properties of a MetricValue. - * @memberof google.analytics.data.v1beta - * @interface IMetricValue - * @property {string|null} [value] MetricValue value - */ - - /** - * Constructs a new MetricValue. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a MetricValue. - * @implements IMetricValue - * @constructor - * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set - */ - function MetricValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1beta.MetricValue - * @instance - */ - MetricValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetricValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1beta.MetricValue - * @instance - */ - Object.defineProperty(MetricValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MetricValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {google.analytics.data.v1beta.IMetricValue=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.MetricValue} MetricValue instance - */ - MetricValue.create = function create(properties) { - return new MetricValue(properties); - }; - - /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); - return writer; - }; - - /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {google.analytics.data.v1beta.IMetricValue} message MetricValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.MetricValue} MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.MetricValue} MetricValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricValue message. - * @function verify - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.MetricValue} MetricValue - */ - MetricValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.MetricValue) - return object; - var message = new $root.google.analytics.data.v1beta.MetricValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {google.analytics.data.v1beta.MetricValue} message MetricValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; - } - return object; - }; - - /** - * Converts this MetricValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.MetricValue - * @instance - * @returns {Object.} JSON object - */ - MetricValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricValue - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.MetricValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.MetricValue"; - }; - - return MetricValue; - })(); - - v1beta.NumericValue = (function() { - - /** - * Properties of a NumericValue. - * @memberof google.analytics.data.v1beta - * @interface INumericValue - * @property {number|Long|null} [int64Value] NumericValue int64Value - * @property {number|null} [doubleValue] NumericValue doubleValue - */ - - /** - * Constructs a new NumericValue. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a NumericValue. - * @implements INumericValue - * @constructor - * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set - */ - function NumericValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NumericValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.analytics.data.v1beta.NumericValue - * @instance - */ - NumericValue.prototype.int64Value = null; - - /** - * NumericValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.analytics.data.v1beta.NumericValue - * @instance - */ - NumericValue.prototype.doubleValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NumericValue oneValue. - * @member {"int64Value"|"doubleValue"|undefined} oneValue - * @memberof google.analytics.data.v1beta.NumericValue - * @instance - */ - Object.defineProperty(NumericValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NumericValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {google.analytics.data.v1beta.INumericValue=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.NumericValue} NumericValue instance - */ - NumericValue.create = function create(properties) { - return new NumericValue(properties); - }; - - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - return writer; - }; - - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.NumericValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {google.analytics.data.v1beta.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.NumericValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.int64Value = reader.int64(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NumericValue message. - * @function verify - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.oneValue = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.oneValue === 1) - return "oneValue: multiple values"; - properties.oneValue = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - return null; - }; - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.NumericValue} NumericValue - */ - NumericValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.NumericValue) - return object; - var message = new $root.google.analytics.data.v1beta.NumericValue(); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; - - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {google.analytics.data.v1beta.NumericValue} message NumericValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.oneValue = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.oneValue = "doubleValue"; - } - return object; - }; - - /** - * Converts this NumericValue to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.NumericValue - * @instance - * @returns {Object.} JSON object - */ - NumericValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NumericValue - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.NumericValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.NumericValue"; - }; - - return NumericValue; - })(); - - v1beta.PropertyQuota = (function() { - - /** - * Properties of a PropertyQuota. - * @memberof google.analytics.data.v1beta - * @interface IPropertyQuota - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour - * @property {google.analytics.data.v1beta.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour - */ - - /** - * Constructs a new PropertyQuota. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a PropertyQuota. - * @implements IPropertyQuota - * @constructor - * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set - */ - function PropertyQuota(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PropertyQuota tokensPerDay. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerDay - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerDay = null; - - /** - * PropertyQuota tokensPerHour. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerHour - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerHour = null; - - /** - * PropertyQuota concurrentRequests. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} concurrentRequests - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.concurrentRequests = null; - - /** - * PropertyQuota serverErrorsPerProjectPerHour. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; - - /** - * PropertyQuota potentiallyThresholdedRequestsPerHour. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; - - /** - * PropertyQuota tokensPerProjectPerHour. - * @member {google.analytics.data.v1beta.IQuotaStatus|null|undefined} tokensPerProjectPerHour - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerProjectPerHour = null; - - /** - * Creates a new PropertyQuota instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {google.analytics.data.v1beta.IPropertyQuota=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota instance - */ - PropertyQuota.create = function create(properties) { - return new PropertyQuota(properties); - }; - - /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuota.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) - $root.google.analytics.data.v1beta.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.PropertyQuota.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {google.analytics.data.v1beta.IPropertyQuota} message PropertyQuota message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuota.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.PropertyQuota(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 2: { - message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 3: { - message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 5: { - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 6: { - message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyQuota.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PropertyQuota message. - * @function verify - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PropertyQuota.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerDay); - if (error) - return "tokensPerDay." + error; - } - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerHour); - if (error) - return "tokensPerHour." + error; - } - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.concurrentRequests); - if (error) - return "concurrentRequests." + error; - } - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); - if (error) - return "serverErrorsPerProjectPerHour." + error; - } - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); - if (error) - return "potentiallyThresholdedRequestsPerHour." + error; - } - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { - var error = $root.google.analytics.data.v1beta.QuotaStatus.verify(message.tokensPerProjectPerHour); - if (error) - return "tokensPerProjectPerHour." + error; - } - return null; - }; - - /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.PropertyQuota} PropertyQuota - */ - PropertyQuota.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.PropertyQuota) - return object; - var message = new $root.google.analytics.data.v1beta.PropertyQuota(); - if (object.tokensPerDay != null) { - if (typeof object.tokensPerDay !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerDay: object expected"); - message.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerDay); - } - if (object.tokensPerHour != null) { - if (typeof object.tokensPerHour !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerHour: object expected"); - message.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerHour); - } - if (object.concurrentRequests != null) { - if (typeof object.concurrentRequests !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.concurrentRequests: object expected"); - message.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.concurrentRequests); - } - if (object.serverErrorsPerProjectPerHour != null) { - if (typeof object.serverErrorsPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); - } - if (object.potentiallyThresholdedRequestsPerHour != null) { - if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); - } - if (object.tokensPerProjectPerHour != null) { - if (typeof object.tokensPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1beta.PropertyQuota.tokensPerProjectPerHour: object expected"); - message.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.fromObject(object.tokensPerProjectPerHour); - } - return message; - }; - - /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {google.analytics.data.v1beta.PropertyQuota} message PropertyQuota - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PropertyQuota.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tokensPerDay = null; - object.tokensPerHour = null; - object.concurrentRequests = null; - object.serverErrorsPerProjectPerHour = null; - object.potentiallyThresholdedRequestsPerHour = null; - object.tokensPerProjectPerHour = null; - } - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) - object.tokensPerDay = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerDay, options); - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) - object.tokensPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerHour, options); - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) - object.concurrentRequests = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.concurrentRequests, options); - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) - object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) - object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) - object.tokensPerProjectPerHour = $root.google.analytics.data.v1beta.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); - return object; - }; - - /** - * Converts this PropertyQuota to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.PropertyQuota - * @instance - * @returns {Object.} JSON object - */ - PropertyQuota.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PropertyQuota - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.PropertyQuota - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.PropertyQuota"; - }; - - return PropertyQuota; - })(); - - v1beta.QuotaStatus = (function() { - - /** - * Properties of a QuotaStatus. - * @memberof google.analytics.data.v1beta - * @interface IQuotaStatus - * @property {number|null} [consumed] QuotaStatus consumed - * @property {number|null} [remaining] QuotaStatus remaining - */ - - /** - * Constructs a new QuotaStatus. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a QuotaStatus. - * @implements IQuotaStatus - * @constructor - * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set - */ - function QuotaStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuotaStatus consumed. - * @member {number|null|undefined} consumed - * @memberof google.analytics.data.v1beta.QuotaStatus - * @instance - */ - QuotaStatus.prototype.consumed = null; - - /** - * QuotaStatus remaining. - * @member {number|null|undefined} remaining - * @memberof google.analytics.data.v1beta.QuotaStatus - * @instance - */ - QuotaStatus.prototype.remaining = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QuotaStatus.prototype, "_consumed", { - get: $util.oneOfGetter($oneOfFields = ["consumed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(QuotaStatus.prototype, "_remaining", { - get: $util.oneOfGetter($oneOfFields = ["remaining"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new QuotaStatus instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {google.analytics.data.v1beta.IQuotaStatus=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus instance - */ - QuotaStatus.create = function create(properties) { - return new QuotaStatus(properties); - }; - - /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); - if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); - return writer; - }; - - /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.QuotaStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {google.analytics.data.v1beta.IQuotaStatus} message QuotaStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaStatus.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.QuotaStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.consumed = reader.int32(); - break; - } - case 2: { - message.remaining = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuotaStatus message. - * @function verify - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuotaStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.consumed != null && message.hasOwnProperty("consumed")) { - properties._consumed = 1; - if (!$util.isInteger(message.consumed)) - return "consumed: integer expected"; - } - if (message.remaining != null && message.hasOwnProperty("remaining")) { - properties._remaining = 1; - if (!$util.isInteger(message.remaining)) - return "remaining: integer expected"; - } - return null; - }; - - /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.QuotaStatus} QuotaStatus - */ - QuotaStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.QuotaStatus) - return object; - var message = new $root.google.analytics.data.v1beta.QuotaStatus(); - if (object.consumed != null) - message.consumed = object.consumed | 0; - if (object.remaining != null) - message.remaining = object.remaining | 0; - return message; - }; - - /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {google.analytics.data.v1beta.QuotaStatus} message QuotaStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuotaStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.consumed != null && message.hasOwnProperty("consumed")) { - object.consumed = message.consumed; - if (options.oneofs) - object._consumed = "consumed"; - } - if (message.remaining != null && message.hasOwnProperty("remaining")) { - object.remaining = message.remaining; - if (options.oneofs) - object._remaining = "remaining"; - } - return object; - }; - - /** - * Converts this QuotaStatus to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.QuotaStatus - * @instance - * @returns {Object.} JSON object - */ - QuotaStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QuotaStatus - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.QuotaStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.QuotaStatus"; - }; - - return QuotaStatus; - })(); - - v1beta.DimensionMetadata = (function() { - - /** - * Properties of a DimensionMetadata. - * @memberof google.analytics.data.v1beta - * @interface IDimensionMetadata - * @property {string|null} [apiName] DimensionMetadata apiName - * @property {string|null} [uiName] DimensionMetadata uiName - * @property {string|null} [description] DimensionMetadata description - * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames - * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition - * @property {string|null} [category] DimensionMetadata category - */ - - /** - * Constructs a new DimensionMetadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DimensionMetadata. - * @implements IDimensionMetadata - * @constructor - * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set - */ - function DimensionMetadata(properties) { - this.deprecatedApiNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.apiName = ""; - - /** - * DimensionMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.uiName = ""; - - /** - * DimensionMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.description = ""; - - /** - * DimensionMetadata deprecatedApiNames. - * @member {Array.} deprecatedApiNames - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; - - /** - * DimensionMetadata customDefinition. - * @member {boolean} customDefinition - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.customDefinition = false; - - /** - * DimensionMetadata category. - * @member {string} category - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - */ - DimensionMetadata.prototype.category = ""; - - /** - * Creates a new DimensionMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {google.analytics.data.v1beta.IDimensionMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata instance - */ - DimensionMetadata.create = function create(properties) { - return new DimensionMetadata(properties); - }; - - /** - * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); - if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.category); - return writer; - }; - - /** - * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {google.analytics.data.v1beta.IDimensionMetadata} message DimensionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) - message.deprecatedApiNames = []; - message.deprecatedApiNames.push(reader.string()); - break; - } - case 5: { - message.customDefinition = reader.bool(); - break; - } - case 7: { - message.category = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionMetadata message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { - if (!Array.isArray(message.deprecatedApiNames)) - return "deprecatedApiNames: array expected"; - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - if (!$util.isString(message.deprecatedApiNames[i])) - return "deprecatedApiNames: string[] expected"; - } - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - if (typeof message.customDefinition !== "boolean") - return "customDefinition: boolean expected"; - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - return null; - }; - - /** - * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionMetadata} DimensionMetadata - */ - DimensionMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionMetadata) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - if (object.deprecatedApiNames) { - if (!Array.isArray(object.deprecatedApiNames)) - throw TypeError(".google.analytics.data.v1beta.DimensionMetadata.deprecatedApiNames: array expected"); - message.deprecatedApiNames = []; - for (var i = 0; i < object.deprecatedApiNames.length; ++i) - message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); - } - if (object.customDefinition != null) - message.customDefinition = Boolean(object.customDefinition); - if (object.category != null) - message.category = String(object.category); - return message; - }; - - /** - * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {google.analytics.data.v1beta.DimensionMetadata} message DimensionMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.deprecatedApiNames = []; - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - object.customDefinition = false; - object.category = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecatedApiNames && message.deprecatedApiNames.length) { - object.deprecatedApiNames = []; - for (var j = 0; j < message.deprecatedApiNames.length; ++j) - object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; - } - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - object.customDefinition = message.customDefinition; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - return object; - }; - - /** - * Converts this DimensionMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @instance - * @returns {Object.} JSON object - */ - DimensionMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionMetadata"; - }; - - return DimensionMetadata; - })(); - - v1beta.MetricMetadata = (function() { - - /** - * Properties of a MetricMetadata. - * @memberof google.analytics.data.v1beta - * @interface IMetricMetadata - * @property {string|null} [apiName] MetricMetadata apiName - * @property {string|null} [uiName] MetricMetadata uiName - * @property {string|null} [description] MetricMetadata description - * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames - * @property {google.analytics.data.v1beta.MetricType|null} [type] MetricMetadata type - * @property {string|null} [expression] MetricMetadata expression - * @property {boolean|null} [customDefinition] MetricMetadata customDefinition - * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons - * @property {string|null} [category] MetricMetadata category - */ - - /** - * Constructs a new MetricMetadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a MetricMetadata. - * @implements IMetricMetadata - * @constructor - * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set - */ - function MetricMetadata(properties) { - this.deprecatedApiNames = []; - this.blockedReasons = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.apiName = ""; - - /** - * MetricMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.uiName = ""; - - /** - * MetricMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.description = ""; - - /** - * MetricMetadata deprecatedApiNames. - * @member {Array.} deprecatedApiNames - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; - - /** - * MetricMetadata type. - * @member {google.analytics.data.v1beta.MetricType} type - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.type = 0; - - /** - * MetricMetadata expression. - * @member {string} expression - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.expression = ""; - - /** - * MetricMetadata customDefinition. - * @member {boolean} customDefinition - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.customDefinition = false; - - /** - * MetricMetadata blockedReasons. - * @member {Array.} blockedReasons - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.blockedReasons = $util.emptyArray; - - /** - * MetricMetadata category. - * @member {string} category - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - */ - MetricMetadata.prototype.category = ""; - - /** - * Creates a new MetricMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {google.analytics.data.v1beta.IMetricMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata instance - */ - MetricMetadata.create = function create(properties) { - return new MetricMetadata(properties); - }; - - /** - * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); - if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); - if (message.blockedReasons != null && message.blockedReasons.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.blockedReasons.length; ++i) - writer.int32(message.blockedReasons[i]); - writer.ldelim(); - } - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.category); - return writer; - }; - - /** - * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {google.analytics.data.v1beta.IMetricMetadata} message MetricMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) - message.deprecatedApiNames = []; - message.deprecatedApiNames.push(reader.string()); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.expression = reader.string(); - break; - } - case 7: { - message.customDefinition = reader.bool(); - break; - } - case 8: { - if (!(message.blockedReasons && message.blockedReasons.length)) - message.blockedReasons = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.blockedReasons.push(reader.int32()); - } else - message.blockedReasons.push(reader.int32()); - break; - } - case 10: { - message.category = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricMetadata message. - * @function verify - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { - if (!Array.isArray(message.deprecatedApiNames)) - return "deprecatedApiNames: array expected"; - for (var i = 0; i < message.deprecatedApiNames.length; ++i) - if (!$util.isString(message.deprecatedApiNames[i])) - return "deprecatedApiNames: string[] expected"; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - if (typeof message.customDefinition !== "boolean") - return "customDefinition: boolean expected"; - if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { - if (!Array.isArray(message.blockedReasons)) - return "blockedReasons: array expected"; - for (var i = 0; i < message.blockedReasons.length; ++i) - switch (message.blockedReasons[i]) { - default: - return "blockedReasons: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - return null; - }; - - /** - * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.MetricMetadata} MetricMetadata - */ - MetricMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.MetricMetadata) - return object; - var message = new $root.google.analytics.data.v1beta.MetricMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - if (object.deprecatedApiNames) { - if (!Array.isArray(object.deprecatedApiNames)) - throw TypeError(".google.analytics.data.v1beta.MetricMetadata.deprecatedApiNames: array expected"); - message.deprecatedApiNames = []; - for (var i = 0; i < object.deprecatedApiNames.length; ++i) - message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_INTEGER": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_SECONDS": - case 4: - message.type = 4; - break; - case "TYPE_MILLISECONDS": - case 5: - message.type = 5; - break; - case "TYPE_MINUTES": - case 6: - message.type = 6; - break; - case "TYPE_HOURS": - case 7: - message.type = 7; - break; - case "TYPE_STANDARD": - case 8: - message.type = 8; - break; - case "TYPE_CURRENCY": - case 9: - message.type = 9; - break; - case "TYPE_FEET": - case 10: - message.type = 10; - break; - case "TYPE_MILES": - case 11: - message.type = 11; - break; - case "TYPE_METERS": - case 12: - message.type = 12; - break; - case "TYPE_KILOMETERS": - case 13: - message.type = 13; - break; - } - if (object.expression != null) - message.expression = String(object.expression); - if (object.customDefinition != null) - message.customDefinition = Boolean(object.customDefinition); - if (object.blockedReasons) { - if (!Array.isArray(object.blockedReasons)) - throw TypeError(".google.analytics.data.v1beta.MetricMetadata.blockedReasons: array expected"); - message.blockedReasons = []; - for (var i = 0; i < object.blockedReasons.length; ++i) - switch (object.blockedReasons[i]) { - default: - if (typeof object.blockedReasons[i] === "number") { - message.blockedReasons[i] = object.blockedReasons[i]; - break; - } - case "BLOCKED_REASON_UNSPECIFIED": - case 0: - message.blockedReasons[i] = 0; - break; - case "NO_REVENUE_METRICS": - case 1: - message.blockedReasons[i] = 1; - break; - case "NO_COST_METRICS": - case 2: - message.blockedReasons[i] = 2; - break; - } - } - if (object.category != null) - message.category = String(object.category); - return message; - }; - - /** - * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {google.analytics.data.v1beta.MetricMetadata} message MetricMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.deprecatedApiNames = []; - object.blockedReasons = []; - } - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; - object.expression = ""; - object.customDefinition = false; - object.category = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecatedApiNames && message.deprecatedApiNames.length) { - object.deprecatedApiNames = []; - for (var j = 0; j < message.deprecatedApiNames.length; ++j) - object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.data.v1beta.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1beta.MetricType[message.type] : message.type; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) - object.customDefinition = message.customDefinition; - if (message.blockedReasons && message.blockedReasons.length) { - object.blockedReasons = []; - for (var j = 0; j < message.blockedReasons.length; ++j) - object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1beta.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - return object; - }; - - /** - * Converts this MetricMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.MetricMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.MetricMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.MetricMetadata"; - }; - - /** - * BlockedReason enum. - * @name google.analytics.data.v1beta.MetricMetadata.BlockedReason - * @enum {number} - * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value - * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value - * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value - */ - MetricMetadata.BlockedReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; - values[valuesById[2] = "NO_COST_METRICS"] = 2; - return values; - })(); - - return MetricMetadata; - })(); - - v1beta.ComparisonMetadata = (function() { - - /** - * Properties of a ComparisonMetadata. - * @memberof google.analytics.data.v1beta - * @interface IComparisonMetadata - * @property {string|null} [apiName] ComparisonMetadata apiName - * @property {string|null} [uiName] ComparisonMetadata uiName - * @property {string|null} [description] ComparisonMetadata description - */ - - /** - * Constructs a new ComparisonMetadata. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a ComparisonMetadata. - * @implements IComparisonMetadata - * @constructor - * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set - */ - function ComparisonMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComparisonMetadata apiName. - * @member {string} apiName - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.apiName = ""; - - /** - * ComparisonMetadata uiName. - * @member {string} uiName - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.uiName = ""; - - /** - * ComparisonMetadata description. - * @member {string} description - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @instance - */ - ComparisonMetadata.prototype.description = ""; - - /** - * Creates a new ComparisonMetadata instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata instance - */ - ComparisonMetadata.create = function create(properties) { - return new ComparisonMetadata(properties); - }; - - /** - * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComparisonMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); - if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; - - /** - * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComparisonMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.apiName = reader.string(); - break; - } - case 2: { - message.uiName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComparisonMetadata message. - * @function verify - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComparisonMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.apiName != null && message.hasOwnProperty("apiName")) - if (!$util.isString(message.apiName)) - return "apiName: string expected"; - if (message.uiName != null && message.hasOwnProperty("uiName")) - if (!$util.isString(message.uiName)) - return "uiName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata - */ - ComparisonMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.ComparisonMetadata) - return object; - var message = new $root.google.analytics.data.v1beta.ComparisonMetadata(); - if (object.apiName != null) - message.apiName = String(object.apiName); - if (object.uiName != null) - message.uiName = String(object.uiName); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {google.analytics.data.v1beta.ComparisonMetadata} message ComparisonMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComparisonMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.apiName = ""; - object.uiName = ""; - object.description = ""; - } - if (message.apiName != null && message.hasOwnProperty("apiName")) - object.apiName = message.apiName; - if (message.uiName != null && message.hasOwnProperty("uiName")) - object.uiName = message.uiName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this ComparisonMetadata to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @instance - * @returns {Object.} JSON object - */ - ComparisonMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComparisonMetadata - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.ComparisonMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.ComparisonMetadata"; - }; - - return ComparisonMetadata; - })(); - - v1beta.DimensionCompatibility = (function() { - - /** - * Properties of a DimensionCompatibility. - * @memberof google.analytics.data.v1beta - * @interface IDimensionCompatibility - * @property {google.analytics.data.v1beta.IDimensionMetadata|null} [dimensionMetadata] DimensionCompatibility dimensionMetadata - * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] DimensionCompatibility compatibility - */ - - /** - * Constructs a new DimensionCompatibility. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a DimensionCompatibility. - * @implements IDimensionCompatibility - * @constructor - * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set - */ - function DimensionCompatibility(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DimensionCompatibility dimensionMetadata. - * @member {google.analytics.data.v1beta.IDimensionMetadata|null|undefined} dimensionMetadata - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @instance - */ - DimensionCompatibility.prototype.dimensionMetadata = null; - - /** - * DimensionCompatibility compatibility. - * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @instance - */ - DimensionCompatibility.prototype.compatibility = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DimensionCompatibility.prototype, "_dimensionMetadata", { - get: $util.oneOfGetter($oneOfFields = ["dimensionMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DimensionCompatibility.prototype, "_compatibility", { - get: $util.oneOfGetter($oneOfFields = ["compatibility"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DimensionCompatibility instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {google.analytics.data.v1beta.IDimensionCompatibility=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility instance - */ - DimensionCompatibility.create = function create(properties) { - return new DimensionCompatibility(properties); - }; - - /** - * Encodes the specified DimensionCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionCompatibility.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionMetadata != null && Object.hasOwnProperty.call(message, "dimensionMetadata")) - $root.google.analytics.data.v1beta.DimensionMetadata.encode(message.dimensionMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); - return writer; - }; - - /** - * Encodes the specified DimensionCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.DimensionCompatibility.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {google.analytics.data.v1beta.IDimensionCompatibility} message DimensionCompatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionCompatibility.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionCompatibility message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionCompatibility.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - message.compatibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DimensionCompatibility message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionCompatibility.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionCompatibility message. - * @function verify - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionCompatibility.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { - properties._dimensionMetadata = 1; - { - var error = $root.google.analytics.data.v1beta.DimensionMetadata.verify(message.dimensionMetadata); - if (error) - return "dimensionMetadata." + error; - } - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - properties._compatibility = 1; - switch (message.compatibility) { - default: - return "compatibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a DimensionCompatibility message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.DimensionCompatibility} DimensionCompatibility - */ - DimensionCompatibility.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.DimensionCompatibility) - return object; - var message = new $root.google.analytics.data.v1beta.DimensionCompatibility(); - if (object.dimensionMetadata != null) { - if (typeof object.dimensionMetadata !== "object") - throw TypeError(".google.analytics.data.v1beta.DimensionCompatibility.dimensionMetadata: object expected"); - message.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.fromObject(object.dimensionMetadata); - } - switch (object.compatibility) { - default: - if (typeof object.compatibility === "number") { - message.compatibility = object.compatibility; - break; - } - break; - case "COMPATIBILITY_UNSPECIFIED": - case 0: - message.compatibility = 0; - break; - case "COMPATIBLE": - case 1: - message.compatibility = 1; - break; - case "INCOMPATIBLE": - case 2: - message.compatibility = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a DimensionCompatibility message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {google.analytics.data.v1beta.DimensionCompatibility} message DimensionCompatibility - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionCompatibility.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dimensionMetadata != null && message.hasOwnProperty("dimensionMetadata")) { - object.dimensionMetadata = $root.google.analytics.data.v1beta.DimensionMetadata.toObject(message.dimensionMetadata, options); - if (options.oneofs) - object._dimensionMetadata = "dimensionMetadata"; - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; - if (options.oneofs) - object._compatibility = "compatibility"; - } - return object; - }; - - /** - * Converts this DimensionCompatibility to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @instance - * @returns {Object.} JSON object - */ - DimensionCompatibility.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DimensionCompatibility - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.DimensionCompatibility - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.DimensionCompatibility"; - }; - - return DimensionCompatibility; - })(); - - v1beta.MetricCompatibility = (function() { - - /** - * Properties of a MetricCompatibility. - * @memberof google.analytics.data.v1beta - * @interface IMetricCompatibility - * @property {google.analytics.data.v1beta.IMetricMetadata|null} [metricMetadata] MetricCompatibility metricMetadata - * @property {google.analytics.data.v1beta.Compatibility|null} [compatibility] MetricCompatibility compatibility - */ - - /** - * Constructs a new MetricCompatibility. - * @memberof google.analytics.data.v1beta - * @classdesc Represents a MetricCompatibility. - * @implements IMetricCompatibility - * @constructor - * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set - */ - function MetricCompatibility(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetricCompatibility metricMetadata. - * @member {google.analytics.data.v1beta.IMetricMetadata|null|undefined} metricMetadata - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @instance - */ - MetricCompatibility.prototype.metricMetadata = null; - - /** - * MetricCompatibility compatibility. - * @member {google.analytics.data.v1beta.Compatibility|null|undefined} compatibility - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @instance - */ - MetricCompatibility.prototype.compatibility = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MetricCompatibility.prototype, "_metricMetadata", { - get: $util.oneOfGetter($oneOfFields = ["metricMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MetricCompatibility.prototype, "_compatibility", { - get: $util.oneOfGetter($oneOfFields = ["compatibility"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MetricCompatibility instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {google.analytics.data.v1beta.IMetricCompatibility=} [properties] Properties to set - * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility instance - */ - MetricCompatibility.create = function create(properties) { - return new MetricCompatibility(properties); - }; - - /** - * Encodes the specified MetricCompatibility message. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricCompatibility.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricMetadata != null && Object.hasOwnProperty.call(message, "metricMetadata")) - $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metricMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); - return writer; - }; - - /** - * Encodes the specified MetricCompatibility message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.MetricCompatibility.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {google.analytics.data.v1beta.IMetricCompatibility} message MetricCompatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricCompatibility.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricCompatibility message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricCompatibility.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.MetricCompatibility(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - message.compatibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricCompatibility message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricCompatibility.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricCompatibility message. - * @function verify - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricCompatibility.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { - properties._metricMetadata = 1; - { - var error = $root.google.analytics.data.v1beta.MetricMetadata.verify(message.metricMetadata); - if (error) - return "metricMetadata." + error; - } - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - properties._compatibility = 1; - switch (message.compatibility) { - default: - return "compatibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a MetricCompatibility message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1beta.MetricCompatibility} MetricCompatibility - */ - MetricCompatibility.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1beta.MetricCompatibility) - return object; - var message = new $root.google.analytics.data.v1beta.MetricCompatibility(); - if (object.metricMetadata != null) { - if (typeof object.metricMetadata !== "object") - throw TypeError(".google.analytics.data.v1beta.MetricCompatibility.metricMetadata: object expected"); - message.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metricMetadata); - } - switch (object.compatibility) { - default: - if (typeof object.compatibility === "number") { - message.compatibility = object.compatibility; - break; - } - break; - case "COMPATIBILITY_UNSPECIFIED": - case 0: - message.compatibility = 0; - break; - case "COMPATIBLE": - case 1: - message.compatibility = 1; - break; - case "INCOMPATIBLE": - case 2: - message.compatibility = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MetricCompatibility message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {google.analytics.data.v1beta.MetricCompatibility} message MetricCompatibility - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricCompatibility.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.metricMetadata != null && message.hasOwnProperty("metricMetadata")) { - object.metricMetadata = $root.google.analytics.data.v1beta.MetricMetadata.toObject(message.metricMetadata, options); - if (options.oneofs) - object._metricMetadata = "metricMetadata"; - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - object.compatibility = options.enums === String ? $root.google.analytics.data.v1beta.Compatibility[message.compatibility] === undefined ? message.compatibility : $root.google.analytics.data.v1beta.Compatibility[message.compatibility] : message.compatibility; - if (options.oneofs) - object._compatibility = "compatibility"; - } - return object; - }; - - /** - * Converts this MetricCompatibility to JSON. - * @function toJSON - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @instance - * @returns {Object.} JSON object - */ - MetricCompatibility.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricCompatibility - * @function getTypeUrl - * @memberof google.analytics.data.v1beta.MetricCompatibility - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricCompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1beta.MetricCompatibility"; - }; - - return MetricCompatibility; - })(); - - /** - * MetricAggregation enum. - * @name google.analytics.data.v1beta.MetricAggregation - * @enum {number} - * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value - * @property {number} TOTAL=1 TOTAL value - * @property {number} MINIMUM=5 MINIMUM value - * @property {number} MAXIMUM=6 MAXIMUM value - * @property {number} COUNT=4 COUNT value - */ - v1beta.MetricAggregation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOTAL"] = 1; - values[valuesById[5] = "MINIMUM"] = 5; - values[valuesById[6] = "MAXIMUM"] = 6; - values[valuesById[4] = "COUNT"] = 4; - return values; - })(); - - /** - * MetricType enum. - * @name google.analytics.data.v1beta.MetricType - * @enum {number} - * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value - * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value - * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value - * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value - * @property {number} TYPE_HOURS=7 TYPE_HOURS value - * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value - * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value - * @property {number} TYPE_FEET=10 TYPE_FEET value - * @property {number} TYPE_MILES=11 TYPE_MILES value - * @property {number} TYPE_METERS=12 TYPE_METERS value - * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value - */ - v1beta.MetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_INTEGER"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[4] = "TYPE_SECONDS"] = 4; - values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; - values[valuesById[6] = "TYPE_MINUTES"] = 6; - values[valuesById[7] = "TYPE_HOURS"] = 7; - values[valuesById[8] = "TYPE_STANDARD"] = 8; - values[valuesById[9] = "TYPE_CURRENCY"] = 9; - values[valuesById[10] = "TYPE_FEET"] = 10; - values[valuesById[11] = "TYPE_MILES"] = 11; - values[valuesById[12] = "TYPE_METERS"] = 12; - values[valuesById[13] = "TYPE_KILOMETERS"] = 13; - return values; - })(); - - /** - * RestrictedMetricType enum. - * @name google.analytics.data.v1beta.RestrictedMetricType - * @enum {number} - * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value - * @property {number} COST_DATA=1 COST_DATA value - * @property {number} REVENUE_DATA=2 REVENUE_DATA value - */ - v1beta.RestrictedMetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COST_DATA"] = 1; - values[valuesById[2] = "REVENUE_DATA"] = 2; - return values; - })(); - - /** - * Compatibility enum. - * @name google.analytics.data.v1beta.Compatibility - * @enum {number} - * @property {number} COMPATIBILITY_UNSPECIFIED=0 COMPATIBILITY_UNSPECIFIED value - * @property {number} COMPATIBLE=1 COMPATIBLE value - * @property {number} INCOMPATIBLE=2 INCOMPATIBLE value - */ - v1beta.Compatibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPATIBILITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPATIBLE"] = 1; - values[valuesById[2] = "INCOMPATIBLE"] = 2; - return values; - })(); - - return v1beta; - })(); - - return data; - })(); - - return analytics; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-analytics-data/protos/protos.json b/owl-bot-staging/google-analytics-data/protos/protos.json deleted file mode 100644 index 1fbae0bb7ac9..000000000000 --- a/owl-bot-staging/google-analytics-data/protos/protos.json +++ /dev/null @@ -1,7286 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "edition": "proto2", - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "analytics": { - "nested": { - "data": { - "nested": { - "v1alpha": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data", - "java_multiple_files": true, - "java_outer_classname": "ReportingApiProto", - "java_package": "com.google.analytics.data.v1alpha", - "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", - "(google.api.resource_definition).pattern": "properties/{property}" - }, - "nested": { - "AlphaAnalyticsData": { - "options": { - "(google.api.default_host)": "analyticsdata.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" - }, - "methods": { - "RunFunnelReport": { - "requestType": "RunFunnelReportRequest", - "responseType": "RunFunnelReportResponse", - "options": { - "(google.api.http).post": "/v1alpha/{property=properties/*}:runFunnelReport", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{property=properties/*}:runFunnelReport", - "body": "*" - } - } - ] - }, - "CreateAudienceList": { - "requestType": "CreateAudienceListRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha/{parent=properties/*}/audienceLists", - "(google.api.http).body": "audience_list", - "(google.api.method_signature)": "parent,audience_list", - "(google.longrunning.operation_info).response_type": "AudienceList", - "(google.longrunning.operation_info).metadata_type": "AudienceListMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{parent=properties/*}/audienceLists", - "body": "audience_list" - } - }, - { - "(google.api.method_signature)": "parent,audience_list" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "AudienceList", - "metadata_type": "AudienceListMetadata" - } - } - ] - }, - "QueryAudienceList": { - "requestType": "QueryAudienceListRequest", - "responseType": "QueryAudienceListResponse", - "options": { - "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:query", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{name=properties/*/audienceLists/*}:query", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetAudienceList": { - "requestType": "GetAudienceListRequest", - "responseType": "AudienceList", - "options": { - "(google.api.http).get": "/v1alpha/{name=properties/*/audienceLists/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=properties/*/audienceLists/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListAudienceLists": { - "requestType": "ListAudienceListsRequest", - "responseType": "ListAudienceListsResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=properties/*}/audienceLists", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=properties/*}/audienceLists" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateRecurringAudienceList": { - "requestType": "CreateRecurringAudienceListRequest", - "responseType": "RecurringAudienceList", - "options": { - "(google.api.http).post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", - "(google.api.http).body": "recurring_audience_list", - "(google.api.method_signature)": "parent,recurring_audience_list" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{parent=properties/*}/recurringAudienceLists", - "body": "recurring_audience_list" - } - }, - { - "(google.api.method_signature)": "parent,recurring_audience_list" - } - ] - }, - "GetRecurringAudienceList": { - "requestType": "GetRecurringAudienceListRequest", - "responseType": "RecurringAudienceList", - "options": { - "(google.api.http).get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=properties/*/recurringAudienceLists/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListRecurringAudienceLists": { - "requestType": "ListRecurringAudienceListsRequest", - "responseType": "ListRecurringAudienceListsResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=properties/*}/recurringAudienceLists", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=properties/*}/recurringAudienceLists" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPropertyQuotasSnapshot": { - "requestType": "GetPropertyQuotasSnapshotRequest", - "responseType": "PropertyQuotasSnapshot", - "options": { - "(google.api.http).get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateReportTask": { - "requestType": "CreateReportTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha/{parent=properties/*}/reportTasks", - "(google.api.http).body": "report_task", - "(google.api.method_signature)": "parent,report_task", - "(google.longrunning.operation_info).response_type": "ReportTask", - "(google.longrunning.operation_info).metadata_type": "ReportTaskMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{parent=properties/*}/reportTasks", - "body": "report_task" - } - }, - { - "(google.api.method_signature)": "parent,report_task" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ReportTask", - "metadata_type": "ReportTaskMetadata" - } - } - ] - }, - "QueryReportTask": { - "requestType": "QueryReportTaskRequest", - "responseType": "QueryReportTaskResponse", - "options": { - "(google.api.http).post": "/v1alpha/{name=properties/*/reportTasks/*}:query", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{name=properties/*/reportTasks/*}:query", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetReportTask": { - "requestType": "GetReportTaskRequest", - "responseType": "ReportTask", - "options": { - "(google.api.http).get": "/v1alpha/{name=properties/*/reportTasks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=properties/*/reportTasks/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListReportTasks": { - "requestType": "ListReportTasksRequest", - "responseType": "ListReportTasksResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=properties/*}/reportTasks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=properties/*}/reportTasks" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "RunReport": { - "requestType": "RunReportRequest", - "responseType": "RunReportResponse", - "options": { - "(google.api.http).post": "/v1alpha/{property=properties/*}:runReport", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{property=properties/*}:runReport", - "body": "*" - } - } - ] - }, - "GetMetadata": { - "requestType": "GetMetadataRequest", - "responseType": "Metadata", - "options": { - "(google.api.http).get": "/v1alpha/{name=properties/*/metadata}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=properties/*/metadata}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "CreateRecurringAudienceListRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" - } - }, - "recurringAudienceList": { - "type": "RecurringAudienceList", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RecurringAudienceList": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/RecurringAudienceList", - "(google.api.resource).pattern": "properties/{property}/recurringAudienceLists/{recurring_audience_list}", - "(google.api.resource).plural": "recurringAudienceLists", - "(google.api.resource).singular": "recurringAudienceList" - }, - "oneofs": { - "_activeDaysRemaining": { - "oneof": [ - "activeDaysRemaining" - ] - }, - "_webhookNotification": { - "oneof": [ - "webhookNotification" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "audience": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "audienceDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dimensions": { - "rule": "repeated", - "type": "AudienceDimension", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "activeDaysRemaining": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "audienceLists": { - "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "webhookNotification": { - "type": "WebhookNotification", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "WebhookNotification": { - "oneofs": { - "_uri": { - "oneof": [ - "uri" - ] - }, - "_channelToken": { - "oneof": [ - "channelToken" - ] - } - }, - "fields": { - "uri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "channelToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "GetRecurringAudienceListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/RecurringAudienceList" - } - } - } - }, - "ListRecurringAudienceListsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/RecurringAudienceList" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListRecurringAudienceListsResponse": { - "oneofs": { - "_nextPageToken": { - "oneof": [ - "nextPageToken" - ] - } - }, - "fields": { - "recurringAudienceLists": { - "rule": "repeated", - "type": "RecurringAudienceList", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "GetPropertyQuotasSnapshotRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot" - } - } - } - }, - "PropertyQuotasSnapshot": { - "options": { - "(google.api.resource).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot", - "(google.api.resource).pattern": "properties/{property}/propertyQuotasSnapshot", - "(google.api.resource).plural": "propertyQuotasSnapshots", - "(google.api.resource).singular": "propertyQuotasSnapshot" - }, - "fields": { - "name": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "corePropertyQuota": { - "type": "PropertyQuota", - "id": 1 - }, - "realtimePropertyQuota": { - "type": "PropertyQuota", - "id": 2 - }, - "funnelPropertyQuota": { - "type": "PropertyQuota", - "id": 3 - } - } - }, - "GetAudienceListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" - } - } - } - }, - "ListAudienceListsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListAudienceListsResponse": { - "oneofs": { - "_nextPageToken": { - "oneof": [ - "nextPageToken" - ] - } - }, - "fields": { - "audienceLists": { - "rule": "repeated", - "type": "AudienceList", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "CreateAudienceListRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceList" - } - }, - "audienceList": { - "type": "AudienceList", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "AudienceList": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceList", - "(google.api.resource).pattern": "properties/{property}/audienceLists/{audience_list}", - "(google.api.resource).plural": "audienceLists", - "(google.api.resource).singular": "audienceList" - }, - "oneofs": { - "_state": { - "oneof": [ - "state" - ] - }, - "_beginCreatingTime": { - "oneof": [ - "beginCreatingTime" - ] - }, - "_rowCount": { - "oneof": [ - "rowCount" - ] - }, - "_errorMessage": { - "oneof": [ - "errorMessage" - ] - }, - "_percentageCompleted": { - "oneof": [ - "percentageCompleted" - ] - }, - "_recurringAudienceList": { - "oneof": [ - "recurringAudienceList" - ] - }, - "_webhookNotification": { - "oneof": [ - "webhookNotification" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "audience": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "audienceDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dimensions": { - "rule": "repeated", - "type": "AudienceDimension", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "beginCreatingTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "creationQuotaTokensCharged": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rowCount": { - "type": "int32", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "errorMessage": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "percentageCompleted": { - "type": "double", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "recurringAudienceList": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "webhookNotification": { - "type": "WebhookNotification", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "FAILED": 3 - } - } - } - }, - "AudienceListMetadata": { - "fields": {} - }, - "QueryAudienceListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "offset": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "QueryAudienceListResponse": { - "oneofs": { - "_audienceList": { - "oneof": [ - "audienceList" - ] - }, - "_rowCount": { - "oneof": [ - "rowCount" - ] - } - }, - "fields": { - "audienceList": { - "type": "AudienceList", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "audienceRows": { - "rule": "repeated", - "type": "AudienceRow", - "id": 2 - }, - "rowCount": { - "type": "int32", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "AudienceRow": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "AudienceDimensionValue", - "id": 1 - } - } - }, - "AudienceDimension": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AudienceDimensionValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "RunFunnelReportRequest": { - "fields": { - "property": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dateRanges": { - "rule": "repeated", - "type": "DateRange", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "funnel": { - "type": "Funnel", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "funnelBreakdown": { - "type": "FunnelBreakdown", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "funnelNextAction": { - "type": "FunnelNextAction", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "funnelVisualizationType": { - "type": "FunnelVisualizationType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "segments": { - "rule": "repeated", - "type": "Segment", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "returnPropertyQuota": { - "type": "bool", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "FunnelVisualizationType": { - "values": { - "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": 0, - "STANDARD_FUNNEL": 1, - "TRENDED_FUNNEL": 2 - } - } - } - }, - "RunFunnelReportResponse": { - "fields": { - "funnelTable": { - "type": "FunnelSubReport", - "id": 1 - }, - "funnelVisualization": { - "type": "FunnelSubReport", - "id": 2 - }, - "propertyQuota": { - "type": "PropertyQuota", - "id": 3 - }, - "kind": { - "type": "string", - "id": 4 - } - } - }, - "ReportTask": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/ReportTask", - "(google.api.resource).pattern": "properties/{property}/reportTasks/{report_task}", - "(google.api.resource).plural": "reportTasks", - "(google.api.resource).singular": "reportTask" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reportDefinition": { - "type": "ReportDefinition", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "reportMetadata": { - "type": "ReportMetadata", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "ReportDefinition": { - "oneofs": { - "_samplingLevel": { - "oneof": [ - "samplingLevel" - ] - } - }, - "fields": { - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dateRanges": { - "rule": "repeated", - "type": "DateRange", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metricFilter": { - "type": "FilterExpression", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "offset": { - "type": "int64", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metricAggregations": { - "rule": "repeated", - "type": "MetricAggregation", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBys": { - "rule": "repeated", - "type": "OrderBy", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "currencyCode": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cohortSpec": { - "type": "CohortSpec", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "keepEmptyRows": { - "type": "bool", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "samplingLevel": { - "type": "SamplingLevel", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ReportMetadata": { - "oneofs": { - "_state": { - "oneof": [ - "state" - ] - }, - "_beginCreatingTime": { - "oneof": [ - "beginCreatingTime" - ] - }, - "_taskRowCount": { - "oneof": [ - "taskRowCount" - ] - }, - "_errorMessage": { - "oneof": [ - "errorMessage" - ] - }, - "_totalRowCount": { - "oneof": [ - "totalRowCount" - ] - } - }, - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "beginCreatingTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "creationQuotaTokensCharged": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "taskRowCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "errorMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "totalRowCount": { - "type": "int32", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "FAILED": 3 - } - } - } - } - } - }, - "CreateReportTaskRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" - } - }, - "reportTask": { - "type": "ReportTask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ReportTaskMetadata": { - "fields": {} - }, - "QueryReportTaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "offset": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "QueryReportTaskResponse": { - "fields": { - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 1 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 2 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 3 - }, - "totals": { - "rule": "repeated", - "type": "Row", - "id": 4 - }, - "maximums": { - "rule": "repeated", - "type": "Row", - "id": 5 - }, - "minimums": { - "rule": "repeated", - "type": "Row", - "id": 6 - }, - "rowCount": { - "type": "int32", - "id": 7 - }, - "metadata": { - "type": "ResponseMetaData", - "id": 8 - } - } - }, - "GetReportTaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/ReportTask" - } - } - } - }, - "ListReportTasksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/ReportTask" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListReportTasksResponse": { - "oneofs": { - "_nextPageToken": { - "oneof": [ - "nextPageToken" - ] - } - }, - "fields": { - "reportTasks": { - "rule": "repeated", - "type": "ReportTask", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "RunReportRequest": { - "fields": { - "property": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dateRanges": { - "rule": "repeated", - "type": "DateRange", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metricFilter": { - "type": "FilterExpression", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "offset": { - "type": "int64", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "metricAggregations": { - "rule": "repeated", - "type": "MetricAggregation", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBys": { - "rule": "repeated", - "type": "OrderBy", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "currencyCode": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cohortSpec": { - "type": "CohortSpec", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "keepEmptyRows": { - "type": "bool", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "returnPropertyQuota": { - "type": "bool", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "comparisons": { - "rule": "repeated", - "type": "Comparison", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "conversionSpec": { - "type": "ConversionSpec", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RunReportResponse": { - "oneofs": { - "_nextPageToken": { - "oneof": [ - "nextPageToken" - ] - } - }, - "fields": { - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 1 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 2 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 3 - }, - "totals": { - "rule": "repeated", - "type": "Row", - "id": 4 - }, - "maximums": { - "rule": "repeated", - "type": "Row", - "id": 5 - }, - "minimums": { - "rule": "repeated", - "type": "Row", - "id": 6 - }, - "rowCount": { - "type": "int32", - "id": 7 - }, - "metadata": { - "type": "ResponseMetaData", - "id": 8 - }, - "propertyQuota": { - "type": "PropertyQuota", - "id": 9 - }, - "kind": { - "type": "string", - "id": 10 - }, - "nextPageToken": { - "type": "string", - "id": 11, - "options": { - "proto3_optional": true - } - } - } - }, - "GetMetadataRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" - } - } - } - }, - "Metadata": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", - "(google.api.resource).pattern": "properties/{property}/metadata" - }, - "fields": { - "name": { - "type": "string", - "id": 3 - }, - "dimensions": { - "rule": "repeated", - "type": "DimensionMetadata", - "id": 1 - }, - "metrics": { - "rule": "repeated", - "type": "MetricMetadata", - "id": 2 - }, - "comparisons": { - "rule": "repeated", - "type": "ComparisonMetadata", - "id": 4 - }, - "conversions": { - "rule": "repeated", - "type": "ConversionMetadata", - "id": 5 - } - } - }, - "DateRange": { - "fields": { - "startDate": { - "type": "string", - "id": 1 - }, - "endDate": { - "type": "string", - "id": 2 - }, - "name": { - "type": "string", - "id": 3 - } - } - }, - "Dimension": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "dimensionExpression": { - "type": "DimensionExpression", - "id": 2 - } - } - }, - "DimensionExpression": { - "oneofs": { - "oneExpression": { - "oneof": [ - "lowerCase", - "upperCase", - "concatenate" - ] - } - }, - "fields": { - "lowerCase": { - "type": "CaseExpression", - "id": 4 - }, - "upperCase": { - "type": "CaseExpression", - "id": 5 - }, - "concatenate": { - "type": "ConcatenateExpression", - "id": 6 - } - }, - "nested": { - "CaseExpression": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1 - } - } - }, - "ConcatenateExpression": { - "fields": { - "dimensionNames": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "delimiter": { - "type": "string", - "id": 2 - } - } - } - } - }, - "Metric": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "expression": { - "type": "string", - "id": 2 - }, - "invisible": { - "type": "bool", - "id": 3 - } - } - }, - "Comparison": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "oneComparison": { - "oneof": [ - "dimensionFilter", - "comparison" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 2 - }, - "comparison": { - "type": "string", - "id": 3 - } - } - }, - "FilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "filter" - ] - } - }, - "fields": { - "andGroup": { - "type": "FilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "FilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "FilterExpression", - "id": 3 - }, - "filter": { - "type": "Filter", - "id": 4 - } - } - }, - "FilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "FilterExpression", - "id": 1 - } - } - }, - "Filter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter", - "emptyFilter" - ] - } - }, - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "stringFilter": { - "type": "StringFilter", - "id": 2 - }, - "inListFilter": { - "type": "InListFilter", - "id": 3 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 4 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 5 - }, - "emptyFilter": { - "type": "EmptyFilter", - "id": 6 - } - } - }, - "StringFilter": { - "fields": { - "matchType": { - "type": "MatchType", - "id": 1 - }, - "value": { - "type": "string", - "id": 2 - }, - "caseSensitive": { - "type": "bool", - "id": 3 - } - }, - "nested": { - "MatchType": { - "values": { - "MATCH_TYPE_UNSPECIFIED": 0, - "EXACT": 1, - "BEGINS_WITH": 2, - "ENDS_WITH": 3, - "CONTAINS": 4, - "FULL_REGEXP": 5, - "PARTIAL_REGEXP": 6 - } - } - } - }, - "InListFilter": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "caseSensitive": { - "type": "bool", - "id": 2 - } - } - }, - "NumericFilter": { - "fields": { - "operation": { - "type": "Operation", - "id": 1 - }, - "value": { - "type": "NumericValue", - "id": 2 - } - }, - "nested": { - "Operation": { - "values": { - "OPERATION_UNSPECIFIED": 0, - "EQUAL": 1, - "LESS_THAN": 2, - "LESS_THAN_OR_EQUAL": 3, - "GREATER_THAN": 4, - "GREATER_THAN_OR_EQUAL": 5 - } - } - } - }, - "OrderBy": { - "oneofs": { - "oneOrderBy": { - "oneof": [ - "metric", - "dimension" - ] - } - }, - "fields": { - "metric": { - "type": "MetricOrderBy", - "id": 1 - }, - "dimension": { - "type": "DimensionOrderBy", - "id": 2 - }, - "desc": { - "type": "bool", - "id": 4 - } - }, - "nested": { - "MetricOrderBy": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - } - } - }, - "DimensionOrderBy": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1 - }, - "orderType": { - "type": "OrderType", - "id": 2 - } - }, - "nested": { - "OrderType": { - "values": { - "ORDER_TYPE_UNSPECIFIED": 0, - "ALPHANUMERIC": 1, - "CASE_INSENSITIVE_ALPHANUMERIC": 2, - "NUMERIC": 3 - } - } - } - } - } - }, - "BetweenFilter": { - "fields": { - "fromValue": { - "type": "NumericValue", - "id": 1 - }, - "toValue": { - "type": "NumericValue", - "id": 2 - } - } - }, - "EmptyFilter": { - "fields": {} - }, - "NumericValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "int64Value", - "doubleValue" - ] - } - }, - "fields": { - "int64Value": { - "type": "int64", - "id": 1 - }, - "doubleValue": { - "type": "double", - "id": 2 - } - } - }, - "CohortSpec": { - "fields": { - "cohorts": { - "rule": "repeated", - "type": "Cohort", - "id": 1 - }, - "cohortsRange": { - "type": "CohortsRange", - "id": 2 - }, - "cohortReportSettings": { - "type": "CohortReportSettings", - "id": 3 - } - } - }, - "Cohort": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "dimension": { - "type": "string", - "id": 2 - }, - "dateRange": { - "type": "DateRange", - "id": 3 - } - } - }, - "CohortsRange": { - "fields": { - "granularity": { - "type": "Granularity", - "id": 1 - }, - "startOffset": { - "type": "int32", - "id": 2 - }, - "endOffset": { - "type": "int32", - "id": 3 - } - }, - "nested": { - "Granularity": { - "values": { - "GRANULARITY_UNSPECIFIED": 0, - "DAILY": 1, - "WEEKLY": 2, - "MONTHLY": 3 - } - } - } - }, - "CohortReportSettings": { - "fields": { - "accumulate": { - "type": "bool", - "id": 1 - } - } - }, - "Section": { - "values": { - "SECTION_UNSPECIFIED": 0, - "SECTION_REPORT": 1, - "SECTION_ADVERTISING": 2 - } - }, - "ResponseMetaData": { - "oneofs": { - "_schemaRestrictionResponse": { - "oneof": [ - "schemaRestrictionResponse" - ] - }, - "_currencyCode": { - "oneof": [ - "currencyCode" - ] - }, - "_timeZone": { - "oneof": [ - "timeZone" - ] - }, - "_emptyReason": { - "oneof": [ - "emptyReason" - ] - }, - "_subjectToThresholding": { - "oneof": [ - "subjectToThresholding" - ] - } - }, - "fields": { - "dataLossFromOtherRow": { - "type": "bool", - "id": 3 - }, - "schemaRestrictionResponse": { - "type": "SchemaRestrictionResponse", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "currencyCode": { - "type": "string", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "timeZone": { - "type": "string", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "emptyReason": { - "type": "string", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "subjectToThresholding": { - "type": "bool", - "id": 8, - "options": { - "proto3_optional": true - } - }, - "samplingMetadatas": { - "rule": "repeated", - "type": "SamplingMetadata", - "id": 9 - }, - "section": { - "type": "Section", - "id": 10 - } - }, - "nested": { - "SchemaRestrictionResponse": { - "fields": { - "activeMetricRestrictions": { - "rule": "repeated", - "type": "ActiveMetricRestriction", - "id": 1 - } - }, - "nested": { - "ActiveMetricRestriction": { - "oneofs": { - "_metricName": { - "oneof": [ - "metricName" - ] - } - }, - "fields": { - "metricName": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "restrictedMetricTypes": { - "rule": "repeated", - "type": "RestrictedMetricType", - "id": 2 - } - } - } - } - } - } - }, - "DimensionHeader": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "MetricHeader": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "MetricType", - "id": 2 - } - } - }, - "Row": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "DimensionValue", - "id": 1 - }, - "metricValues": { - "rule": "repeated", - "type": "MetricValue", - "id": 2 - } - } - }, - "DimensionValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "MetricValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 4 - } - } - }, - "PropertyQuota": { - "fields": { - "tokensPerDay": { - "type": "QuotaStatus", - "id": 1 - }, - "tokensPerHour": { - "type": "QuotaStatus", - "id": 2 - }, - "concurrentRequests": { - "type": "QuotaStatus", - "id": 3 - }, - "serverErrorsPerProjectPerHour": { - "type": "QuotaStatus", - "id": 4 - }, - "potentiallyThresholdedRequestsPerHour": { - "type": "QuotaStatus", - "id": 5 - }, - "tokensPerProjectPerHour": { - "type": "QuotaStatus", - "id": 6 - } - } - }, - "QuotaStatus": { - "fields": { - "consumed": { - "type": "int32", - "id": 1 - }, - "remaining": { - "type": "int32", - "id": 2 - } - } - }, - "FunnelBreakdown": { - "oneofs": { - "_limit": { - "oneof": [ - "limit" - ] - } - }, - "fields": { - "breakdownDimension": { - "type": "Dimension", - "id": 1 - }, - "limit": { - "type": "int64", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "FunnelNextAction": { - "oneofs": { - "_limit": { - "oneof": [ - "limit" - ] - } - }, - "fields": { - "nextActionDimension": { - "type": "Dimension", - "id": 1 - }, - "limit": { - "type": "int64", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "Funnel": { - "fields": { - "isOpenFunnel": { - "type": "bool", - "id": 1 - }, - "steps": { - "rule": "repeated", - "type": "FunnelStep", - "id": 2 - } - } - }, - "FunnelStep": { - "oneofs": { - "_withinDurationFromPriorStep": { - "oneof": [ - "withinDurationFromPriorStep" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "isDirectlyFollowedBy": { - "type": "bool", - "id": 2 - }, - "withinDurationFromPriorStep": { - "type": "google.protobuf.Duration", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "filterExpression": { - "type": "FunnelFilterExpression", - "id": 4 - } - } - }, - "FunnelSubReport": { - "fields": { - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 1 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 2 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 3 - }, - "metadata": { - "type": "FunnelResponseMetadata", - "id": 4 - } - } - }, - "UserSegment": { - "fields": { - "userInclusionCriteria": { - "type": "UserSegmentCriteria", - "id": 1 - }, - "exclusion": { - "type": "UserSegmentExclusion", - "id": 2 - } - } - }, - "UserSegmentCriteria": { - "fields": { - "andConditionGroups": { - "rule": "repeated", - "type": "UserSegmentConditionGroup", - "id": 1 - }, - "andSequenceGroups": { - "rule": "repeated", - "type": "UserSegmentSequenceGroup", - "id": 2 - } - } - }, - "UserCriteriaScoping": { - "values": { - "USER_CRITERIA_SCOPING_UNSPECIFIED": 0, - "USER_CRITERIA_WITHIN_SAME_EVENT": 1, - "USER_CRITERIA_WITHIN_SAME_SESSION": 2, - "USER_CRITERIA_ACROSS_ALL_SESSIONS": 3 - } - }, - "UserSegmentConditionGroup": { - "fields": { - "conditionScoping": { - "type": "UserCriteriaScoping", - "id": 1 - }, - "segmentFilterExpression": { - "type": "SegmentFilterExpression", - "id": 2 - } - } - }, - "UserSegmentSequenceGroup": { - "fields": { - "sequenceScoping": { - "type": "UserCriteriaScoping", - "id": 1 - }, - "sequenceMaximumDuration": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "userSequenceSteps": { - "rule": "repeated", - "type": "UserSequenceStep", - "id": 3 - } - } - }, - "UserSequenceStep": { - "fields": { - "isDirectlyFollowedBy": { - "type": "bool", - "id": 1 - }, - "stepScoping": { - "type": "UserCriteriaScoping", - "id": 2 - }, - "segmentFilterExpression": { - "type": "SegmentFilterExpression", - "id": 3 - } - } - }, - "UserSegmentExclusion": { - "fields": { - "userExclusionDuration": { - "type": "UserExclusionDuration", - "id": 1 - }, - "userExclusionCriteria": { - "type": "UserSegmentCriteria", - "id": 2 - } - } - }, - "UserExclusionDuration": { - "values": { - "USER_EXCLUSION_DURATION_UNSPECIFIED": 0, - "USER_EXCLUSION_TEMPORARY": 1, - "USER_EXCLUSION_PERMANENT": 2 - } - }, - "SessionSegment": { - "fields": { - "sessionInclusionCriteria": { - "type": "SessionSegmentCriteria", - "id": 1 - }, - "exclusion": { - "type": "SessionSegmentExclusion", - "id": 2 - } - } - }, - "SessionSegmentCriteria": { - "fields": { - "andConditionGroups": { - "rule": "repeated", - "type": "SessionSegmentConditionGroup", - "id": 1 - } - } - }, - "SessionCriteriaScoping": { - "values": { - "SESSION_CRITERIA_SCOPING_UNSPECIFIED": 0, - "SESSION_CRITERIA_WITHIN_SAME_EVENT": 1, - "SESSION_CRITERIA_WITHIN_SAME_SESSION": 2 - } - }, - "SessionSegmentConditionGroup": { - "fields": { - "conditionScoping": { - "type": "SessionCriteriaScoping", - "id": 1 - }, - "segmentFilterExpression": { - "type": "SegmentFilterExpression", - "id": 2 - } - } - }, - "SessionSegmentExclusion": { - "fields": { - "sessionExclusionDuration": { - "type": "SessionExclusionDuration", - "id": 1 - }, - "sessionExclusionCriteria": { - "type": "SessionSegmentCriteria", - "id": 2 - } - } - }, - "SessionExclusionDuration": { - "values": { - "SESSION_EXCLUSION_DURATION_UNSPECIFIED": 0, - "SESSION_EXCLUSION_TEMPORARY": 1, - "SESSION_EXCLUSION_PERMANENT": 2 - } - }, - "EventSegment": { - "fields": { - "eventInclusionCriteria": { - "type": "EventSegmentCriteria", - "id": 1 - }, - "exclusion": { - "type": "EventSegmentExclusion", - "id": 2 - } - } - }, - "EventSegmentCriteria": { - "fields": { - "andConditionGroups": { - "rule": "repeated", - "type": "EventSegmentConditionGroup", - "id": 1 - } - } - }, - "EventCriteriaScoping": { - "values": { - "EVENT_CRITERIA_SCOPING_UNSPECIFIED": 0, - "EVENT_CRITERIA_WITHIN_SAME_EVENT": 1 - } - }, - "EventSegmentConditionGroup": { - "fields": { - "conditionScoping": { - "type": "EventCriteriaScoping", - "id": 1 - }, - "segmentFilterExpression": { - "type": "SegmentFilterExpression", - "id": 2 - } - } - }, - "EventSegmentExclusion": { - "fields": { - "eventExclusionDuration": { - "type": "EventExclusionDuration", - "id": 1 - }, - "eventExclusionCriteria": { - "type": "EventSegmentCriteria", - "id": 2 - } - } - }, - "EventExclusionDuration": { - "values": { - "EVENT_EXCLUSION_DURATION_UNSPECIFIED": 0, - "EVENT_EXCLUSION_PERMANENT": 1 - } - }, - "Segment": { - "oneofs": { - "oneSegmentScope": { - "oneof": [ - "userSegment", - "sessionSegment", - "eventSegment" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "userSegment": { - "type": "UserSegment", - "id": 2 - }, - "sessionSegment": { - "type": "SessionSegment", - "id": 3 - }, - "eventSegment": { - "type": "EventSegment", - "id": 4 - } - } - }, - "SegmentFilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "segmentFilter", - "segmentEventFilter" - ] - } - }, - "fields": { - "andGroup": { - "type": "SegmentFilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "SegmentFilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "SegmentFilterExpression", - "id": 3 - }, - "segmentFilter": { - "type": "SegmentFilter", - "id": 4 - }, - "segmentEventFilter": { - "type": "SegmentEventFilter", - "id": 5 - } - } - }, - "SegmentFilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "SegmentFilterExpression", - "id": 1 - } - } - }, - "SegmentFilter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter" - ] - } - }, - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "stringFilter": { - "type": "StringFilter", - "id": 4 - }, - "inListFilter": { - "type": "InListFilter", - "id": 5 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 6 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 7 - }, - "filterScoping": { - "type": "SegmentFilterScoping", - "id": 8 - } - } - }, - "SegmentFilterScoping": { - "oneofs": { - "_atAnyPointInTime": { - "oneof": [ - "atAnyPointInTime" - ] - } - }, - "fields": { - "atAnyPointInTime": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "SegmentEventFilter": { - "oneofs": { - "_eventName": { - "oneof": [ - "eventName" - ] - }, - "_segmentParameterFilterExpression": { - "oneof": [ - "segmentParameterFilterExpression" - ] - } - }, - "fields": { - "eventName": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "segmentParameterFilterExpression": { - "type": "SegmentParameterFilterExpression", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "SegmentParameterFilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "segmentParameterFilter" - ] - } - }, - "fields": { - "andGroup": { - "type": "SegmentParameterFilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "SegmentParameterFilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "SegmentParameterFilterExpression", - "id": 3 - }, - "segmentParameterFilter": { - "type": "SegmentParameterFilter", - "id": 4 - } - } - }, - "SegmentParameterFilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "SegmentParameterFilterExpression", - "id": 1 - } - } - }, - "SegmentParameterFilter": { - "oneofs": { - "oneParameter": { - "oneof": [ - "eventParameterName", - "itemParameterName" - ] - }, - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter" - ] - } - }, - "fields": { - "eventParameterName": { - "type": "string", - "id": 1 - }, - "itemParameterName": { - "type": "string", - "id": 2 - }, - "stringFilter": { - "type": "StringFilter", - "id": 4 - }, - "inListFilter": { - "type": "InListFilter", - "id": 5 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 6 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 7 - }, - "filterScoping": { - "type": "SegmentParameterFilterScoping", - "id": 8 - } - } - }, - "SegmentParameterFilterScoping": { - "oneofs": { - "_inAnyNDayPeriod": { - "oneof": [ - "inAnyNDayPeriod" - ] - } - }, - "fields": { - "inAnyNDayPeriod": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - } - } - }, - "FunnelFilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "funnelFieldFilter", - "funnelEventFilter" - ] - } - }, - "fields": { - "andGroup": { - "type": "FunnelFilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "FunnelFilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "FunnelFilterExpression", - "id": 3 - }, - "funnelFieldFilter": { - "type": "FunnelFieldFilter", - "id": 4 - }, - "funnelEventFilter": { - "type": "FunnelEventFilter", - "id": 5 - } - } - }, - "FunnelFilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "FunnelFilterExpression", - "id": 1 - } - } - }, - "FunnelFieldFilter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter" - ] - } - }, - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "stringFilter": { - "type": "StringFilter", - "id": 4 - }, - "inListFilter": { - "type": "InListFilter", - "id": 5 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 6 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 7 - } - } - }, - "FunnelEventFilter": { - "oneofs": { - "_eventName": { - "oneof": [ - "eventName" - ] - }, - "_funnelParameterFilterExpression": { - "oneof": [ - "funnelParameterFilterExpression" - ] - } - }, - "fields": { - "eventName": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "funnelParameterFilterExpression": { - "type": "FunnelParameterFilterExpression", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "FunnelParameterFilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "funnelParameterFilter" - ] - } - }, - "fields": { - "andGroup": { - "type": "FunnelParameterFilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "FunnelParameterFilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "FunnelParameterFilterExpression", - "id": 3 - }, - "funnelParameterFilter": { - "type": "FunnelParameterFilter", - "id": 4 - } - } - }, - "FunnelParameterFilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "FunnelParameterFilterExpression", - "id": 1 - } - } - }, - "FunnelParameterFilter": { - "oneofs": { - "oneParameter": { - "oneof": [ - "eventParameterName", - "itemParameterName" - ] - }, - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter" - ] - } - }, - "fields": { - "eventParameterName": { - "type": "string", - "id": 1 - }, - "itemParameterName": { - "type": "string", - "id": 2 - }, - "stringFilter": { - "type": "StringFilter", - "id": 4 - }, - "inListFilter": { - "type": "InListFilter", - "id": 5 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 6 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 7 - } - } - }, - "FunnelResponseMetadata": { - "fields": { - "samplingMetadatas": { - "rule": "repeated", - "type": "SamplingMetadata", - "id": 1 - } - } - }, - "SamplingMetadata": { - "fields": { - "samplesReadCount": { - "type": "int64", - "id": 1 - }, - "samplingSpaceSize": { - "type": "int64", - "id": 2 - } - } - }, - "MetricAggregation": { - "values": { - "METRIC_AGGREGATION_UNSPECIFIED": 0, - "TOTAL": 1, - "MINIMUM": 5, - "MAXIMUM": 6, - "COUNT": 4 - } - }, - "MetricType": { - "values": { - "METRIC_TYPE_UNSPECIFIED": 0, - "TYPE_INTEGER": 1, - "TYPE_FLOAT": 2, - "TYPE_SECONDS": 4, - "TYPE_MILLISECONDS": 5, - "TYPE_MINUTES": 6, - "TYPE_HOURS": 7, - "TYPE_STANDARD": 8, - "TYPE_CURRENCY": 9, - "TYPE_FEET": 10, - "TYPE_MILES": 11, - "TYPE_METERS": 12, - "TYPE_KILOMETERS": 13 - } - }, - "RestrictedMetricType": { - "values": { - "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, - "COST_DATA": 1, - "REVENUE_DATA": 2 - } - }, - "SamplingLevel": { - "values": { - "SAMPLING_LEVEL_UNSPECIFIED": 0, - "LOW": 1, - "MEDIUM": 2, - "UNSAMPLED": 3 - } - }, - "ConversionSpec": { - "fields": { - "conversionActions": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "attributionModel": { - "type": "AttributionModel", - "id": 2 - } - }, - "nested": { - "AttributionModel": { - "values": { - "ATTRIBUTION_MODEL_UNSPECIFIED": 0, - "DATA_DRIVEN": 1, - "LAST_CLICK": 2 - } - } - } - }, - "DimensionMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "deprecatedApiNames": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "customDefinition": { - "type": "bool", - "id": 5 - }, - "category": { - "type": "string", - "id": 6 - }, - "sections": { - "rule": "repeated", - "type": "Section", - "id": 7 - } - } - }, - "MetricMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "deprecatedApiNames": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "type": { - "type": "MetricType", - "id": 5 - }, - "expression": { - "type": "string", - "id": 6 - }, - "customDefinition": { - "type": "bool", - "id": 7 - }, - "blockedReasons": { - "rule": "repeated", - "type": "BlockedReason", - "id": 8 - }, - "category": { - "type": "string", - "id": 9 - }, - "sections": { - "rule": "repeated", - "type": "Section", - "id": 10 - } - }, - "nested": { - "BlockedReason": { - "values": { - "BLOCKED_REASON_UNSPECIFIED": 0, - "NO_REVENUE_METRICS": 1, - "NO_COST_METRICS": 2 - } - } - } - }, - "ComparisonMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - } - }, - "ConversionMetadata": { - "fields": { - "conversionAction": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - } - } - } - } - }, - "v1beta": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/analytics/data/v1beta;data", - "java_multiple_files": true, - "java_outer_classname": "ReportingApiProto", - "java_package": "com.google.analytics.data.v1beta", - "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Property", - "(google.api.resource_definition).pattern": "properties/{property}" - }, - "nested": { - "BetaAnalyticsData": { - "options": { - "(google.api.default_host)": "analyticsdata.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" - }, - "methods": { - "RunReport": { - "requestType": "RunReportRequest", - "responseType": "RunReportResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:runReport", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:runReport", - "body": "*" - } - } - ] - }, - "RunPivotReport": { - "requestType": "RunPivotReportRequest", - "responseType": "RunPivotReportResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:runPivotReport", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:runPivotReport", - "body": "*" - } - } - ] - }, - "BatchRunReports": { - "requestType": "BatchRunReportsRequest", - "responseType": "BatchRunReportsResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunReports", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:batchRunReports", - "body": "*" - } - } - ] - }, - "BatchRunPivotReports": { - "requestType": "BatchRunPivotReportsRequest", - "responseType": "BatchRunPivotReportsResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:batchRunPivotReports", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:batchRunPivotReports", - "body": "*" - } - } - ] - }, - "GetMetadata": { - "requestType": "GetMetadataRequest", - "responseType": "Metadata", - "options": { - "(google.api.http).get": "/v1beta/{name=properties/*/metadata}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta/{name=properties/*/metadata}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "RunRealtimeReport": { - "requestType": "RunRealtimeReportRequest", - "responseType": "RunRealtimeReportResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:runRealtimeReport", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:runRealtimeReport", - "body": "*" - } - } - ] - }, - "CheckCompatibility": { - "requestType": "CheckCompatibilityRequest", - "responseType": "CheckCompatibilityResponse", - "options": { - "(google.api.http).post": "/v1beta/{property=properties/*}:checkCompatibility", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{property=properties/*}:checkCompatibility", - "body": "*" - } - } - ] - }, - "CreateAudienceExport": { - "requestType": "CreateAudienceExportRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta/{parent=properties/*}/audienceExports", - "(google.api.http).body": "audience_export", - "(google.api.method_signature)": "parent,audience_export", - "(google.longrunning.operation_info).response_type": "AudienceExport", - "(google.longrunning.operation_info).metadata_type": "AudienceExportMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{parent=properties/*}/audienceExports", - "body": "audience_export" - } - }, - { - "(google.api.method_signature)": "parent,audience_export" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "AudienceExport", - "metadata_type": "AudienceExportMetadata" - } - } - ] - }, - "QueryAudienceExport": { - "requestType": "QueryAudienceExportRequest", - "responseType": "QueryAudienceExportResponse", - "options": { - "(google.api.http).post": "/v1beta/{name=properties/*/audienceExports/*}:query", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta/{name=properties/*/audienceExports/*}:query", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetAudienceExport": { - "requestType": "GetAudienceExportRequest", - "responseType": "AudienceExport", - "options": { - "(google.api.http).get": "/v1beta/{name=properties/*/audienceExports/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta/{name=properties/*/audienceExports/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListAudienceExports": { - "requestType": "ListAudienceExportsRequest", - "responseType": "ListAudienceExportsResponse", - "options": { - "(google.api.http).get": "/v1beta/{parent=properties/*}/audienceExports", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta/{parent=properties/*}/audienceExports" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CheckCompatibilityRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 4 - }, - "metricFilter": { - "type": "FilterExpression", - "id": 5 - }, - "compatibilityFilter": { - "type": "Compatibility", - "id": 6 - } - } - }, - "CheckCompatibilityResponse": { - "fields": { - "dimensionCompatibilities": { - "rule": "repeated", - "type": "DimensionCompatibility", - "id": 1 - }, - "metricCompatibilities": { - "rule": "repeated", - "type": "MetricCompatibility", - "id": 2 - } - } - }, - "Metadata": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", - "(google.api.resource).pattern": "properties/{property}/metadata" - }, - "fields": { - "name": { - "type": "string", - "id": 3 - }, - "dimensions": { - "rule": "repeated", - "type": "DimensionMetadata", - "id": 1 - }, - "metrics": { - "rule": "repeated", - "type": "MetricMetadata", - "id": 2 - }, - "comparisons": { - "rule": "repeated", - "type": "ComparisonMetadata", - "id": 4 - } - } - }, - "RunReportRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "dateRanges": { - "rule": "repeated", - "type": "DateRange", - "id": 4 - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 5 - }, - "metricFilter": { - "type": "FilterExpression", - "id": 6 - }, - "offset": { - "type": "int64", - "id": 7 - }, - "limit": { - "type": "int64", - "id": 8 - }, - "metricAggregations": { - "rule": "repeated", - "type": "MetricAggregation", - "id": 9 - }, - "orderBys": { - "rule": "repeated", - "type": "OrderBy", - "id": 10 - }, - "currencyCode": { - "type": "string", - "id": 11 - }, - "cohortSpec": { - "type": "CohortSpec", - "id": 12 - }, - "keepEmptyRows": { - "type": "bool", - "id": 13 - }, - "returnPropertyQuota": { - "type": "bool", - "id": 14 - }, - "comparisons": { - "rule": "repeated", - "type": "Comparison", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RunReportResponse": { - "fields": { - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 1 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 2 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 3 - }, - "totals": { - "rule": "repeated", - "type": "Row", - "id": 4 - }, - "maximums": { - "rule": "repeated", - "type": "Row", - "id": 5 - }, - "minimums": { - "rule": "repeated", - "type": "Row", - "id": 6 - }, - "rowCount": { - "type": "int32", - "id": 7 - }, - "metadata": { - "type": "ResponseMetaData", - "id": 8 - }, - "propertyQuota": { - "type": "PropertyQuota", - "id": 9 - }, - "kind": { - "type": "string", - "id": 10 - } - } - }, - "RunPivotReportRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "dateRanges": { - "rule": "repeated", - "type": "DateRange", - "id": 4 - }, - "pivots": { - "rule": "repeated", - "type": "Pivot", - "id": 5 - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 6 - }, - "metricFilter": { - "type": "FilterExpression", - "id": 7 - }, - "currencyCode": { - "type": "string", - "id": 8 - }, - "cohortSpec": { - "type": "CohortSpec", - "id": 9 - }, - "keepEmptyRows": { - "type": "bool", - "id": 10 - }, - "returnPropertyQuota": { - "type": "bool", - "id": 11 - }, - "comparisons": { - "rule": "repeated", - "type": "Comparison", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RunPivotReportResponse": { - "fields": { - "pivotHeaders": { - "rule": "repeated", - "type": "PivotHeader", - "id": 1 - }, - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 2 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 3 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 4 - }, - "aggregates": { - "rule": "repeated", - "type": "Row", - "id": 5 - }, - "metadata": { - "type": "ResponseMetaData", - "id": 6 - }, - "propertyQuota": { - "type": "PropertyQuota", - "id": 7 - }, - "kind": { - "type": "string", - "id": 8 - } - } - }, - "BatchRunReportsRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "requests": { - "rule": "repeated", - "type": "RunReportRequest", - "id": 2 - } - } - }, - "BatchRunReportsResponse": { - "fields": { - "reports": { - "rule": "repeated", - "type": "RunReportResponse", - "id": 1 - }, - "kind": { - "type": "string", - "id": 2 - } - } - }, - "BatchRunPivotReportsRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "requests": { - "rule": "repeated", - "type": "RunPivotReportRequest", - "id": 2 - } - } - }, - "BatchRunPivotReportsResponse": { - "fields": { - "pivotReports": { - "rule": "repeated", - "type": "RunPivotReportResponse", - "id": 1 - }, - "kind": { - "type": "string", - "id": 2 - } - } - }, - "GetMetadataRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" - } - } - } - }, - "RunRealtimeReportRequest": { - "fields": { - "property": { - "type": "string", - "id": 1 - }, - "dimensions": { - "rule": "repeated", - "type": "Dimension", - "id": 2 - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 3 - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 4 - }, - "metricFilter": { - "type": "FilterExpression", - "id": 5 - }, - "limit": { - "type": "int64", - "id": 6 - }, - "metricAggregations": { - "rule": "repeated", - "type": "MetricAggregation", - "id": 7 - }, - "orderBys": { - "rule": "repeated", - "type": "OrderBy", - "id": 8 - }, - "returnPropertyQuota": { - "type": "bool", - "id": 9 - }, - "minuteRanges": { - "rule": "repeated", - "type": "MinuteRange", - "id": 10 - } - } - }, - "RunRealtimeReportResponse": { - "fields": { - "dimensionHeaders": { - "rule": "repeated", - "type": "DimensionHeader", - "id": 1 - }, - "metricHeaders": { - "rule": "repeated", - "type": "MetricHeader", - "id": 2 - }, - "rows": { - "rule": "repeated", - "type": "Row", - "id": 3 - }, - "totals": { - "rule": "repeated", - "type": "Row", - "id": 4 - }, - "maximums": { - "rule": "repeated", - "type": "Row", - "id": 5 - }, - "minimums": { - "rule": "repeated", - "type": "Row", - "id": 6 - }, - "rowCount": { - "type": "int32", - "id": 7 - }, - "propertyQuota": { - "type": "PropertyQuota", - "id": 8 - }, - "kind": { - "type": "string", - "id": 9 - } - } - }, - "GetAudienceExportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceExport" - } - } - } - }, - "ListAudienceExportsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListAudienceExportsResponse": { - "oneofs": { - "_nextPageToken": { - "oneof": [ - "nextPageToken" - ] - } - }, - "fields": { - "audienceExports": { - "rule": "repeated", - "type": "AudienceExport", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "CreateAudienceExportRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsdata.googleapis.com/AudienceExport" - } - }, - "audienceExport": { - "type": "AudienceExport", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "AudienceExport": { - "options": { - "(google.api.resource).type": "analyticsdata.googleapis.com/AudienceExport", - "(google.api.resource).pattern": "properties/{property}/audienceExports/{audience_export}", - "(google.api.resource).plural": "audienceExports", - "(google.api.resource).singular": "audienceExport" - }, - "oneofs": { - "_state": { - "oneof": [ - "state" - ] - }, - "_beginCreatingTime": { - "oneof": [ - "beginCreatingTime" - ] - }, - "_rowCount": { - "oneof": [ - "rowCount" - ] - }, - "_errorMessage": { - "oneof": [ - "errorMessage" - ] - }, - "_percentageCompleted": { - "oneof": [ - "percentageCompleted" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "audience": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "audienceDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dimensions": { - "rule": "repeated", - "type": "AudienceDimension", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "beginCreatingTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "creationQuotaTokensCharged": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rowCount": { - "type": "int32", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "errorMessage": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "percentageCompleted": { - "type": "double", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "FAILED": 3 - } - } - } - }, - "AudienceExportMetadata": { - "fields": {} - }, - "QueryAudienceExportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "offset": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "QueryAudienceExportResponse": { - "oneofs": { - "_audienceExport": { - "oneof": [ - "audienceExport" - ] - }, - "_rowCount": { - "oneof": [ - "rowCount" - ] - } - }, - "fields": { - "audienceExport": { - "type": "AudienceExport", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "audienceRows": { - "rule": "repeated", - "type": "AudienceRow", - "id": 2 - }, - "rowCount": { - "type": "int32", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "AudienceRow": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "AudienceDimensionValue", - "id": 1 - } - } - }, - "AudienceDimension": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AudienceDimensionValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "DateRange": { - "fields": { - "startDate": { - "type": "string", - "id": 1 - }, - "endDate": { - "type": "string", - "id": 2 - }, - "name": { - "type": "string", - "id": 3 - } - } - }, - "MinuteRange": { - "oneofs": { - "_startMinutesAgo": { - "oneof": [ - "startMinutesAgo" - ] - }, - "_endMinutesAgo": { - "oneof": [ - "endMinutesAgo" - ] - } - }, - "fields": { - "startMinutesAgo": { - "type": "int32", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "endMinutesAgo": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 3 - } - } - }, - "Dimension": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "dimensionExpression": { - "type": "DimensionExpression", - "id": 2 - } - } - }, - "DimensionExpression": { - "oneofs": { - "oneExpression": { - "oneof": [ - "lowerCase", - "upperCase", - "concatenate" - ] - } - }, - "fields": { - "lowerCase": { - "type": "CaseExpression", - "id": 4 - }, - "upperCase": { - "type": "CaseExpression", - "id": 5 - }, - "concatenate": { - "type": "ConcatenateExpression", - "id": 6 - } - }, - "nested": { - "CaseExpression": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1 - } - } - }, - "ConcatenateExpression": { - "fields": { - "dimensionNames": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "delimiter": { - "type": "string", - "id": 2 - } - } - } - } - }, - "Metric": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "expression": { - "type": "string", - "id": 2 - }, - "invisible": { - "type": "bool", - "id": 3 - } - } - }, - "Comparison": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "oneComparison": { - "oneof": [ - "dimensionFilter", - "comparison" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "dimensionFilter": { - "type": "FilterExpression", - "id": 2 - }, - "comparison": { - "type": "string", - "id": 3 - } - } - }, - "FilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "orGroup", - "notExpression", - "filter" - ] - } - }, - "fields": { - "andGroup": { - "type": "FilterExpressionList", - "id": 1 - }, - "orGroup": { - "type": "FilterExpressionList", - "id": 2 - }, - "notExpression": { - "type": "FilterExpression", - "id": 3 - }, - "filter": { - "type": "Filter", - "id": 4 - } - } - }, - "FilterExpressionList": { - "fields": { - "expressions": { - "rule": "repeated", - "type": "FilterExpression", - "id": 1 - } - } - }, - "Filter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter", - "emptyFilter" - ] - } - }, - "fields": { - "fieldName": { - "type": "string", - "id": 1 - }, - "stringFilter": { - "type": "StringFilter", - "id": 3 - }, - "inListFilter": { - "type": "InListFilter", - "id": 4 - }, - "numericFilter": { - "type": "NumericFilter", - "id": 5 - }, - "betweenFilter": { - "type": "BetweenFilter", - "id": 6 - }, - "emptyFilter": { - "type": "EmptyFilter", - "id": 8 - } - }, - "nested": { - "StringFilter": { - "fields": { - "matchType": { - "type": "MatchType", - "id": 1 - }, - "value": { - "type": "string", - "id": 2 - }, - "caseSensitive": { - "type": "bool", - "id": 3 - } - }, - "nested": { - "MatchType": { - "values": { - "MATCH_TYPE_UNSPECIFIED": 0, - "EXACT": 1, - "BEGINS_WITH": 2, - "ENDS_WITH": 3, - "CONTAINS": 4, - "FULL_REGEXP": 5, - "PARTIAL_REGEXP": 6 - } - } - } - }, - "InListFilter": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "caseSensitive": { - "type": "bool", - "id": 2 - } - } - }, - "NumericFilter": { - "fields": { - "operation": { - "type": "Operation", - "id": 1 - }, - "value": { - "type": "NumericValue", - "id": 2 - } - }, - "nested": { - "Operation": { - "values": { - "OPERATION_UNSPECIFIED": 0, - "EQUAL": 1, - "LESS_THAN": 2, - "LESS_THAN_OR_EQUAL": 3, - "GREATER_THAN": 4, - "GREATER_THAN_OR_EQUAL": 5 - } - } - } - }, - "BetweenFilter": { - "fields": { - "fromValue": { - "type": "NumericValue", - "id": 1 - }, - "toValue": { - "type": "NumericValue", - "id": 2 - } - } - }, - "EmptyFilter": { - "fields": {} - } - } - }, - "OrderBy": { - "oneofs": { - "oneOrderBy": { - "oneof": [ - "metric", - "dimension", - "pivot" - ] - } - }, - "fields": { - "metric": { - "type": "MetricOrderBy", - "id": 1 - }, - "dimension": { - "type": "DimensionOrderBy", - "id": 2 - }, - "pivot": { - "type": "PivotOrderBy", - "id": 3 - }, - "desc": { - "type": "bool", - "id": 4 - } - }, - "nested": { - "MetricOrderBy": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - } - } - }, - "DimensionOrderBy": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1 - }, - "orderType": { - "type": "OrderType", - "id": 2 - } - }, - "nested": { - "OrderType": { - "values": { - "ORDER_TYPE_UNSPECIFIED": 0, - "ALPHANUMERIC": 1, - "CASE_INSENSITIVE_ALPHANUMERIC": 2, - "NUMERIC": 3 - } - } - } - }, - "PivotOrderBy": { - "fields": { - "metricName": { - "type": "string", - "id": 1 - }, - "pivotSelections": { - "rule": "repeated", - "type": "PivotSelection", - "id": 2 - } - }, - "nested": { - "PivotSelection": { - "fields": { - "dimensionName": { - "type": "string", - "id": 1 - }, - "dimensionValue": { - "type": "string", - "id": 2 - } - } - } - } - } - } - }, - "Pivot": { - "fields": { - "fieldNames": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "orderBys": { - "rule": "repeated", - "type": "OrderBy", - "id": 2 - }, - "offset": { - "type": "int64", - "id": 3 - }, - "limit": { - "type": "int64", - "id": 4 - }, - "metricAggregations": { - "rule": "repeated", - "type": "MetricAggregation", - "id": 5 - } - } - }, - "CohortSpec": { - "fields": { - "cohorts": { - "rule": "repeated", - "type": "Cohort", - "id": 1 - }, - "cohortsRange": { - "type": "CohortsRange", - "id": 2 - }, - "cohortReportSettings": { - "type": "CohortReportSettings", - "id": 3 - } - } - }, - "Cohort": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "dimension": { - "type": "string", - "id": 2 - }, - "dateRange": { - "type": "DateRange", - "id": 3 - } - } - }, - "CohortsRange": { - "fields": { - "granularity": { - "type": "Granularity", - "id": 1 - }, - "startOffset": { - "type": "int32", - "id": 2 - }, - "endOffset": { - "type": "int32", - "id": 3 - } - }, - "nested": { - "Granularity": { - "values": { - "GRANULARITY_UNSPECIFIED": 0, - "DAILY": 1, - "WEEKLY": 2, - "MONTHLY": 3 - } - } - } - }, - "CohortReportSettings": { - "fields": { - "accumulate": { - "type": "bool", - "id": 1 - } - } - }, - "ResponseMetaData": { - "oneofs": { - "_schemaRestrictionResponse": { - "oneof": [ - "schemaRestrictionResponse" - ] - }, - "_currencyCode": { - "oneof": [ - "currencyCode" - ] - }, - "_timeZone": { - "oneof": [ - "timeZone" - ] - }, - "_emptyReason": { - "oneof": [ - "emptyReason" - ] - }, - "_subjectToThresholding": { - "oneof": [ - "subjectToThresholding" - ] - } - }, - "fields": { - "dataLossFromOtherRow": { - "type": "bool", - "id": 3 - }, - "schemaRestrictionResponse": { - "type": "SchemaRestrictionResponse", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "currencyCode": { - "type": "string", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "timeZone": { - "type": "string", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "emptyReason": { - "type": "string", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "subjectToThresholding": { - "type": "bool", - "id": 8, - "options": { - "proto3_optional": true - } - }, - "samplingMetadatas": { - "rule": "repeated", - "type": "SamplingMetadata", - "id": 9 - } - }, - "nested": { - "SchemaRestrictionResponse": { - "fields": { - "activeMetricRestrictions": { - "rule": "repeated", - "type": "ActiveMetricRestriction", - "id": 1 - } - }, - "nested": { - "ActiveMetricRestriction": { - "oneofs": { - "_metricName": { - "oneof": [ - "metricName" - ] - } - }, - "fields": { - "metricName": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "restrictedMetricTypes": { - "rule": "repeated", - "type": "RestrictedMetricType", - "id": 2 - } - } - } - } - } - } - }, - "SamplingMetadata": { - "fields": { - "samplesReadCount": { - "type": "int64", - "id": 1 - }, - "samplingSpaceSize": { - "type": "int64", - "id": 2 - } - } - }, - "DimensionHeader": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "MetricHeader": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "MetricType", - "id": 2 - } - } - }, - "PivotHeader": { - "fields": { - "pivotDimensionHeaders": { - "rule": "repeated", - "type": "PivotDimensionHeader", - "id": 1 - }, - "rowCount": { - "type": "int32", - "id": 2 - } - } - }, - "PivotDimensionHeader": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "DimensionValue", - "id": 1 - } - } - }, - "Row": { - "fields": { - "dimensionValues": { - "rule": "repeated", - "type": "DimensionValue", - "id": 1 - }, - "metricValues": { - "rule": "repeated", - "type": "MetricValue", - "id": 2 - } - } - }, - "DimensionValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "MetricValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "value": { - "type": "string", - "id": 4 - } - } - }, - "NumericValue": { - "oneofs": { - "oneValue": { - "oneof": [ - "int64Value", - "doubleValue" - ] - } - }, - "fields": { - "int64Value": { - "type": "int64", - "id": 1 - }, - "doubleValue": { - "type": "double", - "id": 2 - } - } - }, - "PropertyQuota": { - "fields": { - "tokensPerDay": { - "type": "QuotaStatus", - "id": 1 - }, - "tokensPerHour": { - "type": "QuotaStatus", - "id": 2 - }, - "concurrentRequests": { - "type": "QuotaStatus", - "id": 3 - }, - "serverErrorsPerProjectPerHour": { - "type": "QuotaStatus", - "id": 4 - }, - "potentiallyThresholdedRequestsPerHour": { - "type": "QuotaStatus", - "id": 5 - }, - "tokensPerProjectPerHour": { - "type": "QuotaStatus", - "id": 6 - } - } - }, - "QuotaStatus": { - "oneofs": { - "_consumed": { - "oneof": [ - "consumed" - ] - }, - "_remaining": { - "oneof": [ - "remaining" - ] - } - }, - "fields": { - "consumed": { - "type": "int32", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "remaining": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "DimensionMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "deprecatedApiNames": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "customDefinition": { - "type": "bool", - "id": 5 - }, - "category": { - "type": "string", - "id": 7 - } - } - }, - "MetricMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "deprecatedApiNames": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "type": { - "type": "MetricType", - "id": 5 - }, - "expression": { - "type": "string", - "id": 6 - }, - "customDefinition": { - "type": "bool", - "id": 7 - }, - "blockedReasons": { - "rule": "repeated", - "type": "BlockedReason", - "id": 8 - }, - "category": { - "type": "string", - "id": 10 - } - }, - "nested": { - "BlockedReason": { - "values": { - "BLOCKED_REASON_UNSPECIFIED": 0, - "NO_REVENUE_METRICS": 1, - "NO_COST_METRICS": 2 - } - } - } - }, - "ComparisonMetadata": { - "fields": { - "apiName": { - "type": "string", - "id": 1 - }, - "uiName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - } - }, - "DimensionCompatibility": { - "oneofs": { - "_dimensionMetadata": { - "oneof": [ - "dimensionMetadata" - ] - }, - "_compatibility": { - "oneof": [ - "compatibility" - ] - } - }, - "fields": { - "dimensionMetadata": { - "type": "DimensionMetadata", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "compatibility": { - "type": "Compatibility", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "MetricCompatibility": { - "oneofs": { - "_metricMetadata": { - "oneof": [ - "metricMetadata" - ] - }, - "_compatibility": { - "oneof": [ - "compatibility" - ] - } - }, - "fields": { - "metricMetadata": { - "type": "MetricMetadata", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "compatibility": { - "type": "Compatibility", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "MetricAggregation": { - "values": { - "METRIC_AGGREGATION_UNSPECIFIED": 0, - "TOTAL": 1, - "MINIMUM": 5, - "MAXIMUM": 6, - "COUNT": 4 - } - }, - "MetricType": { - "values": { - "METRIC_TYPE_UNSPECIFIED": 0, - "TYPE_INTEGER": 1, - "TYPE_FLOAT": 2, - "TYPE_SECONDS": 4, - "TYPE_MILLISECONDS": 5, - "TYPE_MINUTES": 6, - "TYPE_HOURS": 7, - "TYPE_STANDARD": 8, - "TYPE_CURRENCY": 9, - "TYPE_FEET": 10, - "TYPE_MILES": 11, - "TYPE_METERS": 12, - "TYPE_KILOMETERS": 13 - } - }, - "RestrictedMetricType": { - "values": { - "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, - "COST_DATA": 1, - "REVENUE_DATA": 2 - } - }, - "Compatibility": { - "values": { - "COMPATIBILITY_UNSPECIFIED": 0, - "COMPATIBLE": 1, - "INCOMPATIBLE": 2 - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js deleted file mode 100644 index 15b16b3b3bd5..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, audienceList) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where this audience list will be created. - * Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Required. The audience list to create. - */ - // const audienceList = {} - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callCreateAudienceList() { - // Construct request - const request = { - parent, - audienceList, - }; - - // Run request - const [operation] = await dataClient.createAudienceList(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAudienceList(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js deleted file mode 100644 index 8f0191c9de12..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, recurringAudienceList) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where this recurring audience list will be - * created. Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Required. The recurring audience list to create. - */ - // const recurringAudienceList = {} - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callCreateRecurringAudienceList() { - // Construct request - const request = { - parent, - recurringAudienceList, - }; - - // Run request - const response = await dataClient.createRecurringAudienceList(request); - console.log(response); - } - - callCreateRecurringAudienceList(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js deleted file mode 100644 index 857b8f2607e2..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, reportTask) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where this report task will be created. - * Format: `properties/{propertyId}` - */ - // const parent = 'abc123' - /** - * Required. The report task configuration to create. - */ - // const reportTask = {} - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callCreateReportTask() { - // Construct request - const request = { - parent, - reportTask, - }; - - // Run request - const [operation] = await dataClient.createReportTask(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateReportTask(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js deleted file mode 100644 index 974c23f8c6dc..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The audience list resource name. - * Format: `properties/{property}/audienceLists/{audience_list}` - */ - // const name = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callGetAudienceList() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getAudienceList(request); - console.log(response); - } - - callGetAudienceList(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js deleted file mode 100644 index ab6868a024c9..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Quotas from this property will be listed in the response. - * Format: `properties/{property}/propertyQuotasSnapshot` - */ - // const name = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callGetPropertyQuotasSnapshot() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getPropertyQuotasSnapshot(request); - console.log(response); - } - - callGetPropertyQuotasSnapshot(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js deleted file mode 100644 index 0b76c80ddead..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The recurring audience list resource name. - * Format: - * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` - */ - // const name = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callGetRecurringAudienceList() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getRecurringAudienceList(request); - console.log(response); - } - - callGetRecurringAudienceList(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js deleted file mode 100644 index 2d12025959fa..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The report task resource name. - * Format: `properties/{property}/reportTasks/{report_task}` - */ - // const name = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callGetReportTask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getReportTask(request); - console.log(response); - } - - callGetReportTask(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js deleted file mode 100644 index 73f1aef4b81a..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. All audience lists for this property will be listed in the - * response. Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of audience lists to return. The service may - * return fewer than this value. If unspecified, at most 200 audience lists - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListAudienceLists` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAudienceLists` must - * match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callListAudienceLists() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataClient.listAudienceListsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAudienceLists(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js deleted file mode 100644 index c7eae4b5dba1..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. All recurring audience lists for this property will be listed in - * the response. Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of recurring audience lists to return. The - * service may return fewer than this value. If unspecified, at most 200 - * recurring audience lists will be returned. The maximum value is 1000 - * (higher values will be coerced to the maximum). - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous - * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent - * page. - * When paginating, all other parameters provided to - * `ListRecurringAudienceLists` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callListRecurringAudienceLists() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataClient.listRecurringAudienceListsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRecurringAudienceLists(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js deleted file mode 100644 index 59859b310ab5..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. All report tasks for this property will be listed in the - * response. Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of report tasks to return. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListReportTasks` call. - * Provide this to retrieve the subsequent page. - */ - // const pageToken = 'abc123' - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callListReportTasks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataClient.listReportTasksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListReportTasks(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js deleted file mode 100644 index a2258729106f..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the audience list to retrieve users from. - * Format: `properties/{property}/audienceLists/{audience_list}` - */ - // const name = 'abc123' - /** - * Optional. The row count of the start row. The first row is counted as row - * 0. - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const offset = 1234 - /** - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const limit = 1234 - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callQueryAudienceList() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.queryAudienceList(request); - console.log(response); - } - - callQueryAudienceList(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js deleted file mode 100644 index 9a116b2f6c8d..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The report source name. - * Format: `properties/{property}/reportTasks/{report}` - */ - // const name = 'abc123' - /** - * Optional. The row count of the start row in the report. The first row is - * counted as row 0. - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const offset = 1234 - /** - * Optional. The number of rows to return from the report. If unspecified, - * 10,000 rows are returned. The API returns a maximum of 250,000 rows per - * request, no matter how many you ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. The number of rows - * available to a QueryReportTaskRequest is further limited by the limit of - * the associated ReportTask. A query can retrieve at most ReportTask.limit - * rows. For example, if the ReportTask has a limit of 1,000, then a - * QueryReportTask request with offset=900 and limit=500 will return at most - * 100 rows. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const limit = 1234 - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callQueryReportTask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.queryReportTask(request); - console.log(response); - } - - callQueryReportTask(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js deleted file mode 100644 index 5478fa26dee4..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Optional. A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * Optional. Date ranges of data to read. If multiple date ranges are - * requested, each response row will contain a zero based date range index. If - * two date ranges overlap, the event data for the overlapping days is - * included in the response rows for both date ranges. - */ - // const dateRanges = [1,2,3,4] - /** - * Optional. The configuration of this request's funnel. This funnel - * configuration is required. - */ - // const funnel = {} - /** - * Optional. If specified, this breakdown adds a dimension to the funnel table - * sub report response. This breakdown dimension expands each funnel step to - * the unique values of the breakdown dimension. For example, a breakdown by - * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, - * `desktop`, and the total. - */ - // const funnelBreakdown = {} - /** - * Optional. If specified, next action adds a dimension to the funnel - * visualization sub report response. This next action dimension expands each - * funnel step to the unique values of the next action. For example a next - * action of the `eventName` dimension will create rows for several events - * (for example `session_start` & `click`) and the total. - * Next action only supports `eventName` and most Page / Screen dimensions - * like `pageTitle` and `pagePath`. - */ - // const funnelNextAction = {} - /** - * Optional. The funnel visualization type controls the dimensions present in - * the funnel visualization sub report response. If not specified, - * `STANDARD_FUNNEL` is used. - */ - // const funnelVisualizationType = {} - /** - * Optional. The configurations of segments. Segments are subsets of a - * property's data. In a funnel report with segments, the funnel is evaluated - * in each segment. - * Each segment specified in this request - * produces a separate row in the response; in the response, each segment - * identified by its name. - * The segments parameter is optional. Requests are limited to 4 segments. - */ - // const segments = [1,2,3,4] - /** - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - */ - // const limit = 1234 - /** - * Optional. Dimension filters allow you to ask for only specific dimension - * values in the report. To learn more, see Creating a Report: Dimension - * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - */ - // const dimensionFilter = {} - /** - * Optional. Toggles whether to return the current state of this Analytics - * Property's quota. Quota is returned in PropertyQuota (#PropertyQuota). - */ - // const returnPropertyQuota = true - - // Imports the Data library - const {AlphaAnalyticsDataClient} = require('@google-analytics/data').v1alpha; - - // Instantiates a client - const dataClient = new AlphaAnalyticsDataClient(); - - async function callRunFunnelReport() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.runFunnelReport(request); - console.log(response); - } - - callRunFunnelReport(); - // [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json deleted file mode 100644 index b45ca265fd75..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json +++ /dev/null @@ -1,763 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-data", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.analytics.data.v1alpha", - "version": "v1alpha" - } - ] - }, - "snippets": [ - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async", - "title": "AlphaAnalyticsData runFunnelReport Sample", - "origin": "API_DEFINITION", - "description": " Returns a customized funnel report of your Google Analytics event data. The data returned from the API is as a table with columns for the requested dimensions and metrics. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys. To learn more, see [GA4 Funnel Explorations](https://support.google.com/analytics/answer/9327974). This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Data API Funnel Reporting Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform).", - "canonical": true, - "file": "alpha_analytics_data.run_funnel_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 124, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunFunnelReport", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "date_ranges", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "funnel", - "type": ".google.analytics.data.v1alpha.Funnel" - }, - { - "name": "funnel_breakdown", - "type": ".google.analytics.data.v1alpha.FunnelBreakdown" - }, - { - "name": "funnel_next_action", - "type": ".google.analytics.data.v1alpha.FunnelNextAction" - }, - { - "name": "funnel_visualization_type", - "type": ".google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType" - }, - { - "name": "segments", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "limit", - "type": "TYPE_INT64" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1alpha.FilterExpression" - }, - { - "name": "return_property_quota", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.analytics.data.v1alpha.RunFunnelReportResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "RunFunnelReport", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunFunnelReport", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async", - "title": "AlphaAnalyticsData createAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Creates an audience list for later retrieval. This method quickly returns the audience list's resource name and initiates a long running asynchronous request to form an audience list. To list the users in an audience list, first create the audience list through this method and then send the audience resource name to the `QueryAudienceList` method. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. An audience list is a snapshot of the users currently in the audience at the time of audience list creation. Creating audience lists for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience lists contain the users in each audience. This method is available at beta stability at [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.create_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "audience_list", - "type": ".google.analytics.data.v1alpha.AudienceList" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "CreateAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async", - "title": "AlphaAnalyticsData queryAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Retrieves an audience list of users. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to retrieve the users in the audience list. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is available at beta stability at [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.query_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.analytics.data.v1alpha.QueryAudienceListResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "QueryAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async", - "title": "AlphaAnalyticsData getAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Gets configuration metadata about a specific audience list. This method can be used to understand an audience list after it has been created. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.get_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.AudienceList", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "GetAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async", - "title": "AlphaAnalyticsData listAudienceLists Sample", - "origin": "API_DEFINITION", - "description": " Lists all audience lists for a property. This method can be used for you to find and reuse existing audience lists rather than creating unnecessary new audience lists. The same audience can have multiple audience lists that represent the list of users that were in an audience on different days. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. This method is available at beta stability at [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.list_audience_lists.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAudienceLists", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.ListAudienceListsResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "ListAudienceLists", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListAudienceLists", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async", - "title": "AlphaAnalyticsData createRecurringAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Creates a recurring audience list. Recurring audience lists produces new audience lists each day. Audience lists are users in an audience at the time of the list's creation. A recurring audience list ensures that you have audience list based on the most recent data available for use each day. If you manually create audience list, you don't know when an audience list based on an additional day's data is available. This recurring audience list automates the creation of an audience list when an additional day's data is available. You will consume fewer quota tokens by using recurring audience list versus manually creating audience list at various times of day trying to guess when an additional day's data is ready. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.create_recurring_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRecurringAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "recurring_audience_list", - "type": ".google.analytics.data.v1alpha.RecurringAudienceList" - } - ], - "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "CreateRecurringAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateRecurringAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async", - "title": "AlphaAnalyticsData getRecurringAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Gets configuration metadata about a specific recurring audience list. This method can be used to understand a recurring audience list's state after it has been created. For example, a recurring audience list resource will generate audience list instances for each day, and this method can be used to get the resource name of the most recent audience list instance. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.get_recurring_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRecurringAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.RecurringAudienceList", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "GetRecurringAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetRecurringAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async", - "title": "AlphaAnalyticsData listRecurringAudienceLists Sample", - "origin": "API_DEFINITION", - "description": " Lists all recurring audience lists for a property. This method can be used for you to find and reuse existing recurring audience lists rather than creating unnecessary new recurring audience lists. The same audience can have multiple recurring audience lists that represent different dimension combinations; for example, just the dimension `deviceId` or both the dimensions `deviceId` and `userId`. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.list_recurring_audience_lists.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRecurringAudienceLists", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.ListRecurringAudienceListsResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "ListRecurringAudienceLists", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListRecurringAudienceLists", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async", - "title": "AlphaAnalyticsData getPropertyQuotasSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Get all property quotas organized by quota category for a given property. This will charge 1 property quota from the category with the most quota.", - "canonical": true, - "file": "alpha_analytics_data.get_property_quotas_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPropertyQuotasSnapshot", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.PropertyQuotasSnapshot", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "GetPropertyQuotasSnapshot", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetPropertyQuotasSnapshot", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async", - "title": "AlphaAnalyticsData createReportTask Sample", - "origin": "API_DEFINITION", - "description": " Initiates the creation of a report task. This method quickly returns a report task and initiates a long running asynchronous request to form a customized report of your Google Analytics event data. A report task will be retained and available for querying for 72 hours after it has been created. A report task created by one user can be listed and queried by all users who have access to the property.", - "canonical": true, - "file": "alpha_analytics_data.create_report_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "report_task", - "type": ".google.analytics.data.v1alpha.ReportTask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "CreateReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.CreateReportTask", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async", - "title": "AlphaAnalyticsData queryReportTask Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a report task's content. After requesting the `CreateReportTask`, you are able to retrieve the report content once the report is ACTIVE. This method will return an error if the report task's state is not `ACTIVE`. A query response will return the tabular row & column values of the report.", - "canonical": true, - "file": "alpha_analytics_data.query_report_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.analytics.data.v1alpha.QueryReportTaskResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "QueryReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.QueryReportTask", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async", - "title": "AlphaAnalyticsData getReportTask Sample", - "origin": "API_DEFINITION", - "description": " Gets report metadata about a specific report task. After creating a report task, use this method to check its processing state or inspect its report definition.", - "canonical": true, - "file": "alpha_analytics_data.get_report_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.ReportTask", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "GetReportTask", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetReportTask", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async", - "title": "AlphaAnalyticsData listReportTasks Sample", - "origin": "API_DEFINITION", - "description": " Lists all report tasks for a property.", - "canonical": true, - "file": "alpha_analytics_data.list_report_tasks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListReportTasks", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.ListReportTasksResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "ListReportTasks", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.ListReportTasks", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async", - "title": "AlphaAnalyticsData runReport Sample", - "origin": "API_DEFINITION", - "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.", - "canonical": true, - "file": "alpha_analytics_data.run_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 164, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunReport", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "dimensions", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "metrics", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "date_ranges", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1alpha.FilterExpression" - }, - { - "name": "metric_filter", - "type": ".google.analytics.data.v1alpha.FilterExpression" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - }, - { - "name": "metric_aggregations", - "type": "TYPE_ENUM[]" - }, - { - "name": "order_bys", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "currency_code", - "type": "TYPE_STRING" - }, - { - "name": "cohort_spec", - "type": ".google.analytics.data.v1alpha.CohortSpec" - }, - { - "name": "keep_empty_rows", - "type": "TYPE_BOOL" - }, - { - "name": "return_property_quota", - "type": "TYPE_BOOL" - }, - { - "name": "comparisons", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "conversion_spec", - "type": ".google.analytics.data.v1alpha.ConversionSpec" - } - ], - "resultType": ".google.analytics.data.v1alpha.RunReportResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "RunReport", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async", - "title": "AlphaAnalyticsData getMetadata Sample", - "origin": "API_DEFINITION", - "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", - "canonical": true, - "file": "alpha_analytics_data.get_metadata.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadata", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1alpha.Metadata", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "GetMetadata", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js deleted file mode 100644 index 406c9d00e72e..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * This property must be specified for the batch. The property within - * RunPivotReportRequest may either be unspecified or consistent with this - * property. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * Individual requests. Each request has a separate pivot report response. - * Each batch request is allowed up to 5 requests. - */ - // const requests = [1,2,3,4] - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callBatchRunPivotReports() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.batchRunPivotReports(request); - console.log(response); - } - - callBatchRunPivotReports(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js deleted file mode 100644 index 34bd65dadbf7..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * This property must be specified for the batch. The property within - * RunReportRequest may either be unspecified or consistent with this - * property. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * Individual requests. Each request has a separate report response. Each - * batch request is allowed up to 5 requests. - */ - // const requests = [1,2,3,4] - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callBatchRunReports() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.batchRunReports(request); - console.log(response); - } - - callBatchRunReports(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js deleted file mode 100644 index fe9622d5cb6e..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. To - * learn more, see where to find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * `property` should be the same value as in your `runReport` request. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * The dimensions in this report. `dimensions` should be the same value as in - * your `runReport` request. - */ - // const dimensions = [1,2,3,4] - /** - * The metrics in this report. `metrics` should be the same value as in your - * `runReport` request. - */ - // const metrics = [1,2,3,4] - /** - * The filter clause of dimensions. `dimensionFilter` should be the same value - * as in your `runReport` request. - */ - // const dimensionFilter = {} - /** - * The filter clause of metrics. `metricFilter` should be the same value as in - * your `runReport` request - */ - // const metricFilter = {} - /** - * Filters the dimensions and metrics in the response to just this - * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` - * to only return compatible dimensions & metrics. - */ - // const compatibilityFilter = {} - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callCheckCompatibility() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.checkCompatibility(request); - console.log(response); - } - - callCheckCompatibility(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js deleted file mode 100644 index ca3c867f4e4e..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, audienceExport) { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where this audience export will be created. - * Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Required. The audience export to create. - */ - // const audienceExport = {} - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callCreateAudienceExport() { - // Construct request - const request = { - parent, - audienceExport, - }; - - // Run request - const [operation] = await dataClient.createAudienceExport(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAudienceExport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js deleted file mode 100644 index 7eb162b5ab80..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The audience export resource name. - * Format: `properties/{property}/audienceExports/{audience_export}` - */ - // const name = 'abc123' - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callGetAudienceExport() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getAudienceExport(request); - console.log(response); - } - - callGetAudienceExport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js deleted file mode 100644 index 7b80b2ab8a36..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the metadata to retrieve. This name field is - * specified in the URL path and not URL parameters. Property is a numeric - * Google Analytics property identifier. To learn more, see where to find - * your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Example: properties/1234/metadata - * Set the Property ID to 0 for dimensions and metrics common to all - * properties. In this special mode, this method will not return custom - * dimensions and metrics. - */ - // const name = 'abc123' - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callGetMetadata() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.getMetadata(request); - console.log(response); - } - - callGetMetadata(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js deleted file mode 100644 index e6017e48c28b..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. All audience exports for this property will be listed in the - * response. Format: `properties/{property}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of audience exports to return. The service may - * return fewer than this value. If unspecified, at most 200 audience exports - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListAudienceExports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAudienceExports` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callListAudienceExports() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataClient.listAudienceExportsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAudienceExports(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js deleted file mode 100644 index cb08437fa5a8..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the audience export to retrieve users from. - * Format: `properties/{property}/audienceExports/{audience_export}` - */ - // const name = 'abc123' - /** - * Optional. The row count of the start row. The first row is counted as row - * 0. - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const offset = 1234 - /** - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const limit = 1234 - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callQueryAudienceExport() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataClient.queryAudienceExport(request); - console.log(response); - } - - callQueryAudienceExport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js deleted file mode 100644 index 3b4d2cebd420..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * The dimensions requested. All defined dimensions must be used by one of the - * following: dimension_expression, dimension_filter, pivots, order_bys. - */ - // const dimensions = [1,2,3,4] - /** - * The metrics requested, at least one metric needs to be specified. All - * defined metrics must be used by one of the following: metric_expression, - * metric_filter, order_bys. - */ - // const metrics = [1,2,3,4] - /** - * The date range to retrieve event data for the report. If multiple date - * ranges are specified, event data from each date range is used in the - * report. A special dimension with field name "dateRange" can be included in - * a Pivot's field names; if included, the report compares between date - * ranges. In a cohort request, this `dateRanges` must be unspecified. - */ - // const dateRanges = [1,2,3,4] - /** - * Describes the visual format of the report's dimensions in columns or rows. - * The union of the fieldNames (dimension names) in all pivots must be a - * subset of dimension names defined in Dimensions. No two pivots can share a - * dimension. A dimension is only visible if it appears in a pivot. - */ - // const pivots = [1,2,3,4] - /** - * The filter clause of dimensions. Dimensions must be requested to be used in - * this filter. Metrics cannot be used in this filter. - */ - // const dimensionFilter = {} - /** - * The filter clause of metrics. Applied at post aggregation phase, similar to - * SQL having-clause. Metrics must be requested to be used in this filter. - * Dimensions cannot be used in this filter. - */ - // const metricFilter = {} - /** - * A currency code in ISO4217 format, such as "AED", "USD", "JPY". - * If the field is empty, the report uses the property's default currency. - */ - // const currencyCode = 'abc123' - /** - * Cohort group associated with this request. If there is a cohort group - * in the request the 'cohort' dimension must be present. - */ - // const cohortSpec = {} - /** - * If false or unspecified, each row with all metrics equal to 0 will not be - * returned. If true, these rows will be returned if they are not separately - * removed by a filter. - * Regardless of this `keep_empty_rows` setting, only data recorded by the - * Google Analytics property can be displayed in a report. - * For example if a property never logs a `purchase` event, then a query for - * the `eventName` dimension and `eventCount` metric will not have a row - * eventName: "purchase" and eventCount: 0. - */ - // const keepEmptyRows = true - /** - * Toggles whether to return the current state of this Google Analytics - * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). - */ - // const returnPropertyQuota = true - /** - * Optional. The configuration of comparisons requested and displayed. The - * request requires both a comparisons field and a comparisons dimension to - * receive a comparison column in the response. - */ - // const comparisons = [1,2,3,4] - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callRunPivotReport() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.runPivotReport(request); - console.log(response); - } - - callRunPivotReport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js deleted file mode 100644 index d8218ade7365..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * The dimensions requested and displayed. - */ - // const dimensions = [1,2,3,4] - /** - * The metrics requested and displayed. - */ - // const metrics = [1,2,3,4] - /** - * The filter clause of dimensions. Metrics cannot be used in this filter. - */ - // const dimensionFilter = {} - /** - * The filter clause of metrics. Applied at post aggregation phase, similar to - * SQL having-clause. Dimensions cannot be used in this filter. - */ - // const metricFilter = {} - /** - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 250,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. For instance, there are - * fewer than 300 possible values for the dimension `country`, so when - * reporting on only `country`, you can't get more than 300 rows, even if you - * set `limit` to a higher value. - */ - // const limit = 1234 - /** - * Aggregation of metrics. Aggregated metric values will be shown in rows - * where the dimension_values are set to "RESERVED_(MetricAggregation)". - */ - // const metricAggregations = [1,2,3,4] - /** - * Specifies how rows are ordered in the response. - */ - // const orderBys = [1,2,3,4] - /** - * Toggles whether to return the current state of this Google Analytics - * property's Realtime quota. Quota is returned in - * PropertyQuota (#PropertyQuota). - */ - // const returnPropertyQuota = true - /** - * The minute ranges of event data to read. If unspecified, one minute range - * for the last 30 minutes will be used. If multiple minute ranges are - * requested, each response row will contain a zero based minute range index. - * If two minute ranges overlap, the event data for the overlapping minutes is - * included in the response rows for both minute ranges. - */ - // const minuteRanges = [1,2,3,4] - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callRunRealtimeReport() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.runRealtimeReport(request); - console.log(response); - } - - callRunRealtimeReport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js deleted file mode 100644 index 3429e8577fe9..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main() { - // [START analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see where to - * find your Property - * ID (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * Example: properties/1234 - */ - // const property = 'abc123' - /** - * The dimensions requested and displayed. - */ - // const dimensions = [1,2,3,4] - /** - * The metrics requested and displayed. - */ - // const metrics = [1,2,3,4] - /** - * Date ranges of data to read. If multiple date ranges are requested, each - * response row will contain a zero based date range index. If two date - * ranges overlap, the event data for the overlapping days is included in the - * response rows for both date ranges. In a cohort request, this `dateRanges` - * must be unspecified. - */ - // const dateRanges = [1,2,3,4] - /** - * Dimension filters let you ask for only specific dimension values in - * the report. To learn more, see Fundamentals of Dimension - * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - */ - // const dimensionFilter = {} - /** - * The filter clause of metrics. Applied after aggregating the report's rows, - * similar to SQL having-clause. Dimensions cannot be used in this filter. - */ - // const metricFilter = {} - /** - * The row count of the start row. The first row is counted as row 0. - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const offset = 1234 - /** - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 250,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. For instance, there are - * fewer than 300 possible values for the dimension `country`, so when - * reporting on only `country`, you can't get more than 300 rows, even if you - * set `limit` to a higher value. - * To learn more about this pagination parameter, see - * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - */ - // const limit = 1234 - /** - * Aggregation of metrics. Aggregated metric values will be shown in rows - * where the dimension_values are set to "RESERVED_(MetricAggregation)". - * Aggregates including both comparisons and multiple date ranges will - * be aggregated based on the date ranges. - */ - // const metricAggregations = [1,2,3,4] - /** - * Specifies how rows are ordered in the response. - * Requests including both comparisons and multiple date ranges will - * have order bys applied on the comparisons. - */ - // const orderBys = [1,2,3,4] - /** - * A currency code in ISO4217 format, such as "AED", "USD", "JPY". - * If the field is empty, the report uses the property's default currency. - */ - // const currencyCode = 'abc123' - /** - * Cohort group associated with this request. If there is a cohort group - * in the request the 'cohort' dimension must be present. - */ - // const cohortSpec = {} - /** - * If false or unspecified, each row with all metrics equal to 0 will not be - * returned. If true, these rows will be returned if they are not separately - * removed by a filter. - * Regardless of this `keep_empty_rows` setting, only data recorded by the - * Google Analytics property can be displayed in a report. - * For example if a property never logs a `purchase` event, then a query for - * the `eventName` dimension and `eventCount` metric will not have a row - * eventName: "purchase" and eventCount: 0. - */ - // const keepEmptyRows = true - /** - * Toggles whether to return the current state of this Google Analytics - * property's quota. Quota is returned in PropertyQuota (#PropertyQuota). - */ - // const returnPropertyQuota = true - /** - * Optional. The configuration of comparisons requested and displayed. The - * request only requires a comparisons field in order to receive a comparison - * column in the response. - */ - // const comparisons = [1,2,3,4] - - // Imports the Data library - const {BetaAnalyticsDataClient} = require('@google-analytics/data').v1beta; - - // Instantiates a client - const dataClient = new BetaAnalyticsDataClient(); - - async function callRunReport() { - // Construct request - const request = { - }; - - // Run request - const response = await dataClient.runReport(request); - console.log(response); - } - - callRunReport(); - // [END analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json deleted file mode 100644 index ba79913e3173..000000000000 --- a/owl-bot-staging/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json +++ /dev/null @@ -1,639 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-data", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.analytics.data.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async", - "title": "BetaAnalyticsData runReport Sample", - "origin": "API_DEFINITION", - "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).", - "canonical": true, - "file": "beta_analytics_data.run_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 154, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "dimensions", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "metrics", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "date_ranges", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "metric_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - }, - { - "name": "metric_aggregations", - "type": "TYPE_ENUM[]" - }, - { - "name": "order_bys", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "currency_code", - "type": "TYPE_STRING" - }, - { - "name": "cohort_spec", - "type": ".google.analytics.data.v1beta.CohortSpec" - }, - { - "name": "keep_empty_rows", - "type": "TYPE_BOOL" - }, - { - "name": "return_property_quota", - "type": "TYPE_BOOL" - }, - { - "name": "comparisons", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.analytics.data.v1beta.RunReportResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "RunReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunReport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async", - "title": "BetaAnalyticsData runPivotReport Sample", - "origin": "API_DEFINITION", - "description": " Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", - "canonical": true, - "file": "beta_analytics_data.run_pivot_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 127, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunPivotReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "dimensions", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "metrics", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "date_ranges", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "pivots", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "metric_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "currency_code", - "type": "TYPE_STRING" - }, - { - "name": "cohort_spec", - "type": ".google.analytics.data.v1beta.CohortSpec" - }, - { - "name": "keep_empty_rows", - "type": "TYPE_BOOL" - }, - { - "name": "return_property_quota", - "type": "TYPE_BOOL" - }, - { - "name": "comparisons", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.analytics.data.v1beta.RunPivotReportResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "RunPivotReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunPivotReport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async", - "title": "BetaAnalyticsData batchRunReports Sample", - "origin": "API_DEFINITION", - "description": " Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", - "canonical": true, - "file": "beta_analytics_data.batch_run_reports.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchRunReports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.analytics.data.v1beta.BatchRunReportsResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "BatchRunReports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunReports", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async", - "title": "BetaAnalyticsData batchRunPivotReports Sample", - "origin": "API_DEFINITION", - "description": " Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", - "canonical": true, - "file": "beta_analytics_data.batch_run_pivot_reports.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "BatchRunPivotReports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "requests", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.analytics.data.v1beta.BatchRunPivotReportsResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "BatchRunPivotReports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.BatchRunPivotReports", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async", - "title": "BetaAnalyticsData getMetadata Sample", - "origin": "API_DEFINITION", - "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", - "canonical": true, - "file": "beta_analytics_data.get_metadata.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadata", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1beta.Metadata", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "GetMetadata", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetMetadata", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async", - "title": "BetaAnalyticsData runRealtimeReport Sample", - "origin": "API_DEFINITION", - "description": " Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).", - "canonical": true, - "file": "beta_analytics_data.run_realtime_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 107, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunRealtimeReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "dimensions", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "metrics", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "metric_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "limit", - "type": "TYPE_INT64" - }, - { - "name": "metric_aggregations", - "type": "TYPE_ENUM[]" - }, - { - "name": "order_bys", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "return_property_quota", - "type": "TYPE_BOOL" - }, - { - "name": "minute_ranges", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.analytics.data.v1beta.RunRealtimeReportResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "RunRealtimeReport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.RunRealtimeReport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async", - "title": "BetaAnalyticsData checkCompatibility Sample", - "origin": "API_DEFINITION", - "description": " This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.", - "canonical": true, - "file": "beta_analytics_data.check_compatibility.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckCompatibility", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", - "async": true, - "parameters": [ - { - "name": "property", - "type": "TYPE_STRING" - }, - { - "name": "dimensions", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "metrics", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "dimension_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "metric_filter", - "type": ".google.analytics.data.v1beta.FilterExpression" - }, - { - "name": "compatibility_filter", - "type": ".google.analytics.data.v1beta.Compatibility" - } - ], - "resultType": ".google.analytics.data.v1beta.CheckCompatibilityResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "CheckCompatibility", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CheckCompatibility", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async", - "title": "BetaAnalyticsData createAudienceExport Sample", - "origin": "API_DEFINITION", - "description": " Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "beta_analytics_data.create_audience_export.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "audience_export", - "type": ".google.analytics.data.v1beta.AudienceExport" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "CreateAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.CreateAudienceExport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async", - "title": "BetaAnalyticsData queryAudienceExport Sample", - "origin": "API_DEFINITION", - "description": " Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "beta_analytics_data.query_audience_export.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "QueryAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.analytics.data.v1beta.QueryAudienceExportResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "QueryAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.QueryAudienceExport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async", - "title": "BetaAnalyticsData getAudienceExport Sample", - "origin": "API_DEFINITION", - "description": " Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "beta_analytics_data.get_audience_export.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1beta.AudienceExport", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "GetAudienceExport", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.GetAudienceExport", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - }, - { - "regionTag": "analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async", - "title": "BetaAnalyticsData listAudienceExports Sample", - "origin": "API_DEFINITION", - "description": " Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "beta_analytics_data.list_audience_exports.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAudienceExports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.analytics.data.v1beta.ListAudienceExportsResponse", - "client": { - "shortName": "BetaAnalyticsDataClient", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsDataClient" - }, - "method": { - "shortName": "ListAudienceExports", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData.ListAudienceExports", - "service": { - "shortName": "BetaAnalyticsData", - "fullName": "google.analytics.data.v1beta.BetaAnalyticsData" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-analytics-data/src/index.ts b/owl-bot-staging/google-analytics-data/src/index.ts deleted file mode 100644 index 2d76b05e1e8e..000000000000 --- a/owl-bot-staging/google-analytics-data/src/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1alpha from './v1alpha'; -import * as v1beta from './v1beta'; - -const BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; -type BetaAnalyticsDataClient = v1beta.BetaAnalyticsDataClient; - -export {v1alpha, v1beta, BetaAnalyticsDataClient}; -export default {v1alpha, v1beta, BetaAnalyticsDataClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts deleted file mode 100644 index b2010ffa7be5..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts +++ /dev/null @@ -1,2972 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1alpha/alpha_analytics_data_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './alpha_analytics_data_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Google Analytics reporting data service. - * @class - * @memberof v1alpha - */ -export class AlphaAnalyticsDataClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('data'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - alphaAnalyticsDataStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of AlphaAnalyticsDataClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new AlphaAnalyticsDataClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof AlphaAnalyticsDataClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'analyticsdata.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - audienceListPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/audienceLists/{audience_list}' - ), - metadataPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/metadata' - ), - propertyPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}' - ), - propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/propertyQuotasSnapshot' - ), - recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/recurringAudienceLists/{recurring_audience_list}' - ), - reportTaskPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/reportTasks/{report_task}' - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listAudienceLists: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'), - listRecurringAudienceLists: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'), - listReportTasks: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = []; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createAudienceListResponse = protoFilesRoot.lookup( - '.google.analytics.data.v1alpha.AudienceList') as gax.protobuf.Type; - const createAudienceListMetadata = protoFilesRoot.lookup( - '.google.analytics.data.v1alpha.AudienceListMetadata') as gax.protobuf.Type; - const createReportTaskResponse = protoFilesRoot.lookup( - '.google.analytics.data.v1alpha.ReportTask') as gax.protobuf.Type; - const createReportTaskMetadata = protoFilesRoot.lookup( - '.google.analytics.data.v1alpha.ReportTaskMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createAudienceList: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAudienceListResponse.decode.bind(createAudienceListResponse), - createAudienceListMetadata.decode.bind(createAudienceListMetadata)), - createReportTask: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createReportTaskResponse.decode.bind(createReportTaskResponse), - createReportTaskMetadata.decode.bind(createReportTaskMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.alphaAnalyticsDataStub) { - return this.alphaAnalyticsDataStub; - } - - // Put together the "service stub" for - // google.analytics.data.v1alpha.AlphaAnalyticsData. - this.alphaAnalyticsDataStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.analytics.data.v1alpha.AlphaAnalyticsData') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.analytics.data.v1alpha.AlphaAnalyticsData, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const alphaAnalyticsDataStubMethods = - ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks', 'runReport', 'getMetadata']; - for (const methodName of alphaAnalyticsDataStubMethods) { - const callPromise = this.alphaAnalyticsDataStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.alphaAnalyticsDataStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'analyticsdata.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'analyticsdata.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/analytics', - 'https://www.googleapis.com/auth/analytics.readonly' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Returns a customized funnel report of your Google Analytics event data. The - * data returned from the API is as a table with columns for the requested - * dimensions and metrics. - * - * Funnel exploration lets you visualize the steps your users take to complete - * a task and quickly see how well they are succeeding or failing at each - * step. For example, how do prospects become shoppers and then become buyers? - * How do one time buyers become repeat buyers? With this information, you can - * improve inefficient or abandoned customer journeys. To learn more, see [GA4 - * Funnel Explorations](https://support.google.com/analytics/answer/9327974). - * - * This method is introduced at alpha stability with the intention of - * gathering feedback on syntax and capabilities before entering beta. To give - * your feedback on this API, complete the [Google Analytics Data API Funnel - * Reporting - * Feedback](https://docs.google.com/forms/d/e/1FAIpQLSdwOlQDJAUoBiIgUZZ3S_Lwi8gr7Bb0k1jhvc-DEg7Rol3UjA/viewform). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.property] - * Optional. A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * - * Example: properties/1234 - * @param {number[]} [request.dateRanges] - * Optional. Date ranges of data to read. If multiple date ranges are - * requested, each response row will contain a zero based date range index. If - * two date ranges overlap, the event data for the overlapping days is - * included in the response rows for both date ranges. - * @param {google.analytics.data.v1alpha.Funnel} [request.funnel] - * Optional. The configuration of this request's funnel. This funnel - * configuration is required. - * @param {google.analytics.data.v1alpha.FunnelBreakdown} [request.funnelBreakdown] - * Optional. If specified, this breakdown adds a dimension to the funnel table - * sub report response. This breakdown dimension expands each funnel step to - * the unique values of the breakdown dimension. For example, a breakdown by - * the `deviceCategory` dimension will create rows for `mobile`, `tablet`, - * `desktop`, and the total. - * @param {google.analytics.data.v1alpha.FunnelNextAction} [request.funnelNextAction] - * Optional. If specified, next action adds a dimension to the funnel - * visualization sub report response. This next action dimension expands each - * funnel step to the unique values of the next action. For example a next - * action of the `eventName` dimension will create rows for several events - * (for example `session_start` & `click`) and the total. - * - * Next action only supports `eventName` and most Page / Screen dimensions - * like `pageTitle` and `pagePath`. - * @param {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} [request.funnelVisualizationType] - * Optional. The funnel visualization type controls the dimensions present in - * the funnel visualization sub report response. If not specified, - * `STANDARD_FUNNEL` is used. - * @param {number[]} [request.segments] - * Optional. The configurations of segments. Segments are subsets of a - * property's data. In a funnel report with segments, the funnel is evaluated - * in each segment. - * - * Each segment specified in this request - * produces a separate row in the response; in the response, each segment - * identified by its name. - * - * The segments parameter is optional. Requests are limited to 4 segments. - * @param {number} [request.limit] - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] - * Optional. Dimension filters allow you to ask for only specific dimension - * values in the report. To learn more, see [Creating a Report: Dimension - * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - * @param {boolean} [request.returnPropertyQuota] - * Optional. Toggles whether to return the current state of this Analytics - * Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunFunnelReportResponse|RunFunnelReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunFunnelReport_async - */ - runFunnelReport( - request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined - ]>; - runFunnelReport( - request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, - {}|null|undefined>): void; - runFunnelReport( - request: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, - {}|null|undefined>): void; - runFunnelReport( - request?: protos.google.analytics.data.v1alpha.IRunFunnelReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('runFunnelReport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('runFunnelReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.runFunnelReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IRunFunnelReportResponse, - protos.google.analytics.data.v1alpha.IRunFunnelReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('runFunnelReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Retrieves an audience list of users. After creating an audience, the users - * are not immediately available for listing. First, a request to - * `CreateAudienceList` is necessary to create an audience list of users, and - * then second, this method is used to retrieve the users in the audience - * list. - * - * See [Creating an Audience - * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Lists with examples. - * - * Audiences in Google Analytics 4 allow you to segment your users in the ways - * that are important to your business. To learn more, see - * https://support.google.com/analytics/answer/9267572. - * - * This method is available at beta stability at - * [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query). - * To give your feedback on this API, complete the [Google Analytics Audience - * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the audience list to retrieve users from. - * Format: `properties/{property}/audienceLists/{audience_list}` - * @param {number} [request.offset] - * Optional. The row count of the start row. The first row is counted as row - * 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} [request.limit] - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.QueryAudienceListResponse|QueryAudienceListResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryAudienceList_async - */ - queryAudienceList( - request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined - ]>; - queryAudienceList( - request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, - {}|null|undefined>): void; - queryAudienceList( - request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, - {}|null|undefined>): void; - queryAudienceList( - request?: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('queryAudienceList request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('queryAudienceList response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.queryAudienceList(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, - protos.google.analytics.data.v1alpha.IQueryAudienceListRequest|undefined, - {}|undefined - ]) => { - this._log.info('queryAudienceList response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets configuration metadata about a specific audience list. This method - * can be used to understand an audience list after it has been created. - * - * See [Creating an Audience - * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Lists with examples. - * - * This method is available at beta stability at - * [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get). - * To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The audience list resource name. - * Format: `properties/{property}/audienceLists/{audience_list}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async - */ - getAudienceList( - request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined - ]>; - getAudienceList( - request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, - {}|null|undefined>): void; - getAudienceList( - request: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, - {}|null|undefined>): void; - getAudienceList( - request?: protos.google.analytics.data.v1alpha.IGetAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getAudienceList request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getAudienceList response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getAudienceList(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IAudienceList, - protos.google.analytics.data.v1alpha.IGetAudienceListRequest|undefined, - {}|undefined - ]) => { - this._log.info('getAudienceList response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a recurring audience list. Recurring audience lists produces new - * audience lists each day. Audience lists are users in an audience at the - * time of the list's creation. - * - * A recurring audience list ensures that you have audience list based on the - * most recent data available for use each day. If you manually create - * audience list, you don't know when an audience list based on an additional - * day's data is available. This recurring audience list automates the - * creation of an audience list when an additional day's data is available. - * You will consume fewer quota tokens by using recurring audience list versus - * manually creating audience list at various times of day trying to guess - * when an additional day's data is ready. - * - * This method is introduced at alpha stability with the intention of - * gathering feedback on syntax and capabilities before entering beta. To give - * your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this recurring audience list will be - * created. Format: `properties/{property}` - * @param {google.analytics.data.v1alpha.RecurringAudienceList} request.recurringAudienceList - * Required. The recurring audience list to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateRecurringAudienceList_async - */ - createRecurringAudienceList( - request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined - ]>; - createRecurringAudienceList( - request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): void; - createRecurringAudienceList( - request: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): void; - createRecurringAudienceList( - request?: protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createRecurringAudienceList request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createRecurringAudienceList response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createRecurringAudienceList(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.ICreateRecurringAudienceListRequest|undefined, - {}|undefined - ]) => { - this._log.info('createRecurringAudienceList response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets configuration metadata about a specific recurring audience list. This - * method can be used to understand a recurring audience list's state after it - * has been created. For example, a recurring audience list resource will - * generate audience list instances for each day, and this method can be used - * to get the resource name of the most recent audience list instance. - * - * This method is introduced at alpha stability with the intention of - * gathering feedback on syntax and capabilities before entering beta. To give - * your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The recurring audience list resource name. - * Format: - * `properties/{property}/recurringAudienceLists/{recurring_audience_list}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetRecurringAudienceList_async - */ - getRecurringAudienceList( - request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined - ]>; - getRecurringAudienceList( - request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): void; - getRecurringAudienceList( - request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): void; - getRecurringAudienceList( - request?: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getRecurringAudienceList request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getRecurringAudienceList response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getRecurringAudienceList(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IRecurringAudienceList, - protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest|undefined, - {}|undefined - ]) => { - this._log.info('getRecurringAudienceList response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Get all property quotas organized by quota category for a given property. - * This will charge 1 property quota from the category with the most quota. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Quotas from this property will be listed in the response. - * Format: `properties/{property}/propertyQuotasSnapshot` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot|PropertyQuotasSnapshot}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async - */ - getPropertyQuotasSnapshot( - request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined - ]>; - getPropertyQuotasSnapshot( - request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, - {}|null|undefined>): void; - getPropertyQuotasSnapshot( - request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, - {}|null|undefined>): void; - getPropertyQuotasSnapshot( - request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getPropertyQuotasSnapshot request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getPropertyQuotasSnapshot response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getPropertyQuotasSnapshot(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, - protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest|undefined, - {}|undefined - ]) => { - this._log.info('getPropertyQuotasSnapshot response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Retrieves a report task's content. After requesting the `CreateReportTask`, - * you are able to retrieve the report content once the report is - * ACTIVE. This method will return an error if the report task's state is not - * `ACTIVE`. A query response will return the tabular row & column values of - * the report. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The report source name. - * Format: `properties/{property}/reportTasks/{report}` - * @param {number} [request.offset] - * Optional. The row count of the start row in the report. The first row is - * counted as row 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} [request.limit] - * Optional. The number of rows to return from the report. If unspecified, - * 10,000 rows are returned. The API returns a maximum of 250,000 rows per - * request, no matter how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. The number of rows - * available to a QueryReportTaskRequest is further limited by the limit of - * the associated ReportTask. A query can retrieve at most ReportTask.limit - * rows. For example, if the ReportTask has a limit of 1,000, then a - * QueryReportTask request with offset=900 and limit=500 will return at most - * 100 rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.QueryReportTaskResponse|QueryReportTaskResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.query_report_task.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async - */ - queryReportTask( - request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined - ]>; - queryReportTask( - request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, - {}|null|undefined>): void; - queryReportTask( - request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, - {}|null|undefined>): void; - queryReportTask( - request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('queryReportTask request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('queryReportTask response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.queryReportTask(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, - protos.google.analytics.data.v1alpha.IQueryReportTaskRequest|undefined, - {}|undefined - ]) => { - this._log.info('queryReportTask response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets report metadata about a specific report task. After creating a report - * task, use this method to check its processing state or inspect its - * report definition. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The report task resource name. - * Format: `properties/{property}/reportTasks/{report_task}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.get_report_task.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async - */ - getReportTask( - request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined - ]>; - getReportTask( - request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, - {}|null|undefined>): void; - getReportTask( - request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, - {}|null|undefined>): void; - getReportTask( - request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getReportTask request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getReportTask response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getReportTask(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IReportTask, - protos.google.analytics.data.v1alpha.IGetReportTaskRequest|undefined, - {}|undefined - ]) => { - this._log.info('getReportTask response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns a customized report of your Google Analytics event data. Reports - * contain statistics derived from data collected by the Google Analytics - * tracking code. The data returned from the API is as a table with columns - * for the requested dimensions and metrics. Metrics are individual - * measurements of user activity on your property, such as active users or - * event count. Dimensions break down metrics across some common criteria, - * such as country or event name. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * Required. A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * - * Example: properties/1234 - * @param {number[]} [request.dimensions] - * Optional. The dimensions requested and displayed. - * @param {number[]} [request.metrics] - * Optional. The metrics requested and displayed. - * @param {number[]} [request.dateRanges] - * Optional. Date ranges of data to read. If multiple date ranges are - * requested, each response row will contain a zero based date range index. If - * two date ranges overlap, the event data for the overlapping days is - * included in the response rows for both date ranges. In a cohort request, - * this `dateRanges` must be unspecified. - * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] - * Optional. Dimension filters let you ask for only specific dimension values - * in the report. To learn more, see [Fundamentals of Dimension - * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - * @param {google.analytics.data.v1alpha.FilterExpression} [request.metricFilter] - * Optional. The filter clause of metrics. Applied after aggregating the - * report's rows, similar to SQL having-clause. Dimensions cannot be used in - * this filter. - * @param {number} [request.offset] - * Optional. The row count of the start row. The first row is counted as row - * 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} [request.limit] - * Optional. The maximum number of rows to return. If unspecified, 10,000 rows - * are returned. The API returns a maximum of 250,000 rows per request, no - * matter how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. For instance, there are - * fewer than 300 possible values for the dimension `country`, so when - * reporting on only `country`, you can't get more than 300 rows, even if you - * set `limit` to a higher value. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number[]} [request.metricAggregations] - * Optional. Aggregation of metrics. Aggregated metric values will be shown in - * rows where the dimension_values are set to "RESERVED_(MetricAggregation)". - * Aggregates including both comparisons and multiple date ranges will - * be aggregated based on the date ranges. - * @param {number[]} [request.orderBys] - * Optional. Specifies how rows are ordered in the response. - * Requests including both comparisons and multiple date ranges will - * have order bys applied on the comparisons. - * @param {string} [request.currencyCode] - * Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". - * If the field is empty, the report uses the property's default currency. - * @param {google.analytics.data.v1alpha.CohortSpec} [request.cohortSpec] - * Optional. Cohort group associated with this request. If there is a cohort - * group in the request the 'cohort' dimension must be present. - * @param {boolean} [request.keepEmptyRows] - * Optional. If false or unspecified, each row with all metrics equal to 0 - * will not be returned. If true, these rows will be returned if they are not - * separately removed by a filter. - * - * Regardless of this `keep_empty_rows` setting, only data recorded by the - * Google Analytics property can be displayed in a report. - * - * For example if a property never logs a `purchase` event, then a query for - * the `eventName` dimension and `eventCount` metric will not have a row - * eventName: "purchase" and eventCount: 0. - * @param {boolean} [request.returnPropertyQuota] - * Optional. Toggles whether to return the current state of this Google - * Analytics property's quota. Quota is returned in - * [PropertyQuota](#PropertyQuota). - * @param {number[]} [request.comparisons] - * Optional. The configuration of comparisons requested and displayed. The - * request only requires a comparisons field in order to receive a comparison - * column in the response. - * @param {google.analytics.data.v1alpha.ConversionSpec} [request.conversionSpec] - * Optional. Controls conversion reporting. This field is optional. If this - * field is set or any conversion metrics are requested, the report will be a - * conversion report. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunReportResponse|RunReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.run_report.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async - */ - runReport( - request?: protos.google.analytics.data.v1alpha.IRunReportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined - ]>; - runReport( - request: protos.google.analytics.data.v1alpha.IRunReportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, - {}|null|undefined>): void; - runReport( - request: protos.google.analytics.data.v1alpha.IRunReportRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, - {}|null|undefined>): void; - runReport( - request?: protos.google.analytics.data.v1alpha.IRunReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('runReport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('runReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.runReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IRunReportResponse, - protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('runReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns metadata for dimensions and metrics available in reporting methods. - * Used to explore the dimensions and metrics. In this method, a Google - * Analytics property identifier is specified in the request, and - * the metadata response includes Custom dimensions and metrics as well as - * Universal metadata. - * - * For example if a custom metric with parameter name `levels_unlocked` is - * registered to a property, the Metadata response will contain - * `customEvent:levels_unlocked`. Universal metadata are dimensions and - * metrics applicable to any property such as `country` and `totalUsers`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the metadata to retrieve. This name field is - * specified in the URL path and not URL parameters. Property is a numeric - * Google Analytics property identifier. To learn more, see [where to find - * your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * - * Example: properties/1234/metadata - * - * Set the Property ID to 0 for dimensions and metrics common to all - * properties. In this special mode, this method will not return custom - * dimensions and metrics. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.Metadata|Metadata}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.get_metadata.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async - */ - getMetadata( - request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined - ]>; - getMetadata( - request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, - {}|null|undefined>): void; - getMetadata( - request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, - {}|null|undefined>): void; - getMetadata( - request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getMetadata request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMetadata response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getMetadata(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.IMetadata, - protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, - {}|undefined - ]) => { - this._log.info('getMetadata response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Creates an audience list for later retrieval. This method quickly returns - * the audience list's resource name and initiates a long running asynchronous - * request to form an audience list. To list the users in an audience list, - * first create the audience list through this method and then send the - * audience resource name to the `QueryAudienceList` method. - * - * See [Creating an Audience - * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Lists with examples. - * - * An audience list is a snapshot of the users currently in the audience at - * the time of audience list creation. Creating audience lists for one - * audience on different days will return different results as users enter and - * exit the audience. - * - * Audiences in Google Analytics 4 allow you to segment your users in the ways - * that are important to your business. To learn more, see - * https://support.google.com/analytics/answer/9267572. Audience lists contain - * the users in each audience. - * - * This method is available at beta stability at - * [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create). - * To give your feedback on this API, complete the [Google Analytics Audience - * Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this audience list will be created. - * Format: `properties/{property}` - * @param {google.analytics.data.v1alpha.AudienceList} request.audienceList - * Required. The audience list to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async - */ - createAudienceList( - request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAudienceList( - request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAudienceList( - request: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAudienceList( - request?: protos.google.analytics.data.v1alpha.ICreateAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createAudienceList response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createAudienceList request %j', request); - return this.innerApiCalls.createAudienceList(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createAudienceList response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createAudienceList()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async - */ - async checkCreateAudienceListProgress(name: string): Promise>{ - this._log.info('createAudienceList long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceList, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Initiates the creation of a report task. This method quickly - * returns a report task and initiates a long running - * asynchronous request to form a customized report of your Google Analytics - * event data. - * - * A report task will be retained and available for querying for 72 hours - * after it has been created. - * - * A report task created by one user can be listed and queried by all users - * who have access to the property. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this report task will be created. - * Format: `properties/{propertyId}` - * @param {google.analytics.data.v1alpha.ReportTask} request.reportTask - * Required. The report task configuration to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async - */ - createReportTask( - request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createReportTask( - request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createReportTask( - request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createReportTask( - request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createReportTask response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createReportTask request %j', request); - return this.innerApiCalls.createReportTask(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createReportTask response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createReportTask()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async - */ - async checkCreateReportTaskProgress(name: string): Promise>{ - this._log.info('createReportTask long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createReportTask, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all audience lists for a property. This method can be used for you to - * find and reuse existing audience lists rather than creating unnecessary new - * audience lists. The same audience can have multiple audience lists that - * represent the list of users that were in an audience on different days. - * - * See [Creating an Audience - * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Lists with examples. - * - * This method is available at beta stability at - * [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list). - * To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience lists for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience lists to return. The service may - * return fewer than this value. If unspecified, at most 200 audience lists - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceLists` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceLists` must - * match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listAudienceListsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAudienceLists( - request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IAudienceList[], - protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse - ]>; - listAudienceLists( - request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IAudienceList>): void; - listAudienceLists( - request: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IAudienceList>): void; - listAudienceLists( - request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IAudienceList>, - callback?: PaginationCallback< - protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IAudienceList>): - Promise<[ - protos.google.analytics.data.v1alpha.IAudienceList[], - protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IAudienceList>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listAudienceLists values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listAudienceLists request %j', request); - return this.innerApiCalls - .listAudienceLists(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.analytics.data.v1alpha.IAudienceList[], - protos.google.analytics.data.v1alpha.IListAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListAudienceListsResponse - ]) => { - this._log.info('listAudienceLists values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listAudienceLists`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience lists for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience lists to return. The service may - * return fewer than this value. If unspecified, at most 200 audience lists - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceLists` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceLists` must - * match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listAudienceListsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAudienceListsStream( - request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAudienceLists']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAudienceLists stream %j', request); - return this.descriptors.page.listAudienceLists.createStream( - this.innerApiCalls.listAudienceLists as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAudienceLists`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience lists for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience lists to return. The service may - * return fewer than this value. If unspecified, at most 200 audience lists - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceLists` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceLists` must - * match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async - */ - listAudienceListsAsync( - request?: protos.google.analytics.data.v1alpha.IListAudienceListsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAudienceLists']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAudienceLists iterate %j', request); - return this.descriptors.page.listAudienceLists.asyncIterate( - this.innerApiCalls['listAudienceLists'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all recurring audience lists for a property. This method can be used - * for you to find and reuse existing recurring audience lists rather than - * creating unnecessary new recurring audience lists. The same audience can - * have multiple recurring audience lists that represent different dimension - * combinations; for example, just the dimension `deviceId` or both the - * dimensions `deviceId` and `userId`. - * - * This method is introduced at alpha stability with the intention of - * gathering feedback on syntax and capabilities before entering beta. To give - * your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All recurring audience lists for this property will be listed in - * the response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of recurring audience lists to return. The - * service may return fewer than this value. If unspecified, at most 200 - * recurring audience lists will be returned. The maximum value is 1000 - * (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent - * page. - * - * When paginating, all other parameters provided to - * `ListRecurringAudienceLists` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listRecurringAudienceListsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRecurringAudienceLists( - request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList[], - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse - ]>; - listRecurringAudienceLists( - request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; - listRecurringAudienceLists( - request: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IRecurringAudienceList>): void; - listRecurringAudienceLists( - request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IRecurringAudienceList>, - callback?: PaginationCallback< - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IRecurringAudienceList>): - Promise<[ - protos.google.analytics.data.v1alpha.IRecurringAudienceList[], - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse|null|undefined, - protos.google.analytics.data.v1alpha.IRecurringAudienceList>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listRecurringAudienceLists values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listRecurringAudienceLists request %j', request); - return this.innerApiCalls - .listRecurringAudienceLists(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.analytics.data.v1alpha.IRecurringAudienceList[], - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest|null, - protos.google.analytics.data.v1alpha.IListRecurringAudienceListsResponse - ]) => { - this._log.info('listRecurringAudienceLists values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listRecurringAudienceLists`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All recurring audience lists for this property will be listed in - * the response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of recurring audience lists to return. The - * service may return fewer than this value. If unspecified, at most 200 - * recurring audience lists will be returned. The maximum value is 1000 - * (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent - * page. - * - * When paginating, all other parameters provided to - * `ListRecurringAudienceLists` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listRecurringAudienceListsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRecurringAudienceListsStream( - request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRecurringAudienceLists']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRecurringAudienceLists stream %j', request); - return this.descriptors.page.listRecurringAudienceLists.createStream( - this.innerApiCalls.listRecurringAudienceLists as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRecurringAudienceLists`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All recurring audience lists for this property will be listed in - * the response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of recurring audience lists to return. The - * service may return fewer than this value. If unspecified, at most 200 - * recurring audience lists will be returned. The maximum value is 1000 - * (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListRecurringAudienceLists` call. Provide this to retrieve the subsequent - * page. - * - * When paginating, all other parameters provided to - * `ListRecurringAudienceLists` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.analytics.data.v1alpha.RecurringAudienceList|RecurringAudienceList}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async - */ - listRecurringAudienceListsAsync( - request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRecurringAudienceLists']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRecurringAudienceLists iterate %j', request); - return this.descriptors.page.listRecurringAudienceLists.asyncIterate( - this.innerApiCalls['listRecurringAudienceLists'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all report tasks for a property. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All report tasks for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of report tasks to return. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReportTasks` call. - * Provide this to retrieve the subsequent page. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listReportTasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listReportTasks( - request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.IReportTask[], - protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, - protos.google.analytics.data.v1alpha.IListReportTasksResponse - ]>; - listReportTasks( - request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListReportTasksRequest, - protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, - protos.google.analytics.data.v1alpha.IReportTask>): void; - listReportTasks( - request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - callback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListReportTasksRequest, - protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, - protos.google.analytics.data.v1alpha.IReportTask>): void; - listReportTasks( - request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.analytics.data.v1alpha.IListReportTasksRequest, - protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, - protos.google.analytics.data.v1alpha.IReportTask>, - callback?: PaginationCallback< - protos.google.analytics.data.v1alpha.IListReportTasksRequest, - protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, - protos.google.analytics.data.v1alpha.IReportTask>): - Promise<[ - protos.google.analytics.data.v1alpha.IReportTask[], - protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, - protos.google.analytics.data.v1alpha.IListReportTasksResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.analytics.data.v1alpha.IListReportTasksRequest, - protos.google.analytics.data.v1alpha.IListReportTasksResponse|null|undefined, - protos.google.analytics.data.v1alpha.IReportTask>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listReportTasks values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listReportTasks request %j', request); - return this.innerApiCalls - .listReportTasks(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.analytics.data.v1alpha.IReportTask[], - protos.google.analytics.data.v1alpha.IListReportTasksRequest|null, - protos.google.analytics.data.v1alpha.IListReportTasksResponse - ]) => { - this._log.info('listReportTasks values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listReportTasks`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All report tasks for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of report tasks to return. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReportTasks` call. - * Provide this to retrieve the subsequent page. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listReportTasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listReportTasksStream( - request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listReportTasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listReportTasks stream %j', request); - return this.descriptors.page.listReportTasks.createStream( - this.innerApiCalls.listReportTasks as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listReportTasks`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All report tasks for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of report tasks to return. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReportTasks` call. - * Provide this to retrieve the subsequent page. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async - */ - listReportTasksAsync( - request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listReportTasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listReportTasks iterate %j', request); - return this.descriptors.page.listReportTasks.asyncIterate( - this.innerApiCalls['listReportTasks'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified audienceList resource name string. - * - * @param {string} property - * @param {string} audience_list - * @returns {string} Resource name string. - */ - audienceListPath(property:string,audienceList:string) { - return this.pathTemplates.audienceListPathTemplate.render({ - property: property, - audience_list: audienceList, - }); - } - - /** - * Parse the property from AudienceList resource. - * - * @param {string} audienceListName - * A fully-qualified path representing AudienceList resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromAudienceListName(audienceListName: string) { - return this.pathTemplates.audienceListPathTemplate.match(audienceListName).property; - } - - /** - * Parse the audience_list from AudienceList resource. - * - * @param {string} audienceListName - * A fully-qualified path representing AudienceList resource. - * @returns {string} A string representing the audience_list. - */ - matchAudienceListFromAudienceListName(audienceListName: string) { - return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list; - } - - /** - * Return a fully-qualified metadata resource name string. - * - * @param {string} property - * @returns {string} Resource name string. - */ - metadataPath(property:string) { - return this.pathTemplates.metadataPathTemplate.render({ - property: property, - }); - } - - /** - * Parse the property from Metadata resource. - * - * @param {string} metadataName - * A fully-qualified path representing Metadata resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromMetadataName(metadataName: string) { - return this.pathTemplates.metadataPathTemplate.match(metadataName).property; - } - - /** - * Return a fully-qualified property resource name string. - * - * @param {string} property - * @returns {string} Resource name string. - */ - propertyPath(property:string) { - return this.pathTemplates.propertyPathTemplate.render({ - property: property, - }); - } - - /** - * Parse the property from Property resource. - * - * @param {string} propertyName - * A fully-qualified path representing Property resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromPropertyName(propertyName: string) { - return this.pathTemplates.propertyPathTemplate.match(propertyName).property; - } - - /** - * Return a fully-qualified propertyQuotasSnapshot resource name string. - * - * @param {string} property - * @returns {string} Resource name string. - */ - propertyQuotasSnapshotPath(property:string) { - return this.pathTemplates.propertyQuotasSnapshotPathTemplate.render({ - property: property, - }); - } - - /** - * Parse the property from PropertyQuotasSnapshot resource. - * - * @param {string} propertyQuotasSnapshotName - * A fully-qualified path representing PropertyQuotasSnapshot resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName: string) { - return this.pathTemplates.propertyQuotasSnapshotPathTemplate.match(propertyQuotasSnapshotName).property; - } - - /** - * Return a fully-qualified recurringAudienceList resource name string. - * - * @param {string} property - * @param {string} recurring_audience_list - * @returns {string} Resource name string. - */ - recurringAudienceListPath(property:string,recurringAudienceList:string) { - return this.pathTemplates.recurringAudienceListPathTemplate.render({ - property: property, - recurring_audience_list: recurringAudienceList, - }); - } - - /** - * Parse the property from RecurringAudienceList resource. - * - * @param {string} recurringAudienceListName - * A fully-qualified path representing RecurringAudienceList resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromRecurringAudienceListName(recurringAudienceListName: string) { - return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).property; - } - - /** - * Parse the recurring_audience_list from RecurringAudienceList resource. - * - * @param {string} recurringAudienceListName - * A fully-qualified path representing RecurringAudienceList resource. - * @returns {string} A string representing the recurring_audience_list. - */ - matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string) { - return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).recurring_audience_list; - } - - /** - * Return a fully-qualified reportTask resource name string. - * - * @param {string} property - * @param {string} report_task - * @returns {string} Resource name string. - */ - reportTaskPath(property:string,reportTask:string) { - return this.pathTemplates.reportTaskPathTemplate.render({ - property: property, - report_task: reportTask, - }); - } - - /** - * Parse the property from ReportTask resource. - * - * @param {string} reportTaskName - * A fully-qualified path representing ReportTask resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromReportTaskName(reportTaskName: string) { - return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).property; - } - - /** - * Parse the report_task from ReportTask resource. - * - * @param {string} reportTaskName - * A fully-qualified path representing ReportTask resource. - * @returns {string} A string representing the report_task. - */ - matchReportTaskFromReportTaskName(reportTaskName: string) { - return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName).report_task; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.alphaAnalyticsDataStub && !this._terminated) { - return this.alphaAnalyticsDataStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json deleted file mode 100644 index 56d47db54383..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "interfaces": { - "google.analytics.data.v1alpha.AlphaAnalyticsData": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unknown": [ - "UNKNOWN" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "RunFunnelReport": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "QueryAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListAudienceLists": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateRecurringAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetRecurringAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListRecurringAudienceLists": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetPropertyQuotasSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateReportTask": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "QueryReportTask": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetReportTask": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListReportTasks": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "RunReport": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetMetadata": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - } - } - } - } -} diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json b/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json deleted file mode 100644 index 5047e31ed5c6..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1alpha/alpha_analytics_data_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/analytics/data/v1alpha/analytics_data_api.proto", - "../../protos/google/analytics/data/v1alpha/data.proto" -] diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json b/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json deleted file mode 100644 index d0689e4e3b83..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1alpha/gapic_metadata.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.analytics.data.v1alpha", - "libraryPackage": "@google-analytics/data", - "services": { - "AlphaAnalyticsData": { - "clients": { - "grpc": { - "libraryClient": "AlphaAnalyticsDataClient", - "rpcs": { - "RunFunnelReport": { - "methods": [ - "runFunnelReport" - ] - }, - "QueryAudienceList": { - "methods": [ - "queryAudienceList" - ] - }, - "GetAudienceList": { - "methods": [ - "getAudienceList" - ] - }, - "CreateRecurringAudienceList": { - "methods": [ - "createRecurringAudienceList" - ] - }, - "GetRecurringAudienceList": { - "methods": [ - "getRecurringAudienceList" - ] - }, - "GetPropertyQuotasSnapshot": { - "methods": [ - "getPropertyQuotasSnapshot" - ] - }, - "QueryReportTask": { - "methods": [ - "queryReportTask" - ] - }, - "GetReportTask": { - "methods": [ - "getReportTask" - ] - }, - "RunReport": { - "methods": [ - "runReport" - ] - }, - "GetMetadata": { - "methods": [ - "getMetadata" - ] - }, - "CreateAudienceList": { - "methods": [ - "createAudienceList" - ] - }, - "CreateReportTask": { - "methods": [ - "createReportTask" - ] - }, - "ListAudienceLists": { - "methods": [ - "listAudienceLists", - "listAudienceListsStream", - "listAudienceListsAsync" - ] - }, - "ListRecurringAudienceLists": { - "methods": [ - "listRecurringAudienceLists", - "listRecurringAudienceListsStream", - "listRecurringAudienceListsAsync" - ] - }, - "ListReportTasks": { - "methods": [ - "listReportTasks", - "listReportTasksStream", - "listReportTasksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "AlphaAnalyticsDataClient", - "rpcs": { - "RunFunnelReport": { - "methods": [ - "runFunnelReport" - ] - }, - "QueryAudienceList": { - "methods": [ - "queryAudienceList" - ] - }, - "GetAudienceList": { - "methods": [ - "getAudienceList" - ] - }, - "CreateRecurringAudienceList": { - "methods": [ - "createRecurringAudienceList" - ] - }, - "GetRecurringAudienceList": { - "methods": [ - "getRecurringAudienceList" - ] - }, - "GetPropertyQuotasSnapshot": { - "methods": [ - "getPropertyQuotasSnapshot" - ] - }, - "QueryReportTask": { - "methods": [ - "queryReportTask" - ] - }, - "GetReportTask": { - "methods": [ - "getReportTask" - ] - }, - "RunReport": { - "methods": [ - "runReport" - ] - }, - "GetMetadata": { - "methods": [ - "getMetadata" - ] - }, - "CreateAudienceList": { - "methods": [ - "createAudienceList" - ] - }, - "CreateReportTask": { - "methods": [ - "createReportTask" - ] - }, - "ListAudienceLists": { - "methods": [ - "listAudienceLists", - "listAudienceListsStream", - "listAudienceListsAsync" - ] - }, - "ListRecurringAudienceLists": { - "methods": [ - "listRecurringAudienceLists", - "listRecurringAudienceListsStream", - "listRecurringAudienceListsAsync" - ] - }, - "ListReportTasks": { - "methods": [ - "listReportTasks", - "listReportTasksStream", - "listReportTasksAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts b/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts deleted file mode 100644 index ad8f01f138b3..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1alpha/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {AlphaAnalyticsDataClient} from './alpha_analytics_data_client'; diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts deleted file mode 100644 index 64d219c3e6bc..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client.ts +++ /dev/null @@ -1,2233 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1beta/beta_analytics_data_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './beta_analytics_data_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Google Analytics reporting data service. - * @class - * @memberof v1beta - */ -export class BetaAnalyticsDataClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('data'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - betaAnalyticsDataStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of BetaAnalyticsDataClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new BetaAnalyticsDataClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof BetaAnalyticsDataClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'analyticsdata.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - audienceExportPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/audienceExports/{audience_export}' - ), - metadataPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}/metadata' - ), - propertyPathTemplate: new this._gaxModule.PathTemplate( - 'properties/{property}' - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listAudienceExports: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = []; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createAudienceExportResponse = protoFilesRoot.lookup( - '.google.analytics.data.v1beta.AudienceExport') as gax.protobuf.Type; - const createAudienceExportMetadata = protoFilesRoot.lookup( - '.google.analytics.data.v1beta.AudienceExportMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createAudienceExport: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAudienceExportResponse.decode.bind(createAudienceExportResponse), - createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.betaAnalyticsDataStub) { - return this.betaAnalyticsDataStub; - } - - // Put together the "service stub" for - // google.analytics.data.v1beta.BetaAnalyticsData. - this.betaAnalyticsDataStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.analytics.data.v1beta.BetaAnalyticsData') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.analytics.data.v1beta.BetaAnalyticsData, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const betaAnalyticsDataStubMethods = - ['runReport', 'runPivotReport', 'batchRunReports', 'batchRunPivotReports', 'getMetadata', 'runRealtimeReport', 'checkCompatibility', 'createAudienceExport', 'queryAudienceExport', 'getAudienceExport', 'listAudienceExports']; - for (const methodName of betaAnalyticsDataStubMethods) { - const callPromise = this.betaAnalyticsDataStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.betaAnalyticsDataStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'analyticsdata.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'analyticsdata.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/analytics', - 'https://www.googleapis.com/auth/analytics.readonly' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Returns a customized report of your Google Analytics event data. Reports - * contain statistics derived from data collected by the Google Analytics - * tracking code. The data returned from the API is as a table with columns - * for the requested dimensions and metrics. Metrics are individual - * measurements of user activity on your property, such as active users or - * event count. Dimensions break down metrics across some common criteria, - * such as country or event name. - * - * For a guide to constructing requests & understanding responses, see - * [Creating a - * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * - * Example: properties/1234 - * @param {number[]} request.dimensions - * The dimensions requested and displayed. - * @param {number[]} request.metrics - * The metrics requested and displayed. - * @param {number[]} request.dateRanges - * Date ranges of data to read. If multiple date ranges are requested, each - * response row will contain a zero based date range index. If two date - * ranges overlap, the event data for the overlapping days is included in the - * response rows for both date ranges. In a cohort request, this `dateRanges` - * must be unspecified. - * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter - * Dimension filters let you ask for only specific dimension values in - * the report. To learn more, see [Fundamentals of Dimension - * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter - * The filter clause of metrics. Applied after aggregating the report's rows, - * similar to SQL having-clause. Dimensions cannot be used in this filter. - * @param {number} request.offset - * The row count of the start row. The first row is counted as row 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} request.limit - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 250,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. For instance, there are - * fewer than 300 possible values for the dimension `country`, so when - * reporting on only `country`, you can't get more than 300 rows, even if you - * set `limit` to a higher value. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number[]} request.metricAggregations - * Aggregation of metrics. Aggregated metric values will be shown in rows - * where the dimension_values are set to "RESERVED_(MetricAggregation)". - * Aggregates including both comparisons and multiple date ranges will - * be aggregated based on the date ranges. - * @param {number[]} request.orderBys - * Specifies how rows are ordered in the response. - * Requests including both comparisons and multiple date ranges will - * have order bys applied on the comparisons. - * @param {string} request.currencyCode - * A currency code in ISO4217 format, such as "AED", "USD", "JPY". - * If the field is empty, the report uses the property's default currency. - * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec - * Cohort group associated with this request. If there is a cohort group - * in the request the 'cohort' dimension must be present. - * @param {boolean} request.keepEmptyRows - * If false or unspecified, each row with all metrics equal to 0 will not be - * returned. If true, these rows will be returned if they are not separately - * removed by a filter. - * - * Regardless of this `keep_empty_rows` setting, only data recorded by the - * Google Analytics property can be displayed in a report. - * - * For example if a property never logs a `purchase` event, then a query for - * the `eventName` dimension and `eventCount` metric will not have a row - * eventName: "purchase" and eventCount: 0. - * @param {boolean} request.returnPropertyQuota - * Toggles whether to return the current state of this Google Analytics - * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - * @param {number[]} [request.comparisons] - * Optional. The configuration of comparisons requested and displayed. The - * request only requires a comparisons field in order to receive a comparison - * column in the response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunReportResponse|RunReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.run_report.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async - */ - runReport( - request?: protos.google.analytics.data.v1beta.IRunReportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined - ]>; - runReport( - request: protos.google.analytics.data.v1beta.IRunReportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, - {}|null|undefined>): void; - runReport( - request: protos.google.analytics.data.v1beta.IRunReportRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, - {}|null|undefined>): void; - runReport( - request?: protos.google.analytics.data.v1beta.IRunReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('runReport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('runReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.runReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IRunReportResponse, - protos.google.analytics.data.v1beta.IRunReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('runReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns a customized pivot report of your Google Analytics event data. - * Pivot reports are more advanced and expressive formats than regular - * reports. In a pivot report, dimensions are only visible if they are - * included in a pivot. Multiple pivots can be specified to further dissect - * your data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * Within a batch request, this property should either be unspecified or - * consistent with the batch-level property. - * - * Example: properties/1234 - * @param {number[]} request.dimensions - * The dimensions requested. All defined dimensions must be used by one of the - * following: dimension_expression, dimension_filter, pivots, order_bys. - * @param {number[]} request.metrics - * The metrics requested, at least one metric needs to be specified. All - * defined metrics must be used by one of the following: metric_expression, - * metric_filter, order_bys. - * @param {number[]} request.dateRanges - * The date range to retrieve event data for the report. If multiple date - * ranges are specified, event data from each date range is used in the - * report. A special dimension with field name "dateRange" can be included in - * a Pivot's field names; if included, the report compares between date - * ranges. In a cohort request, this `dateRanges` must be unspecified. - * @param {number[]} request.pivots - * Describes the visual format of the report's dimensions in columns or rows. - * The union of the fieldNames (dimension names) in all pivots must be a - * subset of dimension names defined in Dimensions. No two pivots can share a - * dimension. A dimension is only visible if it appears in a pivot. - * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter - * The filter clause of dimensions. Dimensions must be requested to be used in - * this filter. Metrics cannot be used in this filter. - * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter - * The filter clause of metrics. Applied at post aggregation phase, similar to - * SQL having-clause. Metrics must be requested to be used in this filter. - * Dimensions cannot be used in this filter. - * @param {string} request.currencyCode - * A currency code in ISO4217 format, such as "AED", "USD", "JPY". - * If the field is empty, the report uses the property's default currency. - * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec - * Cohort group associated with this request. If there is a cohort group - * in the request the 'cohort' dimension must be present. - * @param {boolean} request.keepEmptyRows - * If false or unspecified, each row with all metrics equal to 0 will not be - * returned. If true, these rows will be returned if they are not separately - * removed by a filter. - * - * Regardless of this `keep_empty_rows` setting, only data recorded by the - * Google Analytics property can be displayed in a report. - * - * For example if a property never logs a `purchase` event, then a query for - * the `eventName` dimension and `eventCount` metric will not have a row - * eventName: "purchase" and eventCount: 0. - * @param {boolean} request.returnPropertyQuota - * Toggles whether to return the current state of this Google Analytics - * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). - * @param {number[]} [request.comparisons] - * Optional. The configuration of comparisons requested and displayed. The - * request requires both a comparisons field and a comparisons dimension to - * receive a comparison column in the response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunPivotReportResponse|RunPivotReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async - */ - runPivotReport( - request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined - ]>; - runPivotReport( - request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, - {}|null|undefined>): void; - runPivotReport( - request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, - {}|null|undefined>): void; - runPivotReport( - request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('runPivotReport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('runPivotReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.runPivotReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IRunPivotReportResponse, - protos.google.analytics.data.v1beta.IRunPivotReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('runPivotReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns multiple reports in a batch. All reports must be for the same - * Google Analytics property. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * This property must be specified for the batch. The property within - * RunReportRequest may either be unspecified or consistent with this - * property. - * - * Example: properties/1234 - * @param {number[]} request.requests - * Individual requests. Each request has a separate report response. Each - * batch request is allowed up to 5 requests. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunReportsResponse|BatchRunReportsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async - */ - batchRunReports( - request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined - ]>; - batchRunReports( - request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, - {}|null|undefined>): void; - batchRunReports( - request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, - {}|null|undefined>): void; - batchRunReports( - request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('batchRunReports request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('batchRunReports response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.batchRunReports(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IBatchRunReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunReportsRequest|undefined, - {}|undefined - ]) => { - this._log.info('batchRunReports response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns multiple pivot reports in a batch. All reports must be for the same - * Google Analytics property. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * This property must be specified for the batch. The property within - * RunPivotReportRequest may either be unspecified or consistent with this - * property. - * - * Example: properties/1234 - * @param {number[]} request.requests - * Individual requests. Each request has a separate pivot report response. - * Each batch request is allowed up to 5 requests. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async - */ - batchRunPivotReports( - request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined - ]>; - batchRunPivotReports( - request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, - {}|null|undefined>): void; - batchRunPivotReports( - request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, - {}|null|undefined>): void; - batchRunPivotReports( - request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('batchRunPivotReports request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('batchRunPivotReports response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.batchRunPivotReports(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, - protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest|undefined, - {}|undefined - ]) => { - this._log.info('batchRunPivotReports response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns metadata for dimensions and metrics available in reporting methods. - * Used to explore the dimensions and metrics. In this method, a Google - * Analytics property identifier is specified in the request, and - * the metadata response includes Custom dimensions and metrics as well as - * Universal metadata. - * - * For example if a custom metric with parameter name `levels_unlocked` is - * registered to a property, the Metadata response will contain - * `customEvent:levels_unlocked`. Universal metadata are dimensions and - * metrics applicable to any property such as `country` and `totalUsers`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the metadata to retrieve. This name field is - * specified in the URL path and not URL parameters. Property is a numeric - * Google Analytics property identifier. To learn more, see [where to find - * your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * - * Example: properties/1234/metadata - * - * Set the Property ID to 0 for dimensions and metrics common to all - * properties. In this special mode, this method will not return custom - * dimensions and metrics. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.Metadata|Metadata}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.get_metadata.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async - */ - getMetadata( - request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined - ]>; - getMetadata( - request: protos.google.analytics.data.v1beta.IGetMetadataRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, - {}|null|undefined>): void; - getMetadata( - request: protos.google.analytics.data.v1beta.IGetMetadataRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, - {}|null|undefined>): void; - getMetadata( - request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getMetadata request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMetadata response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getMetadata(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IMetadata, - protos.google.analytics.data.v1beta.IGetMetadataRequest|undefined, - {}|undefined - ]) => { - this._log.info('getMetadata response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Returns a customized report of realtime event data for your property. - * Events appear in realtime reports seconds after they have been sent to - * the Google Analytics. Realtime reports show events and usage data for the - * periods of time ranging from the present moment to 30 minutes ago (up to - * 60 minutes for Google Analytics 360 properties). - * - * For a guide to constructing realtime requests & understanding responses, - * see [Creating a Realtime - * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. - * Specified in the URL path and not the body. To learn more, see [where to - * find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * - * Example: properties/1234 - * @param {number[]} request.dimensions - * The dimensions requested and displayed. - * @param {number[]} request.metrics - * The metrics requested and displayed. - * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter - * The filter clause of dimensions. Metrics cannot be used in this filter. - * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter - * The filter clause of metrics. Applied at post aggregation phase, similar to - * SQL having-clause. Dimensions cannot be used in this filter. - * @param {number} request.limit - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 250,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. For instance, there are - * fewer than 300 possible values for the dimension `country`, so when - * reporting on only `country`, you can't get more than 300 rows, even if you - * set `limit` to a higher value. - * @param {number[]} request.metricAggregations - * Aggregation of metrics. Aggregated metric values will be shown in rows - * where the dimension_values are set to "RESERVED_(MetricAggregation)". - * @param {number[]} request.orderBys - * Specifies how rows are ordered in the response. - * @param {boolean} request.returnPropertyQuota - * Toggles whether to return the current state of this Google Analytics - * property's Realtime quota. Quota is returned in - * [PropertyQuota](#PropertyQuota). - * @param {number[]} request.minuteRanges - * The minute ranges of event data to read. If unspecified, one minute range - * for the last 30 minutes will be used. If multiple minute ranges are - * requested, each response row will contain a zero based minute range index. - * If two minute ranges overlap, the event data for the overlapping minutes is - * included in the response rows for both minute ranges. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunRealtimeReportResponse|RunRealtimeReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async - */ - runRealtimeReport( - request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined - ]>; - runRealtimeReport( - request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, - {}|null|undefined>): void; - runRealtimeReport( - request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, - {}|null|undefined>): void; - runRealtimeReport( - request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('runRealtimeReport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('runRealtimeReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.runRealtimeReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, - protos.google.analytics.data.v1beta.IRunRealtimeReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('runRealtimeReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * This compatibility method lists dimensions and metrics that can be added to - * a report request and maintain compatibility. This method fails if the - * request's dimensions and metrics are incompatible. - * - * In Google Analytics, reports fail if they request incompatible dimensions - * and/or metrics; in that case, you will need to remove dimensions and/or - * metrics from the incompatible report until the report is compatible. - * - * The Realtime and Core reports have different compatibility rules. This - * method checks compatibility for Core reports. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.property - * A Google Analytics property identifier whose events are tracked. To - * learn more, see [where to find your Property - * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). - * `property` should be the same value as in your `runReport` request. - * - * Example: properties/1234 - * @param {number[]} request.dimensions - * The dimensions in this report. `dimensions` should be the same value as in - * your `runReport` request. - * @param {number[]} request.metrics - * The metrics in this report. `metrics` should be the same value as in your - * `runReport` request. - * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter - * The filter clause of dimensions. `dimensionFilter` should be the same value - * as in your `runReport` request. - * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter - * The filter clause of metrics. `metricFilter` should be the same value as in - * your `runReport` request - * @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter - * Filters the dimensions and metrics in the response to just this - * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` - * to only return compatible dimensions & metrics. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.CheckCompatibilityResponse|CheckCompatibilityResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async - */ - checkCompatibility( - request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined - ]>; - checkCompatibility( - request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkCompatibility( - request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, - callback: Callback< - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, - {}|null|undefined>): void; - checkCompatibility( - request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'property': request.property ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('checkCompatibility request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('checkCompatibility response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.checkCompatibility(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, - protos.google.analytics.data.v1beta.ICheckCompatibilityRequest|undefined, - {}|undefined - ]) => { - this._log.info('checkCompatibility response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Retrieves an audience export of users. After creating an audience, the - * users are not immediately available for exporting. First, a request to - * `CreateAudienceExport` is necessary to create an audience export of users, - * and then second, this method is used to retrieve the users in the audience - * export. - * - * See [Creating an Audience - * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Exports with examples. - * - * Audiences in Google Analytics 4 allow you to segment your users in the ways - * that are important to your business. To learn more, see - * https://support.google.com/analytics/answer/9267572. - * - * Audience Export APIs have some methods at alpha and other methods at beta - * stability. The intention is to advance methods to beta stability after some - * feedback and adoption. To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the audience export to retrieve users from. - * Format: `properties/{property}/audienceExports/{audience_export}` - * @param {number} [request.offset] - * Optional. The row count of the start row. The first row is counted as row - * 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} [request.limit] - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.QueryAudienceExportResponse|QueryAudienceExportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async - */ - queryAudienceExport( - request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined - ]>; - queryAudienceExport( - request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, - {}|null|undefined>): void; - queryAudienceExport( - request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, - {}|null|undefined>): void; - queryAudienceExport( - request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('queryAudienceExport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('queryAudienceExport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.queryAudienceExport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, - protos.google.analytics.data.v1beta.IQueryAudienceExportRequest|undefined, - {}|undefined - ]) => { - this._log.info('queryAudienceExport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets configuration metadata about a specific audience export. This method - * can be used to understand an audience export after it has been created. - * - * See [Creating an Audience - * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Exports with examples. - * - * Audience Export APIs have some methods at alpha and other methods at beta - * stability. The intention is to advance methods to beta stability after some - * feedback and adoption. To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The audience export resource name. - * Format: `properties/{property}/audienceExports/{audience_export}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async - */ - getAudienceExport( - request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined - ]>; - getAudienceExport( - request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, - {}|null|undefined>): void; - getAudienceExport( - request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, - callback: Callback< - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, - {}|null|undefined>): void; - getAudienceExport( - request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getAudienceExport request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getAudienceExport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getAudienceExport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1beta.IAudienceExport, - protos.google.analytics.data.v1beta.IGetAudienceExportRequest|undefined, - {}|undefined - ]) => { - this._log.info('getAudienceExport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Creates an audience export for later retrieval. This method quickly returns - * the audience export's resource name and initiates a long running - * asynchronous request to form an audience export. To export the users in an - * audience export, first create the audience export through this method and - * then send the audience resource name to the `QueryAudienceExport` method. - * - * See [Creating an Audience - * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Exports with examples. - * - * An audience export is a snapshot of the users currently in the audience at - * the time of audience export creation. Creating audience exports for one - * audience on different days will return different results as users enter and - * exit the audience. - * - * Audiences in Google Analytics 4 allow you to segment your users in the ways - * that are important to your business. To learn more, see - * https://support.google.com/analytics/answer/9267572. Audience exports - * contain the users in each audience. - * - * Audience Export APIs have some methods at alpha and other methods at beta - * stability. The intention is to advance methods to beta stability after some - * feedback and adoption. To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this audience export will be created. - * Format: `properties/{property}` - * @param {google.analytics.data.v1beta.AudienceExport} request.audienceExport - * Required. The audience export to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async - */ - createAudienceExport( - request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAudienceExport( - request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAudienceExport( - request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAudienceExport( - request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createAudienceExport response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createAudienceExport request %j', request); - return this.innerApiCalls.createAudienceExport(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createAudienceExport response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createAudienceExport()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async - */ - async checkCreateAudienceExportProgress(name: string): Promise>{ - this._log.info('createAudienceExport long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceExport, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all audience exports for a property. This method can be used for you - * to find and reuse existing audience exports rather than creating - * unnecessary new audience exports. The same audience can have multiple - * audience exports that represent the export of users that were in an - * audience on different days. - * - * See [Creating an Audience - * Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Exports with examples. - * - * Audience Export APIs have some methods at alpha and other methods at beta - * stability. The intention is to advance methods to beta stability after some - * feedback and adoption. To give your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience exports for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience exports to return. The service may - * return fewer than this value. If unspecified, at most 200 audience exports - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceExports` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceExports` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listAudienceExportsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAudienceExports( - request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1beta.IAudienceExport[], - protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse - ]>; - listAudienceExports( - request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, - protos.google.analytics.data.v1beta.IAudienceExport>): void; - listAudienceExports( - request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - callback: PaginationCallback< - protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, - protos.google.analytics.data.v1beta.IAudienceExport>): void; - listAudienceExports( - request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, - protos.google.analytics.data.v1beta.IAudienceExport>, - callback?: PaginationCallback< - protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, - protos.google.analytics.data.v1beta.IAudienceExport>): - Promise<[ - protos.google.analytics.data.v1beta.IAudienceExport[], - protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse|null|undefined, - protos.google.analytics.data.v1beta.IAudienceExport>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listAudienceExports values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listAudienceExports request %j', request); - return this.innerApiCalls - .listAudienceExports(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.analytics.data.v1beta.IAudienceExport[], - protos.google.analytics.data.v1beta.IListAudienceExportsRequest|null, - protos.google.analytics.data.v1beta.IListAudienceExportsResponse - ]) => { - this._log.info('listAudienceExports values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listAudienceExports`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience exports for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience exports to return. The service may - * return fewer than this value. If unspecified, at most 200 audience exports - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceExports` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceExports` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listAudienceExportsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAudienceExportsStream( - request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAudienceExports']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAudienceExports stream %j', request); - return this.descriptors.page.listAudienceExports.createStream( - this.innerApiCalls.listAudienceExports as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAudienceExports`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. All audience exports for this property will be listed in the - * response. Format: `properties/{property}` - * @param {number} [request.pageSize] - * Optional. The maximum number of audience exports to return. The service may - * return fewer than this value. If unspecified, at most 200 audience exports - * will be returned. The maximum value is 1000 (higher values will be coerced - * to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListAudienceExports` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudienceExports` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js - * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async - */ - listAudienceExportsAsync( - request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAudienceExports']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listAudienceExports iterate %j', request); - return this.descriptors.page.listAudienceExports.asyncIterate( - this.innerApiCalls['listAudienceExports'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified audienceExport resource name string. - * - * @param {string} property - * @param {string} audience_export - * @returns {string} Resource name string. - */ - audienceExportPath(property:string,audienceExport:string) { - return this.pathTemplates.audienceExportPathTemplate.render({ - property: property, - audience_export: audienceExport, - }); - } - - /** - * Parse the property from AudienceExport resource. - * - * @param {string} audienceExportName - * A fully-qualified path representing AudienceExport resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromAudienceExportName(audienceExportName: string) { - return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property; - } - - /** - * Parse the audience_export from AudienceExport resource. - * - * @param {string} audienceExportName - * A fully-qualified path representing AudienceExport resource. - * @returns {string} A string representing the audience_export. - */ - matchAudienceExportFromAudienceExportName(audienceExportName: string) { - return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export; - } - - /** - * Return a fully-qualified metadata resource name string. - * - * @param {string} property - * @returns {string} Resource name string. - */ - metadataPath(property:string) { - return this.pathTemplates.metadataPathTemplate.render({ - property: property, - }); - } - - /** - * Parse the property from Metadata resource. - * - * @param {string} metadataName - * A fully-qualified path representing Metadata resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromMetadataName(metadataName: string) { - return this.pathTemplates.metadataPathTemplate.match(metadataName).property; - } - - /** - * Return a fully-qualified property resource name string. - * - * @param {string} property - * @returns {string} Resource name string. - */ - propertyPath(property:string) { - return this.pathTemplates.propertyPathTemplate.render({ - property: property, - }); - } - - /** - * Parse the property from Property resource. - * - * @param {string} propertyName - * A fully-qualified path representing Property resource. - * @returns {string} A string representing the property. - */ - matchPropertyFromPropertyName(propertyName: string) { - return this.pathTemplates.propertyPathTemplate.match(propertyName).property; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.betaAnalyticsDataStub && !this._terminated) { - return this.betaAnalyticsDataStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json deleted file mode 100644 index 271a9f86be46..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_client_config.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "interfaces": { - "google.analytics.data.v1beta.BetaAnalyticsData": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unknown": [ - "UNKNOWN" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "RunReport": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RunPivotReport": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "BatchRunReports": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "BatchRunPivotReports": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetMetadata": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RunRealtimeReport": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CheckCompatibility": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateAudienceExport": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "QueryAudienceExport": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetAudienceExport": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListAudienceExports": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - } - } - } - } -} diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json b/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json deleted file mode 100644 index 89471a4231ae..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1beta/beta_analytics_data_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/analytics/data/v1beta/analytics_data_api.proto", - "../../protos/google/analytics/data/v1beta/data.proto" -] diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json b/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json deleted file mode 100644 index e4f8c132470a..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1beta/gapic_metadata.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.analytics.data.v1beta", - "libraryPackage": "@google-analytics/data", - "services": { - "BetaAnalyticsData": { - "clients": { - "grpc": { - "libraryClient": "BetaAnalyticsDataClient", - "rpcs": { - "RunReport": { - "methods": [ - "runReport" - ] - }, - "RunPivotReport": { - "methods": [ - "runPivotReport" - ] - }, - "BatchRunReports": { - "methods": [ - "batchRunReports" - ] - }, - "BatchRunPivotReports": { - "methods": [ - "batchRunPivotReports" - ] - }, - "GetMetadata": { - "methods": [ - "getMetadata" - ] - }, - "RunRealtimeReport": { - "methods": [ - "runRealtimeReport" - ] - }, - "CheckCompatibility": { - "methods": [ - "checkCompatibility" - ] - }, - "QueryAudienceExport": { - "methods": [ - "queryAudienceExport" - ] - }, - "GetAudienceExport": { - "methods": [ - "getAudienceExport" - ] - }, - "CreateAudienceExport": { - "methods": [ - "createAudienceExport" - ] - }, - "ListAudienceExports": { - "methods": [ - "listAudienceExports", - "listAudienceExportsStream", - "listAudienceExportsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "BetaAnalyticsDataClient", - "rpcs": { - "RunReport": { - "methods": [ - "runReport" - ] - }, - "RunPivotReport": { - "methods": [ - "runPivotReport" - ] - }, - "BatchRunReports": { - "methods": [ - "batchRunReports" - ] - }, - "BatchRunPivotReports": { - "methods": [ - "batchRunPivotReports" - ] - }, - "GetMetadata": { - "methods": [ - "getMetadata" - ] - }, - "RunRealtimeReport": { - "methods": [ - "runRealtimeReport" - ] - }, - "CheckCompatibility": { - "methods": [ - "checkCompatibility" - ] - }, - "QueryAudienceExport": { - "methods": [ - "queryAudienceExport" - ] - }, - "GetAudienceExport": { - "methods": [ - "getAudienceExport" - ] - }, - "CreateAudienceExport": { - "methods": [ - "createAudienceExport" - ] - }, - "ListAudienceExports": { - "methods": [ - "listAudienceExports", - "listAudienceExportsStream", - "listAudienceExportsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-analytics-data/src/v1beta/index.ts b/owl-bot-staging/google-analytics-data/src/v1beta/index.ts deleted file mode 100644 index baac0092ffc3..000000000000 --- a/owl-bot-staging/google-analytics-data/src/v1beta/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {BetaAnalyticsDataClient} from './beta_analytics_data_client'; diff --git a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5fb77a3aef4e..000000000000 --- a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const data = require('@google-analytics/data'); - -function main() { - const betaAnalyticsDataClient = new data.BetaAnalyticsDataClient(); -} - -main(); diff --git a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 079657c400b5..000000000000 --- a/owl-bot-staging/google-analytics-data/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {BetaAnalyticsDataClient} from '@google-analytics/data'; - -// check that the client class type name can be used -function doStuffWithBetaAnalyticsDataClient(client: BetaAnalyticsDataClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const betaAnalyticsDataClient = new BetaAnalyticsDataClient(); - doStuffWithBetaAnalyticsDataClient(betaAnalyticsDataClient); -} - -main(); diff --git a/owl-bot-staging/google-analytics-data/system-test/install.ts b/owl-bot-staging/google-analytics-data/system-test/install.ts deleted file mode 100644 index f66069aa3940..000000000000 --- a/owl-bot-staging/google-analytics-data/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts b/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts deleted file mode 100644 index 13e7fac4efb8..000000000000 --- a/owl-bot-staging/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts +++ /dev/null @@ -1,2862 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as alphaanalyticsdataModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1alpha.AlphaAnalyticsDataClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.servicePath; - assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.alphaAnalyticsDataStub, undefined); - await client.initialize(); - assert(client.alphaAnalyticsDataStub); - }); - - it('has close method for the initialized client', done => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.alphaAnalyticsDataStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.alphaAnalyticsDataStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('runFunnelReport', () => { - it('invokes runFunnelReport without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() - ); - client.innerApiCalls.runFunnelReport = stubSimpleCall(expectedResponse); - const [response] = await client.runFunnelReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runFunnelReport without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportResponse() - ); - client.innerApiCalls.runFunnelReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runFunnelReport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunFunnelReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runFunnelReport with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.runFunnelReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runFunnelReport(request), expectedError); - const actualRequest = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runFunnelReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runFunnelReport with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunFunnelReportRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.runFunnelReport(request), expectedError); - }); - }); - - describe('queryAudienceList', () => { - it('invokes queryAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() - ); - client.innerApiCalls.queryAudienceList = stubSimpleCall(expectedResponse); - const [response] = await client.queryAudienceList(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListResponse() - ); - client.innerApiCalls.queryAudienceList = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.queryAudienceList( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryAudienceListResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceList with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.queryAudienceList = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.queryAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceList with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.queryAudienceList(request), expectedError); - }); - }); - - describe('getAudienceList', () => { - it('invokes getAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.AudienceList() - ); - client.innerApiCalls.getAudienceList = stubSimpleCall(expectedResponse); - const [response] = await client.getAudienceList(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.AudienceList() - ); - client.innerApiCalls.getAudienceList = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAudienceList( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceList with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAudienceList = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceList with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getAudienceList(request), expectedError); - }); - }); - - describe('createRecurringAudienceList', () => { - it('invokes createRecurringAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RecurringAudienceList() - ); - client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(expectedResponse); - const [response] = await client.createRecurringAudienceList(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRecurringAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RecurringAudienceList() - ); - client.innerApiCalls.createRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRecurringAudienceList( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRecurringAudienceList with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRecurringAudienceList = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createRecurringAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRecurringAudienceList with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createRecurringAudienceList(request), expectedError); - }); - }); - - describe('getRecurringAudienceList', () => { - it('invokes getRecurringAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RecurringAudienceList() - ); - client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(expectedResponse); - const [response] = await client.getRecurringAudienceList(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRecurringAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RecurringAudienceList() - ); - client.innerApiCalls.getRecurringAudienceList = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRecurringAudienceList( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRecurringAudienceList with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRecurringAudienceList = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRecurringAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRecurringAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRecurringAudienceList with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetRecurringAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getRecurringAudienceList(request), expectedError); - }); - }); - - describe('getPropertyQuotasSnapshot', () => { - it('invokes getPropertyQuotasSnapshot without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() - ); - client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(expectedResponse); - const [response] = await client.getPropertyQuotasSnapshot(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPropertyQuotasSnapshot without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot() - ); - client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPropertyQuotasSnapshot( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPropertyQuotasSnapshot with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPropertyQuotasSnapshot = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPropertyQuotasSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPropertyQuotasSnapshot with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getPropertyQuotasSnapshot(request), expectedError); - }); - }); - - describe('queryReportTask', () => { - it('invokes queryReportTask without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() - ); - client.innerApiCalls.queryReportTask = stubSimpleCall(expectedResponse); - const [response] = await client.queryReportTask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryReportTask without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskResponse() - ); - client.innerApiCalls.queryReportTask = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.queryReportTask( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IQueryReportTaskResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryReportTask with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.queryReportTask = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.queryReportTask(request), expectedError); - const actualRequest = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryReportTask with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.QueryReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.queryReportTask(request), expectedError); - }); - }); - - describe('getReportTask', () => { - it('invokes getReportTask without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ReportTask() - ); - client.innerApiCalls.getReportTask = stubSimpleCall(expectedResponse); - const [response] = await client.getReportTask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReportTask without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ReportTask() - ); - client.innerApiCalls.getReportTask = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getReportTask( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReportTask with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getReportTask = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getReportTask(request), expectedError); - const actualRequest = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReportTask with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetReportTaskRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getReportTask(request), expectedError); - }); - }); - - describe('runReport', () => { - it('invokes runReport without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportResponse() - ); - client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); - const [response] = await client.runReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportResponse() - ); - client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runReport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runReport(request), expectedError); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.runReport(request), expectedError); - }); - }); - - describe('getMetadata', () => { - it('invokes getMetadata without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.Metadata() - ); - client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); - const [response] = await client.getMetadata(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.Metadata() - ); - client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMetadata( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IMetadata|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getMetadata(request), expectedError); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getMetadata(request), expectedError); - }); - }); - - describe('createAudienceList', () => { - it('invokes createAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAudienceList = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAudienceList(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAudienceList = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAudienceList( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceList with call error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceList with LRO error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateAudienceListRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAudienceList = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAudienceList(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAudienceListProgress without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateAudienceListProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAudienceListProgress with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateAudienceListProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createReportTask', () => { - it('invokes createReportTask without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReportTask = stubLongRunningCall(expectedResponse); - const [operation] = await client.createReportTask(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReportTask without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReportTask = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createReportTask( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReportTask with call error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createReportTask(request), expectedError); - const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReportTask with LRO error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.CreateReportTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createReportTask = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createReportTask(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReportTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateReportTaskProgress without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateReportTaskProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateReportTaskProgress with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateReportTaskProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listAudienceLists', () => { - it('invokes listAudienceLists without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - ]; - client.innerApiCalls.listAudienceLists = stubSimpleCall(expectedResponse); - const [response] = await client.listAudienceLists(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceLists without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - ]; - client.innerApiCalls.listAudienceLists = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAudienceLists( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IAudienceList[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceLists with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAudienceLists = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAudienceLists(request), expectedError); - const actualRequest = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceListsStream without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - ]; - client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAudienceListsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); - assert( - (client.descriptors.page.listAudienceLists.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAudienceListsStream with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAudienceListsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.AudienceList[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.AudienceList) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAudienceLists.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAudienceLists, request)); - assert( - (client.descriptors.page.listAudienceLists.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAudienceLists without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.AudienceList()), - ]; - client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; - const iterable = client.listAudienceListsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAudienceLists with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAudienceListsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.analytics.data.v1alpha.IAudienceList[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRecurringAudienceLists', () => { - it('invokes listRecurringAudienceLists without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - ]; - client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(expectedResponse); - const [response] = await client.listRecurringAudienceLists(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRecurringAudienceLists without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - ]; - client.innerApiCalls.listRecurringAudienceLists = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRecurringAudienceLists( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRecurringAudienceList[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRecurringAudienceLists with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRecurringAudienceLists = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRecurringAudienceLists(request), expectedError); - const actualRequest = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRecurringAudienceLists as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRecurringAudienceListsStream without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - ]; - client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRecurringAudienceListsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); - assert( - (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRecurringAudienceListsStream with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRecurringAudienceLists.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRecurringAudienceListsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.RecurringAudienceList[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.RecurringAudienceList) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRecurringAudienceLists, request)); - assert( - (client.descriptors.page.listRecurringAudienceLists.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRecurringAudienceLists without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.RecurringAudienceList()), - ]; - client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; - const iterable = client.listRecurringAudienceListsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRecurringAudienceLists with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRecurringAudienceLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRecurringAudienceListsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.analytics.data.v1alpha.IRecurringAudienceList[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRecurringAudienceLists.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listReportTasks', () => { - it('invokes listReportTasks without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - ]; - client.innerApiCalls.listReportTasks = stubSimpleCall(expectedResponse); - const [response] = await client.listReportTasks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReportTasks without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - ]; - client.innerApiCalls.listReportTasks = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listReportTasks( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IReportTask[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReportTasks with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listReportTasks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listReportTasks(request), expectedError); - const actualRequest = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReportTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReportTasksStream without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - ]; - client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listReportTasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listReportTasks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); - assert( - (client.descriptors.page.listReportTasks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listReportTasksStream with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listReportTasks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listReportTasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1alpha.ReportTask[] = []; - stream.on('data', (response: protos.google.analytics.data.v1alpha.ReportTask) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listReportTasks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReportTasks, request)); - assert( - (client.descriptors.page.listReportTasks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReportTasks without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - generateSampleMessage(new protos.google.analytics.data.v1alpha.ReportTask()), - ]; - client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; - const iterable = client.listReportTasksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReportTasks with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.ListReportTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.ListReportTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listReportTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listReportTasksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.analytics.data.v1alpha.IReportTask[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReportTasks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('audienceList', async () => { - const fakePath = "/rendered/path/audienceList"; - const expectedParameters = { - property: "propertyValue", - audience_list: "audienceListValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.audienceListPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.audienceListPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('audienceListPath', () => { - const result = client.audienceListPath("propertyValue", "audienceListValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.audienceListPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromAudienceListName', () => { - const result = client.matchPropertyFromAudienceListName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAudienceListFromAudienceListName', () => { - const result = client.matchAudienceListFromAudienceListName(fakePath); - assert.strictEqual(result, "audienceListValue"); - assert((client.pathTemplates.audienceListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('metadata', async () => { - const fakePath = "/rendered/path/metadata"; - const expectedParameters = { - property: "propertyValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.metadataPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataPath', () => { - const result = client.metadataPath("propertyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromMetadataName', () => { - const result = client.matchPropertyFromMetadataName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('property', async () => { - const fakePath = "/rendered/path/property"; - const expectedParameters = { - property: "propertyValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.propertyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.propertyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('propertyPath', () => { - const result = client.propertyPath("propertyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromPropertyName', () => { - const result = client.matchPropertyFromPropertyName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('propertyQuotasSnapshot', async () => { - const fakePath = "/rendered/path/propertyQuotasSnapshot"; - const expectedParameters = { - property: "propertyValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.propertyQuotasSnapshotPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.propertyQuotasSnapshotPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('propertyQuotasSnapshotPath', () => { - const result = client.propertyQuotasSnapshotPath("propertyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromPropertyQuotasSnapshotName', () => { - const result = client.matchPropertyFromPropertyQuotasSnapshotName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.propertyQuotasSnapshotPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('recurringAudienceList', async () => { - const fakePath = "/rendered/path/recurringAudienceList"; - const expectedParameters = { - property: "propertyValue", - recurring_audience_list: "recurringAudienceListValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.recurringAudienceListPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.recurringAudienceListPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('recurringAudienceListPath', () => { - const result = client.recurringAudienceListPath("propertyValue", "recurringAudienceListValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.recurringAudienceListPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromRecurringAudienceListName', () => { - const result = client.matchPropertyFromRecurringAudienceListName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRecurringAudienceListFromRecurringAudienceListName', () => { - const result = client.matchRecurringAudienceListFromRecurringAudienceListName(fakePath); - assert.strictEqual(result, "recurringAudienceListValue"); - assert((client.pathTemplates.recurringAudienceListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('reportTask', async () => { - const fakePath = "/rendered/path/reportTask"; - const expectedParameters = { - property: "propertyValue", - report_task: "reportTaskValue", - }; - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.reportTaskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.reportTaskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('reportTaskPath', () => { - const result = client.reportTaskPath("propertyValue", "reportTaskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.reportTaskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromReportTaskName', () => { - const result = client.matchPropertyFromReportTaskName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReportTaskFromReportTaskName', () => { - const result = client.matchReportTaskFromReportTaskName(fakePath); - assert.strictEqual(result, "reportTaskValue"); - assert((client.pathTemplates.reportTaskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts b/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts deleted file mode 100644 index 3c15d128123a..000000000000 --- a/owl-bot-staging/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts +++ /dev/null @@ -1,2004 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as betaanalyticsdataModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1beta.BetaAnalyticsDataClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.servicePath; - assert.strictEqual(servicePath, 'analyticsdata.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'analyticsdata.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'analyticsdata.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.betaAnalyticsDataStub, undefined); - await client.initialize(); - assert(client.betaAnalyticsDataStub); - }); - - it('has close method for the initialized client', done => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.betaAnalyticsDataStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.betaAnalyticsDataStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('runReport', () => { - it('invokes runReport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportResponse() - ); - client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); - const [response] = await client.runReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportResponse() - ); - client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runReport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runReport(request), expectedError); - const actualRequest = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runReport with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunReportRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.runReport(request), expectedError); - }); - }); - - describe('runPivotReport', () => { - it('invokes runPivotReport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportResponse() - ); - client.innerApiCalls.runPivotReport = stubSimpleCall(expectedResponse); - const [response] = await client.runPivotReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runPivotReport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportResponse() - ); - client.innerApiCalls.runPivotReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runPivotReport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunPivotReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runPivotReport with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.runPivotReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runPivotReport(request), expectedError); - const actualRequest = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runPivotReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runPivotReport with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunPivotReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunPivotReportRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.runPivotReport(request), expectedError); - }); - }); - - describe('batchRunReports', () => { - it('invokes batchRunReports without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsResponse() - ); - client.innerApiCalls.batchRunReports = stubSimpleCall(expectedResponse); - const [response] = await client.batchRunReports(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunReports without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsResponse() - ); - client.innerApiCalls.batchRunReports = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.batchRunReports( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunReportsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunReports with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.batchRunReports = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.batchRunReports(request), expectedError); - const actualRequest = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunReports with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunReportsRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.batchRunReports(request), expectedError); - }); - }); - - describe('batchRunPivotReports', () => { - it('invokes batchRunPivotReports without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() - ); - client.innerApiCalls.batchRunPivotReports = stubSimpleCall(expectedResponse); - const [response] = await client.batchRunPivotReports(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunPivotReports without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse() - ); - client.innerApiCalls.batchRunPivotReports = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.batchRunPivotReports( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunPivotReports with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.batchRunPivotReports = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.batchRunPivotReports(request), expectedError); - const actualRequest = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.batchRunPivotReports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes batchRunPivotReports with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.BatchRunPivotReportsRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.batchRunPivotReports(request), expectedError); - }); - }); - - describe('getMetadata', () => { - it('invokes getMetadata without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.Metadata() - ); - client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); - const [response] = await client.getMetadata(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.Metadata() - ); - client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMetadata( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IMetadata|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getMetadata(request), expectedError); - const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadata with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetMetadataRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetMetadataRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getMetadata(request), expectedError); - }); - }); - - describe('runRealtimeReport', () => { - it('invokes runRealtimeReport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() - ); - client.innerApiCalls.runRealtimeReport = stubSimpleCall(expectedResponse); - const [response] = await client.runRealtimeReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runRealtimeReport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportResponse() - ); - client.innerApiCalls.runRealtimeReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runRealtimeReport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IRunRealtimeReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runRealtimeReport with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.runRealtimeReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runRealtimeReport(request), expectedError); - const actualRequest = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runRealtimeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runRealtimeReport with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.RunRealtimeReportRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.runRealtimeReport(request), expectedError); - }); - }); - - describe('checkCompatibility', () => { - it('invokes checkCompatibility without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() - ); - client.innerApiCalls.checkCompatibility = stubSimpleCall(expectedResponse); - const [response] = await client.checkCompatibility(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCompatibility without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityResponse() - ); - client.innerApiCalls.checkCompatibility = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.checkCompatibility( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.ICheckCompatibilityResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCompatibility with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); - request.property = defaultValue1; - const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkCompatibility = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCompatibility(request), expectedError); - const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCompatibility with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CheckCompatibilityRequest', ['property']); - request.property = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.checkCompatibility(request), expectedError); - }); - }); - - describe('queryAudienceExport', () => { - it('invokes queryAudienceExport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() - ); - client.innerApiCalls.queryAudienceExport = stubSimpleCall(expectedResponse); - const [response] = await client.queryAudienceExport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceExport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportResponse() - ); - client.innerApiCalls.queryAudienceExport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.queryAudienceExport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IQueryAudienceExportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceExport with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.queryAudienceExport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.queryAudienceExport(request), expectedError); - const actualRequest = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.queryAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes queryAudienceExport with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.QueryAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.queryAudienceExport(request), expectedError); - }); - }); - - describe('getAudienceExport', () => { - it('invokes getAudienceExport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.AudienceExport() - ); - client.innerApiCalls.getAudienceExport = stubSimpleCall(expectedResponse); - const [response] = await client.getAudienceExport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceExport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1beta.AudienceExport() - ); - client.innerApiCalls.getAudienceExport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAudienceExport( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceExport with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAudienceExport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAudienceExport(request), expectedError); - const actualRequest = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAudienceExport with closed client', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.GetAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.GetAudienceExportRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getAudienceExport(request), expectedError); - }); - }); - - describe('createAudienceExport', () => { - it('invokes createAudienceExport without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAudienceExport = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAudienceExport(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceExport without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAudienceExport = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAudienceExport( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceExport with call error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAudienceExport(request), expectedError); - const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAudienceExport with LRO error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.CreateAudienceExportRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAudienceExport = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAudienceExport(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAudienceExport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAudienceExportProgress without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateAudienceExportProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAudienceExportProgress with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateAudienceExportProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listAudienceExports', () => { - it('invokes listAudienceExports without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - ]; - client.innerApiCalls.listAudienceExports = stubSimpleCall(expectedResponse); - const [response] = await client.listAudienceExports(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceExports without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - ]; - client.innerApiCalls.listAudienceExports = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAudienceExports( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1beta.IAudienceExport[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceExports with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAudienceExports = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAudienceExports(request), expectedError); - const actualRequest = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAudienceExports as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAudienceExportsStream without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - ]; - client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAudienceExportsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; - stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); - assert( - (client.descriptors.page.listAudienceExports.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAudienceExportsStream with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAudienceExports.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAudienceExportsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.data.v1beta.AudienceExport[] = []; - stream.on('data', (response: protos.google.analytics.data.v1beta.AudienceExport) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAudienceExports.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAudienceExports, request)); - assert( - (client.descriptors.page.listAudienceExports.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAudienceExports without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - generateSampleMessage(new protos.google.analytics.data.v1beta.AudienceExport()), - ]; - client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; - const iterable = client.listAudienceExportsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAudienceExports with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1beta.ListAudienceExportsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listAudienceExports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAudienceExportsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.analytics.data.v1beta.IAudienceExport[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAudienceExports.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('audienceExport', async () => { - const fakePath = "/rendered/path/audienceExport"; - const expectedParameters = { - property: "propertyValue", - audience_export: "audienceExportValue", - }; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.audienceExportPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.audienceExportPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('audienceExportPath', () => { - const result = client.audienceExportPath("propertyValue", "audienceExportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.audienceExportPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromAudienceExportName', () => { - const result = client.matchPropertyFromAudienceExportName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAudienceExportFromAudienceExportName', () => { - const result = client.matchAudienceExportFromAudienceExportName(fakePath); - assert.strictEqual(result, "audienceExportValue"); - assert((client.pathTemplates.audienceExportPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('metadata', async () => { - const fakePath = "/rendered/path/metadata"; - const expectedParameters = { - property: "propertyValue", - }; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.metadataPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataPath', () => { - const result = client.metadataPath("propertyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromMetadataName', () => { - const result = client.matchPropertyFromMetadataName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('property', async () => { - const fakePath = "/rendered/path/property"; - const expectedParameters = { - property: "propertyValue", - }; - const client = new betaanalyticsdataModule.v1beta.BetaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.propertyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.propertyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('propertyPath', () => { - const result = client.propertyPath("propertyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.propertyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPropertyFromPropertyName', () => { - const result = client.matchPropertyFromPropertyName(fakePath); - assert.strictEqual(result, "propertyValue"); - assert((client.pathTemplates.propertyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-analytics-data/tsconfig.json b/owl-bot-staging/google-analytics-data/tsconfig.json deleted file mode 100644 index ca73e7bfc824..000000000000 --- a/owl-bot-staging/google-analytics-data/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-analytics-data/webpack.config.js b/owl-bot-staging/google-analytics-data/webpack.config.js deleted file mode 100644 index f5f52a892738..000000000000 --- a/owl-bot-staging/google-analytics-data/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'AlphaAnalyticsData', - filename: './alpha-analytics-data.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-analytics-data/.eslintrc.json b/packages/google-analytics-data/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/packages/google-analytics-data/.eslintrc.json +++ b/packages/google-analytics-data/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/owl-bot-staging/google-analytics-data/.gitattributes b/packages/google-analytics-data/.gitattributes similarity index 100% rename from owl-bot-staging/google-analytics-data/.gitattributes rename to packages/google-analytics-data/.gitattributes diff --git a/owl-bot-staging/google-analytics-data/.prettierignore b/packages/google-analytics-data/.prettierignore similarity index 100% rename from owl-bot-staging/google-analytics-data/.prettierignore rename to packages/google-analytics-data/.prettierignore diff --git a/owl-bot-staging/google-analytics-data/.prettierrc.js b/packages/google-analytics-data/.prettierrc.js similarity index 100% rename from owl-bot-staging/google-analytics-data/.prettierrc.js rename to packages/google-analytics-data/.prettierrc.js diff --git a/owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md b/packages/google-analytics-data/CODE_OF_CONDUCT.md similarity index 100% rename from owl-bot-staging/google-analytics-data/CODE_OF_CONDUCT.md rename to packages/google-analytics-data/CODE_OF_CONDUCT.md diff --git a/owl-bot-staging/google-analytics-data/CONTRIBUTING.md b/packages/google-analytics-data/CONTRIBUTING.md similarity index 100% rename from owl-bot-staging/google-analytics-data/CONTRIBUTING.md rename to packages/google-analytics-data/CONTRIBUTING.md diff --git a/owl-bot-staging/google-analytics-data/LICENSE b/packages/google-analytics-data/LICENSE similarity index 100% rename from owl-bot-staging/google-analytics-data/LICENSE rename to packages/google-analytics-data/LICENSE diff --git a/packages/google-analytics-data/README.md b/packages/google-analytics-data/README.md index d57054d3e22a..281ad5361204 100644 --- a/packages/google-analytics-data/README.md +++ b/packages/google-analytics-data/README.md @@ -61,6 +61,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | create recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) | | create report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) | | get audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) | +| get metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js) | | get property quotas snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js) | | get recurring audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) | | get report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) | @@ -70,7 +71,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | query audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js) | | query report task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js) | | run funnel report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js) | -| sheet export audience list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js) | +| run report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js) | | analytics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json) | | batch run pivot reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js) | | batch run reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js) | diff --git a/packages/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto b/packages/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto index 47c4f3b278cd..c936b2d0ee6a 100644 --- a/packages/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto +++ b/packages/google-analytics-data/protos/google/analytics/data/v1alpha/analytics_data_api.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,10 +38,7 @@ service AlphaAnalyticsData { option (google.api.default_host) = "analyticsdata.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/analytics," - "https://www.googleapis.com/auth/analytics.readonly," - "https://www.googleapis.com/auth/drive," - "https://www.googleapis.com/auth/drive.file," - "https://www.googleapis.com/auth/spreadsheets"; + "https://www.googleapis.com/auth/analytics.readonly"; // Returns a customized funnel report of your Google Analytics event data. The // data returned from the API is as a table with columns for the requested @@ -131,34 +128,6 @@ service AlphaAnalyticsData { option (google.api.method_signature) = "name"; } - // Exports an audience list of users to a Google Sheet. After creating an - // audience, the users are not immediately available for listing. First, a - // request to `CreateAudienceList` is necessary to create an audience list of - // users, and then second, this method is used to export those users in the - // audience list to a Google Sheet. - // - // See [Creating an Audience - // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - // for an introduction to Audience Lists with examples. - // - // Audiences in Google Analytics 4 allow you to segment your users in the ways - // that are important to your business. To learn more, see - // https://support.google.com/analytics/answer/9267572. - // - // This method is introduced at alpha stability with the intention of - // gathering feedback on syntax and capabilities before entering beta. To give - // your feedback on this API, complete the - // [Google Analytics Audience Export API - // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - rpc SheetExportAudienceList(SheetExportAudienceListRequest) - returns (SheetExportAudienceListResponse) { - option (google.api.http) = { - post: "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - // Gets configuration metadata about a specific audience list. This method // can be used to understand an audience list after it has been created. // @@ -331,6 +300,37 @@ service AlphaAnalyticsData { }; option (google.api.method_signature) = "parent"; } + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics property identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } } // A request to create a new recurring audience list. @@ -789,69 +789,6 @@ message QueryAudienceListResponse { optional int32 row_count = 3; } -// A request to export users in an audience list to a Google Sheet. -message SheetExportAudienceListRequest { - // Required. The name of the audience list to retrieve users from. - // Format: `properties/{property}/audienceLists/{audience_list}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/AudienceList" - } - ]; - - // Optional. The row count of the start row. The first row is counted as row - // 0. - // - // When paging, the first request does not specify offset; or equivalently, - // sets offset to 0; the first request returns the first `limit` of rows. The - // second request sets offset to the `limit` of the first request; the second - // request returns the second `limit` of rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 offset = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to return. If unspecified, 10,000 rows are - // returned. The API returns a maximum of 250,000 rows per request, no matter - // how many you ask for. `limit` must be positive. - // - // The API can also return fewer rows than the requested `limit`, if there - // aren't as many dimension values as the `limit`. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - int64 limit = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The created Google Sheet with the list of users in an audience list. -message SheetExportAudienceListResponse { - // A uri for you to visit in your browser to view the Google Sheet. - optional string spreadsheet_uri = 1; - - // An ID that identifies the created Google Sheet resource. - optional string spreadsheet_id = 2; - - // The total number of rows in the AudienceList result. `rowCount` is - // independent of the number of rows returned in the response, the `limit` - // request parameter, and the `offset` request parameter. For example if a - // query returns 175 rows and includes `limit` of 50 in the API request, the - // response will contain `rowCount` of 175 but only 50 rows. - // - // To learn more about this pagination parameter, see - // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - optional int32 row_count = 3; - - // Configuration data about AudienceList being exported. Returned to help - // interpret the AudienceList in the Google Sheet of this response. - // - // For example, the AudienceList may have more rows than are present in the - // Google Sheet, and in that case, you may want to send an additional sheet - // export request with a different `offset` value to retrieve the next page of - // rows in an additional Google Sheet. - optional AudienceList audience_list = 4; -} - // Dimension value attributes for the audience user row. message AudienceRow { // Each dimension value attribute for an audience user. One dimension value @@ -1302,3 +1239,206 @@ message ListReportTasksResponse { // If this field is omitted, there are no subsequent pages. optional string next_page_token = 2; } + +// The request to generate a report. +message RunReportRequest { + // Required. A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The dimensions requested and displayed. + repeated Dimension dimensions = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metrics requested and displayed. + repeated Metric metrics = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Date ranges of data to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the event data for the overlapping days is + // included in the response rows for both date ranges. In a cohort request, + // this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Dimension filters let you ask for only specific dimension values + // in the report. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter clause of metrics. Applied after aggregating the + // report's rows, similar to SQL having-clause. Dimensions cannot be used in + // this filter. + FilterExpression metric_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The row count of the start row. The first row is counted as row + // 0. + // + // When paging, the first request does not specify offset; or equivalently, + // sets offset to 0; the first request returns the first `limit` of rows. The + // second request sets offset to the `limit` of the first request; the second + // request returns the second `limit` of rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of rows to return. If unspecified, 10,000 rows + // are returned. The API returns a maximum of 250,000 rows per request, no + // matter how many you ask for. `limit` must be positive. + // + // The API can also return fewer rows than the requested `limit`, if there + // aren't as many dimension values as the `limit`. For instance, there are + // fewer than 300 possible values for the dimension `country`, so when + // reporting on only `country`, you can't get more than 300 rows, even if you + // set `limit` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregation of metrics. Aggregated metric values will be shown in + // rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + // Aggregates including both comparisons and multiple date ranges will + // be aggregated based on the date ranges. + repeated MetricAggregation metric_aggregations = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how rows are ordered in the response. + // Requests including both comparisons and multiple date ranges will + // have order bys applied on the comparisons. + repeated OrderBy order_bys = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cohort group associated with this request. If there is a cohort + // group in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If false or unspecified, each row with all metrics equal to 0 + // will not be returned. If true, these rows will be returned if they are not + // separately removed by a filter. + // + // Regardless of this `keep_empty_rows` setting, only data recorded by the + // Google Analytics property can be displayed in a report. + // + // For example if a property never logs a `purchase` event, then a query for + // the `eventName` dimension and `eventCount` metric will not have a row + // eventName: "purchase" and eventCount: 0. + bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Toggles whether to return the current state of this Google + // Analytics property's quota. Quota is returned in + // [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration of comparisons requested and displayed. The + // request only requires a comparisons field in order to receive a comparison + // column in the response. + repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls conversion reporting. This field is optional. If this + // field is set or any conversion metrics are requested, the report will be a + // conversion report. + ConversionSpec conversion_spec = 16 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result, regardless of the number of + // rows returned in the response. For example if a query returns 175 rows and + // includes limit = 50 in the API request, the response will contain row_count + // = 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 7; + + // Metadata for the report. + ResponseMetaData metadata = 8; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 9; + + // Identifies what kind of resource this message is. This `kind` is always the + // fixed string "analyticsData#runReport". Useful to distinguish between + // response types in JSON. + string kind = 10; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + optional string next_page_token = 11; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The dimensions, metrics and comparisons currently accepted in reporting +// methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; + + // The comparison descriptions. + repeated ComparisonMetadata comparisons = 4; + + // The conversion descriptions. + repeated ConversionMetadata conversions = 5; +} diff --git a/packages/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto b/packages/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto index 0315a16711bc..629c34ca7f1a 100644 --- a/packages/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto +++ b/packages/google-analytics-data/protos/google/analytics/data/v1alpha/data.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -156,6 +156,24 @@ message Metric { bool invisible = 3; } +// Defines an individual comparison. Most requests will include multiple +// comparisons so that the report compares between the comparisons. +message Comparison { + // Each comparison produces separate rows in the response. In the response, + // this comparison is identified by this name. If name is unspecified, we will + // use the saved comparisons display name. + optional string name = 1; + + oneof one_comparison { + // A basic comparison. + FilterExpression dimension_filter = 2; + + // A saved comparison identified by the comparison's resource name. + // For example, 'comparisons/1234'. + string comparison = 3; + } +} + // To express dimension or metric filters. The fields in the same // FilterExpression need to be either all dimensions or all metrics. message FilterExpression { @@ -487,6 +505,25 @@ message CohortReportSettings { bool accumulate = 1; } +// Identifies if the report data is from the standard report data or +// conversion data +enum Section { + // Should never be specified. + SECTION_UNSPECIFIED = 0; + + // The report data is from the standard report data. Google Analytics reports + // include acquisition, engagement, and user behavior reports. Reports use + // dimensions like session source & landing page; reports use metrics like + // sessions, views, and engagement time. + SECTION_REPORT = 1; + + // The report data is from the conversion data. The Google Analytics + // Advertising section reports on conversion performance. Advertising reports + // use dimensions like source & medium; advertising reports use metrics like + // all conversions and ads cost. + SECTION_ADVERTISING = 2; +} + // Response's metadata carrying additional information about the report content. message ResponseMetaData { // The schema restrictions actively enforced in creating this report. To learn @@ -561,15 +598,18 @@ message ResponseMetaData { // Interests](https://support.google.com/analytics/answer/2799357). optional bool subject_to_thresholding = 8; - // If this report's results are + // If this report results is // [sampled](https://support.google.com/analytics/answer/13331292), this // describes the percentage of events used in this report. One // `samplingMetadatas` is populated for each date range. Each - // `samplingMetadatas` corresponds to a date range in the order that date - // ranges were specified in the request. + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. // // However if the results are not sampled, this field will not be defined. repeated SamplingMetadata sampling_metadatas = 9; + + // Identifies the type of data in the report. + Section section = 10; } // Describes a dimension column in the report. Dimensions requested in a report @@ -1488,8 +1528,8 @@ message FunnelResponseMetadata { // [sampled](https://support.google.com/analytics/answer/13331292), this // describes what percentage of events were used in this funnel report. One // `samplingMetadatas` is populated for each date range. Each - // `samplingMetadatas` corresponds to a date range in the order that date - // ranges were specified in the request. + // `samplingMetadatas` corresponds to a date range in order that date ranges + // were specified in the request. // // However if the results are not sampled, this field will not be defined. repeated SamplingMetadata sampling_metadatas = 1; @@ -1609,3 +1649,166 @@ enum SamplingLevel { // https://support.google.com/analytics/answer/10896953. UNSAMPLED = 3; } + +// Controls conversion reporting. +// +// +message ConversionSpec { + // Attribution model to use in the Conversion Report + enum AttributionModel { + // Unspecified attribution model. + ATTRIBUTION_MODEL_UNSPECIFIED = 0; + + // Attribution was based on the paid and organic data driven model + DATA_DRIVEN = 1; + + // Attribution was based on the paid and organic last click model + LAST_CLICK = 2; + } + + // The conversion action IDs to include in the report. If empty, all + // conversions are included. Valid conversion action IDs can be retrieved from + // the `conversion_action` field within the `conversions` list in the + // response of the `GetMetadata` method. For example, + // 'conversionActions/1234'. + repeated string conversion_actions = 1; + + // The attribution model to use in the Conversion Report. If unspecified, + // `DATA_DRIVEN` is used. + AttributionModel attribution_model = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Usable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is custom to this property. This includes user, + // event, & item scoped custom dimensions; to learn more about custom + // dimensions, see https://support.google.com/analytics/answer/14240153. This + // also include custom channel groups; to learn more about custom channel + // groups, see https://support.google.com/analytics/answer/13051316. + bool custom_definition = 5; + + // The display name of the category that this dimension belongs to. Similar + // dimensions and metrics are categorized together. + string category = 6; + + // Specifies the Google Analytics sections this dimension applies to. + repeated Section sections = 7; +} + +// Explains a metric. +message MetricMetadata { + // Justifications for why this metric is blocked. + enum BlockedReason { + // Will never be specified in API response. + BLOCKED_REASON_UNSPECIFIED = 0; + + // If present, your access is blocked to revenue related metrics for this + // property, and this metric is revenue related. + NO_REVENUE_METRICS = 1; + + // If present, your access is blocked to cost related metrics for this + // property, and this metric is cost related. + NO_COST_METRICS = 2; + } + + // A metric name. Usable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; + + // If reasons are specified, your access is blocked to this metric for this + // property. API requests from you to this property for this metric will + // succeed; however, the report will contain only zeros for this metric. API + // requests with metric filters on blocked metrics will fail. If reasons are + // empty, you have access to this metric. + // + // To learn more, see [Access and data-restriction + // management](https://support.google.com/analytics/answer/10851388). + repeated BlockedReason blocked_reasons = 8; + + // The display name of the category that this metrics belongs to. Similar + // dimensions and metrics are categorized together. + string category = 9; + + // Specifies the Google Analytics sections this metric applies to. + repeated Section sections = 10; +} + +// The metadata for a single comparison. +message ComparisonMetadata { + // This comparison's resource name. Usable in [Comparison](#Comparison)'s + // `comparison` field. For example, 'comparisons/1234'. + string api_name = 1; + + // This comparison's name within the Google Analytics user interface. + string ui_name = 2; + + // This comparison's description. + string description = 3; +} + +// The metadata for a single conversion. +// +// +message ConversionMetadata { + // The unique identifier of the conversion action. This ID is used to specify + // which conversions to include in a report by populating the + // `conversion_actions` field in the `ConversionsSpec` of a report request. + // For example, 'conversionActions/1234'. + string conversion_action = 1; + + // This conversion's name within the Google Analytics user interface. + string display_name = 2; +} diff --git a/packages/google-analytics-data/protos/protos.d.ts b/packages/google-analytics-data/protos/protos.d.ts index c28af088d795..5f7a160e8a0d 100644 --- a/packages/google-analytics-data/protos/protos.d.ts +++ b/packages/google-analytics-data/protos/protos.d.ts @@ -4600,20 +4600,6 @@ export namespace google { */ public queryAudienceList(request: google.analytics.data.v1alpha.IQueryAudienceListRequest): Promise; - /** - * Calls SheetExportAudienceList. - * @param request SheetExportAudienceListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse - */ - public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback): void; - - /** - * Calls SheetExportAudienceList. - * @param request SheetExportAudienceListRequest message or plain object - * @returns Promise - */ - public sheetExportAudienceList(request: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): Promise; - /** * Calls GetAudienceList. * @param request GetAudienceListRequest message or plain object @@ -4753,6 +4739,34 @@ export namespace google { * @returns Promise */ public listReportTasks(request: google.analytics.data.v1alpha.IListReportTasksRequest): Promise; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunReportResponse + */ + public runReport(request: google.analytics.data.v1alpha.IRunReportRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback): void; + + /** + * Calls RunReport. + * @param request RunReportRequest message or plain object + * @returns Promise + */ + public runReport(request: google.analytics.data.v1alpha.IRunReportRequest): Promise; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Metadata + */ + public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest, callback: google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback): void; + + /** + * Calls GetMetadata. + * @param request GetMetadataRequest message or plain object + * @returns Promise + */ + public getMetadata(request: google.analytics.data.v1alpha.IGetMetadataRequest): Promise; } namespace AlphaAnalyticsData { @@ -4778,13 +4792,6 @@ export namespace google { */ type QueryAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.QueryAudienceListResponse) => void; - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. - * @param error Error, if any - * @param [response] SheetExportAudienceListResponse - */ - type SheetExportAudienceListCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.SheetExportAudienceListResponse) => void; - /** * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. * @param error Error, if any @@ -4854,6 +4861,20 @@ export namespace google { * @param [response] ListReportTasksResponse */ type ListReportTasksCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.ListReportTasksResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. + * @param error Error, if any + * @param [response] RunReportResponse + */ + type RunReportCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.RunReportResponse) => void; + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. + * @param error Error, if any + * @param [response] Metadata + */ + type GetMetadataCallback = (error: (Error|null), response?: google.analytics.data.v1alpha.Metadata) => void; } /** Properties of a CreateRecurringAudienceListRequest. */ @@ -6611,230 +6632,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SheetExportAudienceListRequest. */ - interface ISheetExportAudienceListRequest { - - /** SheetExportAudienceListRequest name */ - name?: (string|null); - - /** SheetExportAudienceListRequest offset */ - offset?: (number|Long|string|null); - - /** SheetExportAudienceListRequest limit */ - limit?: (number|Long|string|null); - } - - /** Represents a SheetExportAudienceListRequest. */ - class SheetExportAudienceListRequest implements ISheetExportAudienceListRequest { - - /** - * Constructs a new SheetExportAudienceListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest); - - /** SheetExportAudienceListRequest name. */ - public name: string; - - /** SheetExportAudienceListRequest offset. */ - public offset: (number|Long|string); - - /** SheetExportAudienceListRequest limit. */ - public limit: (number|Long|string); - - /** - * Creates a new SheetExportAudienceListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SheetExportAudienceListRequest instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListRequest): google.analytics.data.v1alpha.SheetExportAudienceListRequest; - - /** - * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. - * @param message SheetExportAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. - * @param message SheetExportAudienceListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SheetExportAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SheetExportAudienceListRequest; - - /** - * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SheetExportAudienceListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SheetExportAudienceListRequest; - - /** - * Verifies a SheetExportAudienceListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SheetExportAudienceListRequest - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListRequest; - - /** - * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. - * @param message SheetExportAudienceListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SheetExportAudienceListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SheetExportAudienceListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SheetExportAudienceListResponse. */ - interface ISheetExportAudienceListResponse { - - /** SheetExportAudienceListResponse spreadsheetUri */ - spreadsheetUri?: (string|null); - - /** SheetExportAudienceListResponse spreadsheetId */ - spreadsheetId?: (string|null); - - /** SheetExportAudienceListResponse rowCount */ - rowCount?: (number|null); - - /** SheetExportAudienceListResponse audienceList */ - audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - } - - /** Represents a SheetExportAudienceListResponse. */ - class SheetExportAudienceListResponse implements ISheetExportAudienceListResponse { - - /** - * Constructs a new SheetExportAudienceListResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse); - - /** SheetExportAudienceListResponse spreadsheetUri. */ - public spreadsheetUri?: (string|null); - - /** SheetExportAudienceListResponse spreadsheetId. */ - public spreadsheetId?: (string|null); - - /** SheetExportAudienceListResponse rowCount. */ - public rowCount?: (number|null); - - /** SheetExportAudienceListResponse audienceList. */ - public audienceList?: (google.analytics.data.v1alpha.IAudienceList|null); - - /** - * Creates a new SheetExportAudienceListResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SheetExportAudienceListResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.ISheetExportAudienceListResponse): google.analytics.data.v1alpha.SheetExportAudienceListResponse; - - /** - * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. - * @param message SheetExportAudienceListResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. - * @param message SheetExportAudienceListResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISheetExportAudienceListResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SheetExportAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SheetExportAudienceListResponse; - - /** - * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SheetExportAudienceListResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SheetExportAudienceListResponse; - - /** - * Verifies a SheetExportAudienceListResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SheetExportAudienceListResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SheetExportAudienceListResponse; - - /** - * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. - * @param message SheetExportAudienceListResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SheetExportAudienceListResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SheetExportAudienceListResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SheetExportAudienceListResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - /** Properties of an AudienceRow. */ interface IAudienceRow { @@ -8575,7640 +8372,8946 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DateRange. */ - interface IDateRange { + /** Properties of a RunReportRequest. */ + interface IRunReportRequest { - /** DateRange startDate */ - startDate?: (string|null); + /** RunReportRequest property */ + property?: (string|null); - /** DateRange endDate */ - endDate?: (string|null); + /** RunReportRequest dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimension[]|null); - /** DateRange name */ - name?: (string|null); - } + /** RunReportRequest metrics */ + metrics?: (google.analytics.data.v1alpha.IMetric[]|null); - /** Represents a DateRange. */ - class DateRange implements IDateRange { + /** RunReportRequest dateRanges */ + dateRanges?: (google.analytics.data.v1alpha.IDateRange[]|null); - /** - * Constructs a new DateRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IDateRange); + /** RunReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - /** DateRange startDate. */ - public startDate: string; + /** RunReportRequest metricFilter */ + metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - /** DateRange endDate. */ - public endDate: string; + /** RunReportRequest offset */ + offset?: (number|Long|string|null); - /** DateRange name. */ - public name: string; + /** RunReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunReportRequest metricAggregations */ + metricAggregations?: (google.analytics.data.v1alpha.MetricAggregation[]|null); + + /** RunReportRequest orderBys */ + orderBys?: (google.analytics.data.v1alpha.IOrderBy[]|null); + + /** RunReportRequest currencyCode */ + currencyCode?: (string|null); + + /** RunReportRequest cohortSpec */ + cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows */ + keepEmptyRows?: (boolean|null); + + /** RunReportRequest returnPropertyQuota */ + returnPropertyQuota?: (boolean|null); + + /** RunReportRequest comparisons */ + comparisons?: (google.analytics.data.v1alpha.IComparison[]|null); + + /** RunReportRequest conversionSpec */ + conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); + } + + /** Represents a RunReportRequest. */ + class RunReportRequest implements IRunReportRequest { /** - * Creates a new DateRange instance using the specified properties. + * Constructs a new RunReportRequest. * @param [properties] Properties to set - * @returns DateRange instance */ - public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; + constructor(properties?: google.analytics.data.v1alpha.IRunReportRequest); - /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode + /** RunReportRequest property. */ + public property: string; + + /** RunReportRequest dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimension[]; + + /** RunReportRequest metrics. */ + public metrics: google.analytics.data.v1alpha.IMetric[]; + + /** RunReportRequest dateRanges. */ + public dateRanges: google.analytics.data.v1alpha.IDateRange[]; + + /** RunReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest metricFilter. */ + public metricFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** RunReportRequest offset. */ + public offset: (number|Long|string); + + /** RunReportRequest limit. */ + public limit: (number|Long|string); + + /** RunReportRequest metricAggregations. */ + public metricAggregations: google.analytics.data.v1alpha.MetricAggregation[]; + + /** RunReportRequest orderBys. */ + public orderBys: google.analytics.data.v1alpha.IOrderBy[]; + + /** RunReportRequest currencyCode. */ + public currencyCode: string; + + /** RunReportRequest cohortSpec. */ + public cohortSpec?: (google.analytics.data.v1alpha.ICohortSpec|null); + + /** RunReportRequest keepEmptyRows. */ + public keepEmptyRows: boolean; + + /** RunReportRequest returnPropertyQuota. */ + public returnPropertyQuota: boolean; + + /** RunReportRequest comparisons. */ + public comparisons: google.analytics.data.v1alpha.IComparison[]; + + /** RunReportRequest conversionSpec. */ + public conversionSpec?: (google.analytics.data.v1alpha.IConversionSpec|null); + + /** + * Creates a new RunReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunReportRequest instance + */ + public static create(properties?: google.analytics.data.v1alpha.IRunReportRequest): google.analytics.data.v1alpha.RunReportRequest; + + /** + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @param message DateRange message or plain object to encode + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. + * @param message RunReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DateRange message from the specified reader or buffer. + * Decodes a RunReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DateRange + * @returns RunReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DateRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportRequest; /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DateRange + * @returns RunReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DateRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportRequest; /** - * Verifies a DateRange message. + * Verifies a RunReportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DateRange + * @returns RunReportRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportRequest; /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @param message DateRange + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @param message RunReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.RunReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DateRange to JSON. + * Converts this RunReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DateRange + * Gets the default type url for RunReportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Dimension. */ - interface IDimension { + /** Properties of a RunReportResponse. */ + interface IRunReportResponse { - /** Dimension name */ - name?: (string|null); + /** RunReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); - /** Dimension dimensionExpression */ - dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + /** RunReportResponse metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** RunReportResponse rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse totals */ + totals?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse maximums */ + maximums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse minimums */ + minimums?: (google.analytics.data.v1alpha.IRow[]|null); + + /** RunReportResponse rowCount */ + rowCount?: (number|null); + + /** RunReportResponse metadata */ + metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** RunReportResponse propertyQuota */ + propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunReportResponse kind */ + kind?: (string|null); + + /** RunReportResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Dimension. */ - class Dimension implements IDimension { + /** Represents a RunReportResponse. */ + class RunReportResponse implements IRunReportResponse { /** - * Constructs a new Dimension. + * Constructs a new RunReportResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IDimension); + constructor(properties?: google.analytics.data.v1alpha.IRunReportResponse); - /** Dimension name. */ - public name: string; + /** RunReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; - /** Dimension dimensionExpression. */ - public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); + /** RunReportResponse metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** RunReportResponse rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse totals. */ + public totals: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse maximums. */ + public maximums: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse minimums. */ + public minimums: google.analytics.data.v1alpha.IRow[]; + + /** RunReportResponse rowCount. */ + public rowCount: number; + + /** RunReportResponse metadata. */ + public metadata?: (google.analytics.data.v1alpha.IResponseMetaData|null); + + /** RunReportResponse propertyQuota. */ + public propertyQuota?: (google.analytics.data.v1alpha.IPropertyQuota|null); + + /** RunReportResponse kind. */ + public kind: string; + + /** RunReportResponse nextPageToken. */ + public nextPageToken?: (string|null); /** - * Creates a new Dimension instance using the specified properties. + * Creates a new RunReportResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Dimension instance + * @returns RunReportResponse instance */ - public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; + public static create(properties?: google.analytics.data.v1alpha.IRunReportResponse): google.analytics.data.v1alpha.RunReportResponse; /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. - * @param message Dimension message or plain object to encode + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. + * @param message RunReportResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IRunReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Dimension message from the specified reader or buffer. + * Decodes a RunReportResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Dimension + * @returns RunReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Dimension; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.RunReportResponse; /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Dimension + * @returns RunReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Dimension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.RunReportResponse; /** - * Verifies a Dimension message. + * Verifies a RunReportResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Dimension + * @returns RunReportResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.RunReportResponse; /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @param message Dimension + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. + * @param message RunReportResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.RunReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Dimension to JSON. + * Converts this RunReportResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Dimension + * Gets the default type url for RunReportResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DimensionExpression. */ - interface IDimensionExpression { - - /** DimensionExpression lowerCase */ - lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase */ - upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + /** Properties of a GetMetadataRequest. */ + interface IGetMetadataRequest { - /** DimensionExpression concatenate */ - concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + /** GetMetadataRequest name */ + name?: (string|null); } - /** Represents a DimensionExpression. */ - class DimensionExpression implements IDimensionExpression { + /** Represents a GetMetadataRequest. */ + class GetMetadataRequest implements IGetMetadataRequest { /** - * Constructs a new DimensionExpression. + * Constructs a new GetMetadataRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); - - /** DimensionExpression lowerCase. */ - public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); - - /** DimensionExpression upperCase. */ - public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + constructor(properties?: google.analytics.data.v1alpha.IGetMetadataRequest); - /** DimensionExpression concatenate. */ - public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); - - /** DimensionExpression oneExpression. */ - public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); + /** GetMetadataRequest name. */ + public name: string; /** - * Creates a new DimensionExpression instance using the specified properties. + * Creates a new GetMetadataRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DimensionExpression instance + * @returns GetMetadataRequest instance */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; + public static create(properties?: google.analytics.data.v1alpha.IGetMetadataRequest): google.analytics.data.v1alpha.GetMetadataRequest; /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. - * @param message DimensionExpression message or plain object to encode + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @param message GetMetadataRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IGetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DimensionExpression message from the specified reader or buffer. + * Decodes a GetMetadataRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DimensionExpression + * @returns GetMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.GetMetadataRequest; /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DimensionExpression + * @returns GetMetadataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.GetMetadataRequest; /** - * Verifies a DimensionExpression message. + * Verifies a GetMetadataRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DimensionExpression + * @returns GetMetadataRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.GetMetadataRequest; /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. - * @param message DimensionExpression + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @param message GetMetadataRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.GetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DimensionExpression to JSON. + * Converts this GetMetadataRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DimensionExpression + * Gets the default type url for GetMetadataRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DimensionExpression { + /** Properties of a Metadata. */ + interface IMetadata { - /** Properties of a CaseExpression. */ - interface ICaseExpression { + /** Metadata name */ + name?: (string|null); - /** CaseExpression dimensionName */ - dimensionName?: (string|null); - } + /** Metadata dimensions */ + dimensions?: (google.analytics.data.v1alpha.IDimensionMetadata[]|null); - /** Represents a CaseExpression. */ - class CaseExpression implements ICaseExpression { + /** Metadata metrics */ + metrics?: (google.analytics.data.v1alpha.IMetricMetadata[]|null); - /** - * Constructs a new CaseExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); + /** Metadata comparisons */ + comparisons?: (google.analytics.data.v1alpha.IComparisonMetadata[]|null); - /** CaseExpression dimensionName. */ - public dimensionName: string; + /** Metadata conversions */ + conversions?: (google.analytics.data.v1alpha.IConversionMetadata[]|null); + } - /** - * Creates a new CaseExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns CaseExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + /** Represents a Metadata. */ + class Metadata implements IMetadata { - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetadata); - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @param message CaseExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; + /** Metadata name. */ + public name: string; - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + /** Metadata dimensions. */ + public dimensions: google.analytics.data.v1alpha.IDimensionMetadata[]; - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + /** Metadata metrics. */ + public metrics: google.analytics.data.v1alpha.IMetricMetadata[]; - /** - * Verifies a CaseExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Metadata comparisons. */ + public comparisons: google.analytics.data.v1alpha.IComparisonMetadata[]; - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CaseExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; + /** Metadata conversions. */ + public conversions: google.analytics.data.v1alpha.IConversionMetadata[]; - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @param message CaseExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetadata): google.analytics.data.v1alpha.Metadata; - /** - * Converts this CaseExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for CaseExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ConcatenateExpression. */ - interface IConcatenateExpression { + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metadata; - /** ConcatenateExpression dimensionNames */ - dimensionNames?: (string[]|null); + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metadata; - /** ConcatenateExpression delimiter */ - delimiter?: (string|null); - } + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a ConcatenateExpression. */ - class ConcatenateExpression implements IConcatenateExpression { + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metadata; - /** - * Constructs a new ConcatenateExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConcatenateExpression dimensionNames. */ - public dimensionNames: string[]; + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ConcatenateExpression delimiter. */ - public delimiter: string; + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns ConcatenateExpression instance - */ - public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + /** Properties of a DateRange. */ + interface IDateRange { - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + /** DateRange startDate */ + startDate?: (string|null); - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @param message ConcatenateExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; + /** DateRange endDate */ + endDate?: (string|null); - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + /** DateRange name */ + name?: (string|null); + } - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + /** Represents a DateRange. */ + class DateRange implements IDateRange { - /** - * Verifies a ConcatenateExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new DateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IDateRange); - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConcatenateExpression - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @param message ConcatenateExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConcatenateExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConcatenateExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric name */ - name?: (string|null); - - /** Metric expression */ - expression?: (string|null); - - /** Metric invisible */ - invisible?: (boolean|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { + /** DateRange startDate. */ + public startDate: string; - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IMetric); + /** DateRange endDate. */ + public endDate: string; - /** Metric name. */ + /** DateRange name. */ public name: string; - /** Metric expression. */ - public expression: string; - - /** Metric invisible. */ - public invisible: boolean; - /** - * Creates a new Metric instance using the specified properties. + * Creates a new DateRange instance using the specified properties. * @param [properties] Properties to set - * @returns Metric instance + * @returns DateRange instance */ - public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; + public static create(properties?: google.analytics.data.v1alpha.IDateRange): google.analytics.data.v1alpha.DateRange; /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. + * @param message DateRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDateRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes a DateRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metric + * @returns DateRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DateRange; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes a DateRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metric + * @returns DateRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DateRange; /** - * Verifies a Metric message. + * Verifies a DateRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metric + * @returns DateRange */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DateRange; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric + * Creates a plain object from a DateRange message. Also converts values to other types if specified. + * @param message DateRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.DateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metric to JSON. + * Converts this DateRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Metric + * Gets the default type url for DateRange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FilterExpression. */ - interface IFilterExpression { - - /** FilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + /** Properties of a Dimension. */ + interface IDimension { - /** FilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + /** Dimension name */ + name?: (string|null); - /** FilterExpression filter */ - filter?: (google.analytics.data.v1alpha.IFilter|null); + /** Dimension dimensionExpression */ + dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); } - /** Represents a FilterExpression. */ - class FilterExpression implements IFilterExpression { + /** Represents a Dimension. */ + class Dimension implements IDimension { /** - * Constructs a new FilterExpression. + * Constructs a new Dimension. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); - - /** FilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - - /** FilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + constructor(properties?: google.analytics.data.v1alpha.IDimension); - /** FilterExpression filter. */ - public filter?: (google.analytics.data.v1alpha.IFilter|null); + /** Dimension name. */ + public name: string; - /** FilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); + /** Dimension dimensionExpression. */ + public dimensionExpression?: (google.analytics.data.v1alpha.IDimensionExpression|null); /** - * Creates a new FilterExpression instance using the specified properties. + * Creates a new Dimension instance using the specified properties. * @param [properties] Properties to set - * @returns FilterExpression instance + * @returns Dimension instance */ - public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; + public static create(properties?: google.analytics.data.v1alpha.IDimension): google.analytics.data.v1alpha.Dimension; /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. - * @param message FilterExpression message or plain object to encode + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FilterExpression message from the specified reader or buffer. + * Decodes a Dimension message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FilterExpression + * @returns Dimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Dimension; /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * Decodes a Dimension message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FilterExpression + * @returns Dimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Dimension; /** - * Verifies a FilterExpression message. + * Verifies a Dimension message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FilterExpression + * @returns Dimension */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Dimension; /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. - * @param message FilterExpression + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FilterExpression to JSON. + * Converts this Dimension to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FilterExpression + * Gets the default type url for Dimension * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FilterExpressionList. */ - interface IFilterExpressionList { + /** Properties of a DimensionExpression. */ + interface IDimensionExpression { - /** FilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); + /** DimensionExpression lowerCase */ + lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase */ + upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate */ + concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); } - /** Represents a FilterExpressionList. */ - class FilterExpressionList implements IFilterExpressionList { + /** Represents a DimensionExpression. */ + class DimensionExpression implements IDimensionExpression { /** - * Constructs a new FilterExpressionList. + * Constructs a new DimensionExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); + constructor(properties?: google.analytics.data.v1alpha.IDimensionExpression); - /** FilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFilterExpression[]; + /** DimensionExpression lowerCase. */ + public lowerCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression upperCase. */ + public upperCase?: (google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null); + + /** DimensionExpression concatenate. */ + public concatenate?: (google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null); + + /** DimensionExpression oneExpression. */ + public oneExpression?: ("lowerCase"|"upperCase"|"concatenate"); /** - * Creates a new FilterExpressionList instance using the specified properties. + * Creates a new DimensionExpression instance using the specified properties. * @param [properties] Properties to set - * @returns FilterExpressionList instance + * @returns DimensionExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; + public static create(properties?: google.analytics.data.v1alpha.IDimensionExpression): google.analytics.data.v1alpha.DimensionExpression; /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. - * @param message FilterExpressionList message or plain object to encode + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * @param message DimensionExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FilterExpressionList message from the specified reader or buffer. + * Decodes a DimensionExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FilterExpressionList + * @returns DimensionExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression; /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FilterExpressionList + * @returns DimensionExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression; /** - * Verifies a FilterExpressionList message. + * Verifies a DimensionExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FilterExpressionList + * @returns DimensionExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression; /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. - * @param message FilterExpressionList + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * @param message DimensionExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FilterExpressionList to JSON. + * Converts this DimensionExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FilterExpressionList + * Gets the default type url for DimensionExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Filter. */ - interface IFilter { - - /** Filter fieldName */ - fieldName?: (string|null); - - /** Filter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + namespace DimensionExpression { - /** Filter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + /** Properties of a CaseExpression. */ + interface ICaseExpression { - /** Filter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** CaseExpression dimensionName */ + dimensionName?: (string|null); + } - /** Filter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** Represents a CaseExpression. */ + class CaseExpression implements ICaseExpression { - /** Filter emptyFilter */ - emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); - } + /** + * Constructs a new CaseExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression); - /** Represents a Filter. */ - class Filter implements IFilter { + /** CaseExpression dimensionName. */ + public dimensionName: string; - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.IFilter); + /** + * Creates a new CaseExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - /** Filter fieldName. */ - public fieldName: string; + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - /** Filter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @param message CaseExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.ICaseExpression, writer?: $protobuf.Writer): $protobuf.Writer; - /** Filter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - /** Filter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - /** Filter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** + * Verifies a CaseExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Filter emptyFilter. */ - public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.CaseExpression; - /** Filter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @param message CaseExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.CaseExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; + /** + * Converts this CaseExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for CaseExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ConcatenateExpression. */ + interface IConcatenateExpression { - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Filter; + /** ConcatenateExpression dimensionNames */ + dimensionNames?: (string[]|null); - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Filter; + /** ConcatenateExpression delimiter */ + delimiter?: (string|null); + } - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a ConcatenateExpression. */ + class ConcatenateExpression implements IConcatenateExpression { - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; + /** + * Constructs a new ConcatenateExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression); - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConcatenateExpression dimensionNames. */ + public dimensionNames: string[]; - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ConcatenateExpression delimiter. */ + public delimiter: string; - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ConcatenateExpression instance + */ + public static create(properties?: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - /** Properties of a StringFilter. */ - interface IStringFilter { + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - /** StringFilter matchType */ - matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @param message ConcatenateExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression, writer?: $protobuf.Writer): $protobuf.Writer; - /** StringFilter value */ - value?: (string|null); + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Verifies a ConcatenateExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConcatenateExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @param message ConcatenateExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConcatenateExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConcatenateExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { + /** Properties of a Metric. */ + interface IMetric { + + /** Metric name */ + name?: (string|null); + + /** Metric expression */ + expression?: (string|null); + + /** Metric invisible */ + invisible?: (boolean|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { /** - * Constructs a new StringFilter. + * Constructs a new Metric. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IStringFilter); + constructor(properties?: google.analytics.data.v1alpha.IMetric); - /** StringFilter matchType. */ - public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); + /** Metric name. */ + public name: string; - /** StringFilter value. */ - public value: string; + /** Metric expression. */ + public expression: string; - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; + /** Metric invisible. */ + public invisible: boolean; /** - * Creates a new StringFilter instance using the specified properties. + * Creates a new Metric instance using the specified properties. * @param [properties] Properties to set - * @returns StringFilter instance + * @returns Metric instance */ - public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; + public static create(properties?: google.analytics.data.v1alpha.IMetric): google.analytics.data.v1alpha.Metric; /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StringFilter message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StringFilter + * @returns Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.StringFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Metric; /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StringFilter + * @returns Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.StringFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Metric; /** - * Verifies a StringFilter message. + * Verifies a Metric message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StringFilter + * @returns Metric */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Metric; /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StringFilter to JSON. + * Converts this Metric to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StringFilter + * Gets the default type url for Metric * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - 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 a Comparison. */ + interface IComparison { - /** Properties of an InListFilter. */ - interface IInListFilter { + /** Comparison name */ + name?: (string|null); - /** InListFilter values */ - values?: (string[]|null); + /** Comparison dimensionFilter */ + dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); + /** Comparison comparison */ + comparison?: (string|null); } - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { + /** Represents a Comparison. */ + class Comparison implements IComparison { /** - * Constructs a new InListFilter. + * Constructs a new Comparison. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IInListFilter); + constructor(properties?: google.analytics.data.v1alpha.IComparison); - /** InListFilter values. */ - public values: string[]; + /** Comparison name. */ + public name?: (string|null); - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; + /** Comparison dimensionFilter. */ + public dimensionFilter?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** Comparison comparison. */ + public comparison?: (string|null); + + /** Comparison oneComparison. */ + public oneComparison?: ("dimensionFilter"|"comparison"); /** - * Creates a new InListFilter instance using the specified properties. + * Creates a new Comparison instance using the specified properties. * @param [properties] Properties to set - * @returns InListFilter instance + * @returns Comparison instance */ - public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; + public static create(properties?: google.analytics.data.v1alpha.IComparison): google.analytics.data.v1alpha.Comparison; /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. + * @param message Comparison message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IComparison, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InListFilter message from the specified reader or buffer. + * Decodes a Comparison message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InListFilter + * @returns Comparison * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.InListFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Comparison; /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * Decodes a Comparison message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InListFilter + * @returns Comparison * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.InListFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Comparison; /** - * Verifies an InListFilter message. + * Verifies a Comparison message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InListFilter + * @returns Comparison */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Comparison; /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter + * Creates a plain object from a Comparison message. Also converts values to other types if specified. + * @param message Comparison * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InListFilter to JSON. + * Converts this Comparison to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InListFilter + * Gets the default type url for Comparison * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NumericFilter. */ - interface INumericFilter { + /** Properties of a FilterExpression. */ + interface IFilterExpression { - /** NumericFilter operation */ - operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); + /** FilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - /** NumericFilter value */ - value?: (google.analytics.data.v1alpha.INumericValue|null); + /** FilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter */ + filter?: (google.analytics.data.v1alpha.IFilter|null); } - /** Represents a NumericFilter. */ - class NumericFilter implements INumericFilter { + /** Represents a FilterExpression. */ + class FilterExpression implements IFilterExpression { /** - * Constructs a new NumericFilter. + * Constructs a new FilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.INumericFilter); + constructor(properties?: google.analytics.data.v1alpha.IFilterExpression); - /** NumericFilter operation. */ - public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); + /** FilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); - /** NumericFilter value. */ - public value?: (google.analytics.data.v1alpha.INumericValue|null); + /** FilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFilterExpressionList|null); + + /** FilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFilterExpression|null); + + /** FilterExpression filter. */ + public filter?: (google.analytics.data.v1alpha.IFilter|null); + + /** FilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); /** - * Creates a new NumericFilter instance using the specified properties. + * Creates a new FilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns NumericFilter instance + * @returns FilterExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; + public static create(properties?: google.analytics.data.v1alpha.IFilterExpression): google.analytics.data.v1alpha.FilterExpression; /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @param message FilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NumericFilter message from the specified reader or buffer. + * Decodes a FilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NumericFilter + * @returns FilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpression; /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NumericFilter + * @returns FilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpression; /** - * Verifies a NumericFilter message. + * Verifies a FilterExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NumericFilter + * @returns FilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpression; /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @param message NumericFilter + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @param message FilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NumericFilter to JSON. + * Converts this FilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NumericFilter + * Gets the default type url for FilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NumericFilter { - - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - EQUAL = 1, - LESS_THAN = 2, - LESS_THAN_OR_EQUAL = 3, - GREATER_THAN = 4, - GREATER_THAN_OR_EQUAL = 5 - } - } - - /** Properties of an OrderBy. */ - interface IOrderBy { - - /** OrderBy metric */ - metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension */ - dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + /** Properties of a FilterExpressionList. */ + interface IFilterExpressionList { - /** OrderBy desc */ - desc?: (boolean|null); + /** FilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFilterExpression[]|null); } - /** Represents an OrderBy. */ - class OrderBy implements IOrderBy { + /** Represents a FilterExpressionList. */ + class FilterExpressionList implements IFilterExpressionList { /** - * Constructs a new OrderBy. + * Constructs a new FilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IOrderBy); - - /** OrderBy metric. */ - public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); - - /** OrderBy dimension. */ - public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); - - /** OrderBy desc. */ - public desc: boolean; + constructor(properties?: google.analytics.data.v1alpha.IFilterExpressionList); - /** OrderBy oneOrderBy. */ - public oneOrderBy?: ("metric"|"dimension"); + /** FilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFilterExpression[]; /** - * Creates a new OrderBy instance using the specified properties. + * Creates a new FilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns OrderBy instance + * @returns FilterExpressionList instance */ - public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; + public static create(properties?: google.analytics.data.v1alpha.IFilterExpressionList): google.analytics.data.v1alpha.FilterExpressionList; /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. - * @param message OrderBy message or plain object to encode + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * @param message FilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OrderBy message from the specified reader or buffer. + * Decodes a FilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OrderBy + * @returns FilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FilterExpressionList; /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OrderBy + * @returns FilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FilterExpressionList; /** - * Verifies an OrderBy message. + * Verifies a FilterExpressionList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OrderBy + * @returns FilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FilterExpressionList; /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. - * @param message OrderBy + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * @param message FilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OrderBy to JSON. + * Converts this FilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OrderBy + * Gets the default type url for FilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace OrderBy { + /** Properties of a Filter. */ + interface IFilter { - /** Properties of a MetricOrderBy. */ - interface IMetricOrderBy { + /** Filter fieldName */ + fieldName?: (string|null); - /** MetricOrderBy metricName */ - metricName?: (string|null); - } + /** Filter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - /** Represents a MetricOrderBy. */ - class MetricOrderBy implements IMetricOrderBy { + /** Filter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - /** - * Constructs a new MetricOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); + /** Filter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - /** MetricOrderBy metricName. */ - public metricName: string; + /** Filter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricOrderBy instance - */ - public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + /** Filter emptyFilter */ + emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + } - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Filter. */ + class Filter implements IFilter { - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @param message MetricOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFilter); - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + /** Filter fieldName. */ + public fieldName: string; - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + /** Filter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - /** - * 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); + /** Filter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + /** Filter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @param message MetricOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Filter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** Filter emptyFilter. */ + public emptyFilter?: (google.analytics.data.v1alpha.IEmptyFilter|null); + + /** Filter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"); + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IFilter): google.analytics.data.v1alpha.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.data.v1alpha.StringFilter.MatchType|keyof typeof google.analytics.data.v1alpha.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IStringFilter): google.analytics.data.v1alpha.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.StringFilter; + + /** + * Verifies a StringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IInListFilter): google.analytics.data.v1alpha.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.InListFilter; + + /** + * Verifies an InListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.data.v1alpha.NumericFilter.Operation|keyof typeof google.analytics.data.v1alpha.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericFilter): google.analytics.data.v1alpha.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericFilter; + + /** + * Verifies a NumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an OrderBy. */ + interface IOrderBy { + + /** OrderBy metric */ + metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension */ + dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an OrderBy. */ + class OrderBy implements IOrderBy { + + /** + * Constructs a new OrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IOrderBy); + + /** OrderBy metric. */ + public metric?: (google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null); + + /** OrderBy dimension. */ + public dimension?: (google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null); + + /** OrderBy desc. */ + public desc: boolean; + + /** OrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new OrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.IOrderBy): google.analytics.data.v1alpha.OrderBy; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @param message OrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy; + + /** + * Verifies an OrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @param message OrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.data.v1alpha.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.data.v1alpha.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Verifies a BetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmptyFilter. */ + interface IEmptyFilter { + } + + /** Represents an EmptyFilter. */ + class EmptyFilter implements IEmptyFilter { + + /** + * Constructs a new EmptyFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns EmptyFilter instance + */ + public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @param message EmptyFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Verifies an EmptyFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmptyFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @param message EmptyFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmptyFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmptyFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this MetricOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this NumericValue 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; - } + /** + * 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 DimensionOrderBy. */ - interface IDimensionOrderBy { + /** Properties of a CohortSpec. */ + interface ICohortSpec { - /** DimensionOrderBy dimensionName */ - dimensionName?: (string|null); + /** CohortSpec cohorts */ + cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); - /** DimensionOrderBy orderType */ - orderType?: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null); - } + /** CohortSpec cohortsRange */ + cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); - /** Represents a DimensionOrderBy. */ - class DimensionOrderBy implements IDimensionOrderBy { + /** CohortSpec cohortReportSettings */ + cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + } - /** - * Constructs a new DimensionOrderBy. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy); + /** Represents a CohortSpec. */ + class CohortSpec implements ICohortSpec { - /** DimensionOrderBy dimensionName. */ - public dimensionName: string; + /** + * Constructs a new CohortSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); - /** DimensionOrderBy orderType. */ - public orderType: (google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType); + /** CohortSpec cohorts. */ + public cohorts: google.analytics.data.v1alpha.ICohort[]; - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @param [properties] Properties to set - * @returns DimensionOrderBy instance - */ - public static create(properties?: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + /** CohortSpec cohortsRange. */ + public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + /** CohortSpec cohortReportSettings. */ + public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @param message DimensionOrderBy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CohortSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CohortSpec instance + */ + public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @param message CohortSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortSpec; - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DimensionOrderBy - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.OrderBy.DimensionOrderBy; + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortSpec; - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @param message DimensionOrderBy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.OrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a CohortSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this DimensionOrderBy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CohortSpec + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; - /** - * 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; - } + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @param message CohortSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace DimensionOrderBy { + /** + * Converts this CohortSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** OrderType enum. */ - enum OrderType { - ORDER_TYPE_UNSPECIFIED = 0, - ALPHANUMERIC = 1, - CASE_INSENSITIVE_ALPHANUMERIC = 2, - NUMERIC = 3 - } - } + /** + * Gets the default type url for CohortSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BetweenFilter. */ - interface IBetweenFilter { + /** Properties of a Cohort. */ + interface ICohort { - /** BetweenFilter fromValue */ - fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + /** Cohort name */ + name?: (string|null); - /** BetweenFilter toValue */ - toValue?: (google.analytics.data.v1alpha.INumericValue|null); + /** Cohort dimension */ + dimension?: (string|null); + + /** Cohort dateRange */ + dateRange?: (google.analytics.data.v1alpha.IDateRange|null); } - /** Represents a BetweenFilter. */ - class BetweenFilter implements IBetweenFilter { + /** Represents a Cohort. */ + class Cohort implements ICohort { /** - * Constructs a new BetweenFilter. + * Constructs a new Cohort. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IBetweenFilter); + constructor(properties?: google.analytics.data.v1alpha.ICohort); - /** BetweenFilter fromValue. */ - public fromValue?: (google.analytics.data.v1alpha.INumericValue|null); + /** Cohort name. */ + public name: string; - /** BetweenFilter toValue. */ - public toValue?: (google.analytics.data.v1alpha.INumericValue|null); + /** Cohort dimension. */ + public dimension: string; + + /** Cohort dateRange. */ + public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); /** - * Creates a new BetweenFilter instance using the specified properties. + * Creates a new Cohort instance using the specified properties. * @param [properties] Properties to set - * @returns BetweenFilter instance + * @returns Cohort instance */ - public static create(properties?: google.analytics.data.v1alpha.IBetweenFilter): google.analytics.data.v1alpha.BetweenFilter; + public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @param message Cohort message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BetweenFilter message from the specified reader or buffer. + * Decodes a Cohort message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BetweenFilter + * @returns Cohort * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.BetweenFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Cohort; /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * Decodes a Cohort message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BetweenFilter + * @returns Cohort * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.BetweenFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Cohort; /** - * Verifies a BetweenFilter message. + * Verifies a Cohort message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BetweenFilter + * @returns Cohort */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.BetweenFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @param message BetweenFilter + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @param message Cohort * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BetweenFilter to JSON. + * Converts this Cohort to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BetweenFilter + * Gets the default type url for Cohort * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EmptyFilter. */ - interface IEmptyFilter { + /** Properties of a CohortsRange. */ + interface ICohortsRange { + + /** CohortsRange granularity */ + granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); + + /** CohortsRange startOffset */ + startOffset?: (number|null); + + /** CohortsRange endOffset */ + endOffset?: (number|null); } - /** Represents an EmptyFilter. */ - class EmptyFilter implements IEmptyFilter { + /** Represents a CohortsRange. */ + class CohortsRange implements ICohortsRange { /** - * Constructs a new EmptyFilter. + * Constructs a new CohortsRange. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IEmptyFilter); + constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); + + /** CohortsRange granularity. */ + public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); + + /** CohortsRange startOffset. */ + public startOffset: number; + + /** CohortsRange endOffset. */ + public endOffset: number; /** - * Creates a new EmptyFilter instance using the specified properties. + * Creates a new CohortsRange instance using the specified properties. * @param [properties] Properties to set - * @returns EmptyFilter instance + * @returns CohortsRange instance */ - public static create(properties?: google.analytics.data.v1alpha.IEmptyFilter): google.analytics.data.v1alpha.EmptyFilter; + public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. - * @param message EmptyFilter message or plain object to encode + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @param message CohortsRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEmptyFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EmptyFilter message from the specified reader or buffer. + * Decodes a CohortsRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EmptyFilter + * @returns CohortsRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EmptyFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortsRange; /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EmptyFilter + * @returns CohortsRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EmptyFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortsRange; /** - * Verifies an EmptyFilter message. + * Verifies a CohortsRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EmptyFilter + * @returns CohortsRange */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EmptyFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. - * @param message EmptyFilter + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @param message CohortsRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.EmptyFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EmptyFilter to JSON. + * Converts this CohortsRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EmptyFilter + * Gets the default type url for CohortsRange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NumericValue. */ - interface INumericValue { + namespace CohortsRange { - /** NumericValue int64Value */ - int64Value?: (number|Long|string|null); + /** Granularity enum. */ + enum Granularity { + GRANULARITY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2, + MONTHLY = 3 + } + } - /** NumericValue doubleValue */ - doubleValue?: (number|null); + /** Properties of a CohortReportSettings. */ + interface ICohortReportSettings { + + /** CohortReportSettings accumulate */ + accumulate?: (boolean|null); } - /** Represents a NumericValue. */ - class NumericValue implements INumericValue { + /** Represents a CohortReportSettings. */ + class CohortReportSettings implements ICohortReportSettings { /** - * Constructs a new NumericValue. + * Constructs a new CohortReportSettings. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.INumericValue); - - /** NumericValue int64Value. */ - public int64Value?: (number|Long|string|null); - - /** NumericValue doubleValue. */ - public doubleValue?: (number|null); + constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); - /** NumericValue oneValue. */ - public oneValue?: ("int64Value"|"doubleValue"); + /** CohortReportSettings accumulate. */ + public accumulate: boolean; /** - * Creates a new NumericValue instance using the specified properties. + * Creates a new CohortReportSettings instance using the specified properties. * @param [properties] Properties to set - * @returns NumericValue instance + * @returns CohortReportSettings instance */ - public static create(properties?: google.analytics.data.v1alpha.INumericValue): google.analytics.data.v1alpha.NumericValue; + public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @param message CohortReportSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NumericValue message from the specified reader or buffer. + * Decodes a CohortReportSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NumericValue + * @returns CohortReportSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.NumericValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortReportSettings; /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NumericValue + * @returns CohortReportSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.NumericValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortReportSettings; /** - * Verifies a NumericValue message. + * Verifies a CohortReportSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NumericValue + * @returns CohortReportSettings */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.NumericValue; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @param message NumericValue + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @param message CohortReportSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NumericValue to JSON. + * Converts this CohortReportSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NumericValue + * Gets the default type url for CohortReportSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CohortSpec. */ - interface ICohortSpec { + /** Section enum. */ + enum Section { + SECTION_UNSPECIFIED = 0, + SECTION_REPORT = 1, + SECTION_ADVERTISING = 2 + } - /** CohortSpec cohorts */ - cohorts?: (google.analytics.data.v1alpha.ICohort[]|null); + /** Properties of a ResponseMetaData. */ + interface IResponseMetaData { - /** CohortSpec cohortsRange */ - cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + /** ResponseMetaData dataLossFromOtherRow */ + dataLossFromOtherRow?: (boolean|null); - /** CohortSpec cohortReportSettings */ - cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + /** ResponseMetaData schemaRestrictionResponse */ + schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode */ + currencyCode?: (string|null); + + /** ResponseMetaData timeZone */ + timeZone?: (string|null); + + /** ResponseMetaData emptyReason */ + emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding */ + subjectToThresholding?: (boolean|null); + + /** ResponseMetaData samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + + /** ResponseMetaData section */ + section?: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section|null); } - /** Represents a CohortSpec. */ - class CohortSpec implements ICohortSpec { + /** Represents a ResponseMetaData. */ + class ResponseMetaData implements IResponseMetaData { /** - * Constructs a new CohortSpec. + * Constructs a new ResponseMetaData. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ICohortSpec); + constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); - /** CohortSpec cohorts. */ - public cohorts: google.analytics.data.v1alpha.ICohort[]; + /** ResponseMetaData dataLossFromOtherRow. */ + public dataLossFromOtherRow: boolean; + + /** ResponseMetaData schemaRestrictionResponse. */ + public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); + + /** ResponseMetaData currencyCode. */ + public currencyCode?: (string|null); + + /** ResponseMetaData timeZone. */ + public timeZone?: (string|null); + + /** ResponseMetaData emptyReason. */ + public emptyReason?: (string|null); + + /** ResponseMetaData subjectToThresholding. */ + public subjectToThresholding?: (boolean|null); - /** CohortSpec cohortsRange. */ - public cohortsRange?: (google.analytics.data.v1alpha.ICohortsRange|null); + /** ResponseMetaData samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; - /** CohortSpec cohortReportSettings. */ - public cohortReportSettings?: (google.analytics.data.v1alpha.ICohortReportSettings|null); + /** ResponseMetaData section. */ + public section: (google.analytics.data.v1alpha.Section|keyof typeof google.analytics.data.v1alpha.Section); /** - * Creates a new CohortSpec instance using the specified properties. + * Creates a new ResponseMetaData instance using the specified properties. * @param [properties] Properties to set - * @returns CohortSpec instance + * @returns ResponseMetaData instance */ - public static create(properties?: google.analytics.data.v1alpha.ICohortSpec): google.analytics.data.v1alpha.CohortSpec; + public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. - * @param message CohortSpec message or plain object to encode + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @param message ResponseMetaData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CohortSpec message from the specified reader or buffer. + * Decodes a ResponseMetaData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CohortSpec + * @returns ResponseMetaData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData; /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CohortSpec + * @returns ResponseMetaData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData; /** - * Verifies a CohortSpec message. + * Verifies a ResponseMetaData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CohortSpec + * @returns ResponseMetaData */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortSpec; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. - * @param message CohortSpec + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @param message ResponseMetaData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.CohortSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CohortSpec to JSON. + * Converts this ResponseMetaData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for CohortSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Gets the default type url for ResponseMetaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMetaData { + + /** Properties of a SchemaRestrictionResponse. */ + interface ISchemaRestrictionResponse { + + /** SchemaRestrictionResponse activeMetricRestrictions */ + activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); + } + + /** Represents a SchemaRestrictionResponse. */ + class SchemaRestrictionResponse implements ISchemaRestrictionResponse { + + /** + * Constructs a new SchemaRestrictionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); + + /** SchemaRestrictionResponse activeMetricRestrictions. */ + public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRestrictionResponse instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @param message SchemaRestrictionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Verifies a SchemaRestrictionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRestrictionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @param message SchemaRestrictionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRestrictionResponse { + + /** Properties of an ActiveMetricRestriction. */ + interface IActiveMetricRestriction { + + /** ActiveMetricRestriction metricName */ + metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes */ + restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); + } + + /** Represents an ActiveMetricRestriction. */ + class ActiveMetricRestriction implements IActiveMetricRestriction { + + /** + * Constructs a new ActiveMetricRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + + /** ActiveMetricRestriction metricName. */ + public metricName?: (string|null); + + /** ActiveMetricRestriction restrictedMetricTypes. */ + public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveMetricRestriction instance + */ + public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @param message ActiveMetricRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Verifies an ActiveMetricRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveMetricRestriction + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @param message ActiveMetricRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveMetricRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } - /** Properties of a Cohort. */ - interface ICohort { + /** Properties of a DimensionHeader. */ + interface IDimensionHeader { - /** Cohort name */ + /** DimensionHeader name */ name?: (string|null); - - /** Cohort dimension */ - dimension?: (string|null); - - /** Cohort dateRange */ - dateRange?: (google.analytics.data.v1alpha.IDateRange|null); } - /** Represents a Cohort. */ - class Cohort implements ICohort { + /** Represents a DimensionHeader. */ + class DimensionHeader implements IDimensionHeader { /** - * Constructs a new Cohort. + * Constructs a new DimensionHeader. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ICohort); + constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); - /** Cohort name. */ + /** DimensionHeader name. */ public name: string; - /** Cohort dimension. */ - public dimension: string; - - /** Cohort dateRange. */ - public dateRange?: (google.analytics.data.v1alpha.IDateRange|null); - /** - * Creates a new Cohort instance using the specified properties. + * Creates a new DimensionHeader instance using the specified properties. * @param [properties] Properties to set - * @returns Cohort instance + * @returns DimensionHeader instance */ - public static create(properties?: google.analytics.data.v1alpha.ICohort): google.analytics.data.v1alpha.Cohort; + public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. - * @param message Cohort message or plain object to encode + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * @param message DimensionHeader message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohort, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cohort message from the specified reader or buffer. + * Decodes a DimensionHeader message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Cohort + * @returns DimensionHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Cohort; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionHeader; /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cohort + * @returns DimensionHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Cohort; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionHeader; /** - * Verifies a Cohort message. + * Verifies a DimensionHeader message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cohort + * @returns DimensionHeader */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Cohort; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. - * @param message Cohort + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * @param message DimensionHeader * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Cohort, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cohort to JSON. + * Converts this DimensionHeader to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cohort + * Gets the default type url for DimensionHeader * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CohortsRange. */ - interface ICohortsRange { - - /** CohortsRange granularity */ - granularity?: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity|null); + /** Properties of a MetricHeader. */ + interface IMetricHeader { - /** CohortsRange startOffset */ - startOffset?: (number|null); + /** MetricHeader name */ + name?: (string|null); - /** CohortsRange endOffset */ - endOffset?: (number|null); + /** MetricHeader type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); } - /** Represents a CohortsRange. */ - class CohortsRange implements ICohortsRange { + /** Represents a MetricHeader. */ + class MetricHeader implements IMetricHeader { /** - * Constructs a new CohortsRange. + * Constructs a new MetricHeader. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ICohortsRange); - - /** CohortsRange granularity. */ - public granularity: (google.analytics.data.v1alpha.CohortsRange.Granularity|keyof typeof google.analytics.data.v1alpha.CohortsRange.Granularity); + constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); - /** CohortsRange startOffset. */ - public startOffset: number; + /** MetricHeader name. */ + public name: string; - /** CohortsRange endOffset. */ - public endOffset: number; + /** MetricHeader type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); /** - * Creates a new CohortsRange instance using the specified properties. + * Creates a new MetricHeader instance using the specified properties. * @param [properties] Properties to set - * @returns CohortsRange instance + * @returns MetricHeader instance */ - public static create(properties?: google.analytics.data.v1alpha.ICohortsRange): google.analytics.data.v1alpha.CohortsRange; + public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. - * @param message CohortsRange message or plain object to encode + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * @param message MetricHeader message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortsRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CohortsRange message from the specified reader or buffer. + * Decodes a MetricHeader message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CohortsRange + * @returns MetricHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortsRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricHeader; /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CohortsRange + * @returns MetricHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortsRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricHeader; /** - * Verifies a CohortsRange message. + * Verifies a MetricHeader message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CohortsRange + * @returns MetricHeader */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortsRange; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. - * @param message CohortsRange + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * @param message MetricHeader * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.CohortsRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CohortsRange to JSON. + * Converts this MetricHeader to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CohortsRange + * Gets the default type url for MetricHeader * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CohortsRange { - - /** Granularity enum. */ - enum Granularity { - GRANULARITY_UNSPECIFIED = 0, - DAILY = 1, - WEEKLY = 2, - MONTHLY = 3 - } - } + /** Properties of a Row. */ + interface IRow { - /** Properties of a CohortReportSettings. */ - interface ICohortReportSettings { + /** Row dimensionValues */ + dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); - /** CohortReportSettings accumulate */ - accumulate?: (boolean|null); + /** Row metricValues */ + metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); } - /** Represents a CohortReportSettings. */ - class CohortReportSettings implements ICohortReportSettings { + /** Represents a Row. */ + class Row implements IRow { /** - * Constructs a new CohortReportSettings. + * Constructs a new Row. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ICohortReportSettings); + constructor(properties?: google.analytics.data.v1alpha.IRow); - /** CohortReportSettings accumulate. */ - public accumulate: boolean; + /** Row dimensionValues. */ + public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; + + /** Row metricValues. */ + public metricValues: google.analytics.data.v1alpha.IMetricValue[]; /** - * Creates a new CohortReportSettings instance using the specified properties. + * Creates a new Row instance using the specified properties. * @param [properties] Properties to set - * @returns CohortReportSettings instance + * @returns Row instance */ - public static create(properties?: google.analytics.data.v1alpha.ICohortReportSettings): google.analytics.data.v1alpha.CohortReportSettings; + public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. - * @param message CohortReportSettings message or plain object to encode + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ICohortReportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CohortReportSettings message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CohortReportSettings + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.CohortReportSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Row; /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CohortReportSettings + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.CohortReportSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Row; /** - * Verifies a CohortReportSettings message. + * Verifies a Row message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CohortReportSettings + * @returns Row */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.CohortReportSettings; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. - * @param message CohortReportSettings + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.CohortReportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CohortReportSettings to JSON. + * Converts this Row to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CohortReportSettings + * Gets the default type url for Row * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResponseMetaData. */ - interface IResponseMetaData { - - /** ResponseMetaData dataLossFromOtherRow */ - dataLossFromOtherRow?: (boolean|null); - - /** ResponseMetaData schemaRestrictionResponse */ - schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode */ - currencyCode?: (string|null); - - /** ResponseMetaData timeZone */ - timeZone?: (string|null); - - /** ResponseMetaData emptyReason */ - emptyReason?: (string|null); - - /** ResponseMetaData subjectToThresholding */ - subjectToThresholding?: (boolean|null); + /** Properties of a DimensionValue. */ + interface IDimensionValue { - /** ResponseMetaData samplingMetadatas */ - samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + /** DimensionValue value */ + value?: (string|null); } - /** Represents a ResponseMetaData. */ - class ResponseMetaData implements IResponseMetaData { + /** Represents a DimensionValue. */ + class DimensionValue implements IDimensionValue { /** - * Constructs a new ResponseMetaData. + * Constructs a new DimensionValue. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IResponseMetaData); - - /** ResponseMetaData dataLossFromOtherRow. */ - public dataLossFromOtherRow: boolean; - - /** ResponseMetaData schemaRestrictionResponse. */ - public schemaRestrictionResponse?: (google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null); - - /** ResponseMetaData currencyCode. */ - public currencyCode?: (string|null); - - /** ResponseMetaData timeZone. */ - public timeZone?: (string|null); - - /** ResponseMetaData emptyReason. */ - public emptyReason?: (string|null); + constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); - /** ResponseMetaData subjectToThresholding. */ - public subjectToThresholding?: (boolean|null); + /** DimensionValue value. */ + public value?: (string|null); - /** ResponseMetaData samplingMetadatas. */ - public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + /** DimensionValue oneValue. */ + public oneValue?: "value"; /** - * Creates a new ResponseMetaData instance using the specified properties. + * Creates a new DimensionValue instance using the specified properties. * @param [properties] Properties to set - * @returns ResponseMetaData instance + * @returns DimensionValue instance */ - public static create(properties?: google.analytics.data.v1alpha.IResponseMetaData): google.analytics.data.v1alpha.ResponseMetaData; + public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. - * @param message ResponseMetaData message or plain object to encode + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @param message DimensionValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IResponseMetaData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResponseMetaData message from the specified reader or buffer. + * Decodes a DimensionValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResponseMetaData + * @returns DimensionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionValue; /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResponseMetaData + * @returns DimensionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionValue; /** - * Verifies a ResponseMetaData message. + * Verifies a DimensionValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResponseMetaData + * @returns DimensionValue */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. - * @param message ResponseMetaData + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @param message DimensionValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResponseMetaData to JSON. + * Converts this DimensionValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResponseMetaData + * Gets the default type url for DimensionValue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResponseMetaData { - - /** Properties of a SchemaRestrictionResponse. */ - interface ISchemaRestrictionResponse { - - /** SchemaRestrictionResponse activeMetricRestrictions */ - activeMetricRestrictions?: (google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]|null); - } - - /** Represents a SchemaRestrictionResponse. */ - class SchemaRestrictionResponse implements ISchemaRestrictionResponse { - - /** - * Constructs a new SchemaRestrictionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse); - - /** SchemaRestrictionResponse activeMetricRestrictions. */ - public activeMetricRestrictions: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction[]; - - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaRestrictionResponse instance - */ - public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @param message SchemaRestrictionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Verifies a SchemaRestrictionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaRestrictionResponse - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse; - - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @param message SchemaRestrictionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaRestrictionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a MetricValue. */ + interface IMetricValue { - /** - * Gets the default type url for SchemaRestrictionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** MetricValue value */ + value?: (string|null); + } - namespace SchemaRestrictionResponse { + /** Represents a MetricValue. */ + class MetricValue implements IMetricValue { - /** Properties of an ActiveMetricRestriction. */ - interface IActiveMetricRestriction { + /** + * Constructs a new MetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IMetricValue); - /** ActiveMetricRestriction metricName */ - metricName?: (string|null); + /** MetricValue value. */ + public value?: (string|null); - /** ActiveMetricRestriction restrictedMetricTypes */ - restrictedMetricTypes?: (google.analytics.data.v1alpha.RestrictedMetricType[]|null); - } + /** MetricValue oneValue. */ + public oneValue?: "value"; - /** Represents an ActiveMetricRestriction. */ - class ActiveMetricRestriction implements IActiveMetricRestriction { + /** + * Creates a new MetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricValue instance + */ + public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; - /** - * Constructs a new ActiveMetricRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction); + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** ActiveMetricRestriction metricName. */ - public metricName?: (string|null); + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @param message MetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** ActiveMetricRestriction restrictedMetricTypes. */ - public restrictedMetricTypes: google.analytics.data.v1alpha.RestrictedMetricType[]; + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricValue; - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns ActiveMetricRestriction instance - */ - public static create(properties?: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricValue; - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a MetricValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @param message ActiveMetricRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @param message MetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + /** + * Converts this MetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies an ActiveMetricRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for MetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActiveMetricRestriction - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction; + /** Properties of a PropertyQuota. */ + interface IPropertyQuota { - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @param message ActiveMetricRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PropertyQuota tokensPerDay */ + tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); - /** - * Converts this ActiveMetricRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** PropertyQuota tokensPerHour */ + tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - /** - * Gets the default type url for ActiveMetricRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } + /** PropertyQuota concurrentRequests */ + concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); - /** Properties of a DimensionHeader. */ - interface IDimensionHeader { + /** PropertyQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); - /** DimensionHeader name */ - name?: (string|null); + /** PropertyQuota potentiallyThresholdedRequestsPerHour */ + potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); } - /** Represents a DimensionHeader. */ - class DimensionHeader implements IDimensionHeader { + /** Represents a PropertyQuota. */ + class PropertyQuota implements IPropertyQuota { /** - * Constructs a new DimensionHeader. + * Constructs a new PropertyQuota. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionHeader); + constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); - /** DimensionHeader name. */ - public name: string; + /** PropertyQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ + public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + + /** PropertyQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); /** - * Creates a new DimensionHeader instance using the specified properties. + * Creates a new PropertyQuota instance using the specified properties. * @param [properties] Properties to set - * @returns DimensionHeader instance + * @returns PropertyQuota instance */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionHeader): google.analytics.data.v1alpha.DimensionHeader; + public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. - * @param message DimensionHeader message or plain object to encode + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * @param message PropertyQuota message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DimensionHeader message from the specified reader or buffer. + * Decodes a PropertyQuota message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DimensionHeader + * @returns PropertyQuota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionHeader; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuota; /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DimensionHeader + * @returns PropertyQuota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionHeader; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuota; /** - * Verifies a DimensionHeader message. + * Verifies a PropertyQuota message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DimensionHeader + * @returns PropertyQuota */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionHeader; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. - * @param message DimensionHeader + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * @param message PropertyQuota * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.DimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DimensionHeader to JSON. + * Converts this PropertyQuota to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DimensionHeader + * Gets the default type url for PropertyQuota * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetricHeader. */ - interface IMetricHeader { + /** Properties of a QuotaStatus. */ + interface IQuotaStatus { - /** MetricHeader name */ - name?: (string|null); + /** QuotaStatus consumed */ + consumed?: (number|null); - /** MetricHeader type */ - type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); + /** QuotaStatus remaining */ + remaining?: (number|null); } - /** Represents a MetricHeader. */ - class MetricHeader implements IMetricHeader { + /** Represents a QuotaStatus. */ + class QuotaStatus implements IQuotaStatus { /** - * Constructs a new MetricHeader. + * Constructs a new QuotaStatus. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IMetricHeader); + constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); - /** MetricHeader name. */ - public name: string; + /** QuotaStatus consumed. */ + public consumed: number; - /** MetricHeader type. */ - public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); + /** QuotaStatus remaining. */ + public remaining: number; /** - * Creates a new MetricHeader instance using the specified properties. + * Creates a new QuotaStatus instance using the specified properties. * @param [properties] Properties to set - * @returns MetricHeader instance + * @returns QuotaStatus instance */ - public static create(properties?: google.analytics.data.v1alpha.IMetricHeader): google.analytics.data.v1alpha.MetricHeader; + public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. - * @param message MetricHeader message or plain object to encode + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * @param message QuotaStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricHeader message from the specified reader or buffer. + * Decodes a QuotaStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricHeader + * @returns QuotaStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricHeader; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QuotaStatus; /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricHeader + * @returns QuotaStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricHeader; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QuotaStatus; /** - * Verifies a MetricHeader message. + * Verifies a QuotaStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricHeader + * @returns QuotaStatus */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricHeader; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. - * @param message MetricHeader + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * @param message QuotaStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.MetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricHeader to JSON. + * Converts this QuotaStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetricHeader + * Gets the default type url for QuotaStatus * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Row. */ - interface IRow { + /** Properties of a FunnelBreakdown. */ + interface IFunnelBreakdown { - /** Row dimensionValues */ - dimensionValues?: (google.analytics.data.v1alpha.IDimensionValue[]|null); + /** FunnelBreakdown breakdownDimension */ + breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); - /** Row metricValues */ - metricValues?: (google.analytics.data.v1alpha.IMetricValue[]|null); + /** FunnelBreakdown limit */ + limit?: (number|Long|string|null); } - /** Represents a Row. */ - class Row implements IRow { + /** Represents a FunnelBreakdown. */ + class FunnelBreakdown implements IFunnelBreakdown { /** - * Constructs a new Row. + * Constructs a new FunnelBreakdown. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IRow); + constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); - /** Row dimensionValues. */ - public dimensionValues: google.analytics.data.v1alpha.IDimensionValue[]; + /** FunnelBreakdown breakdownDimension. */ + public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); - /** Row metricValues. */ - public metricValues: google.analytics.data.v1alpha.IMetricValue[]; + /** FunnelBreakdown limit. */ + public limit?: (number|Long|string|null); /** - * Creates a new Row instance using the specified properties. + * Creates a new FunnelBreakdown instance using the specified properties. * @param [properties] Properties to set - * @returns Row instance + * @returns FunnelBreakdown instance */ - public static create(properties?: google.analytics.data.v1alpha.IRow): google.analytics.data.v1alpha.Row; + public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * @param message FunnelBreakdown message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a FunnelBreakdown message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Row + * @returns FunnelBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Row; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelBreakdown; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Row + * @returns FunnelBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Row; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelBreakdown; /** - * Verifies a Row message. + * Verifies a FunnelBreakdown message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Row + * @returns FunnelBreakdown */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Row; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * @param message FunnelBreakdown * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Row to JSON. + * Converts this FunnelBreakdown to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Row + * Gets the default type url for FunnelBreakdown * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DimensionValue. */ - interface IDimensionValue { + /** Properties of a FunnelNextAction. */ + interface IFunnelNextAction { - /** DimensionValue value */ - value?: (string|null); + /** FunnelNextAction nextActionDimension */ + nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + + /** FunnelNextAction limit */ + limit?: (number|Long|string|null); } - /** Represents a DimensionValue. */ - class DimensionValue implements IDimensionValue { + /** Represents a FunnelNextAction. */ + class FunnelNextAction implements IFunnelNextAction { /** - * Constructs a new DimensionValue. + * Constructs a new FunnelNextAction. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IDimensionValue); + constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); - /** DimensionValue value. */ - public value?: (string|null); + /** FunnelNextAction nextActionDimension. */ + public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); - /** DimensionValue oneValue. */ - public oneValue?: "value"; + /** FunnelNextAction limit. */ + public limit?: (number|Long|string|null); /** - * Creates a new DimensionValue instance using the specified properties. + * Creates a new FunnelNextAction instance using the specified properties. * @param [properties] Properties to set - * @returns DimensionValue instance + * @returns FunnelNextAction instance */ - public static create(properties?: google.analytics.data.v1alpha.IDimensionValue): google.analytics.data.v1alpha.DimensionValue; + public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. - * @param message DimensionValue message or plain object to encode + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * @param message FunnelNextAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DimensionValue message from the specified reader or buffer. + * Decodes a FunnelNextAction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DimensionValue + * @returns FunnelNextAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelNextAction; /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DimensionValue + * @returns FunnelNextAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelNextAction; /** - * Verifies a DimensionValue message. + * Verifies a FunnelNextAction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DimensionValue + * @returns FunnelNextAction */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionValue; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. - * @param message DimensionValue + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * @param message FunnelNextAction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.DimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DimensionValue to JSON. + * Converts this FunnelNextAction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DimensionValue + * Gets the default type url for FunnelNextAction * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MetricValue. */ - interface IMetricValue { + /** Properties of a Funnel. */ + interface IFunnel { - /** MetricValue value */ - value?: (string|null); + /** Funnel isOpenFunnel */ + isOpenFunnel?: (boolean|null); + + /** Funnel steps */ + steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); } - /** Represents a MetricValue. */ - class MetricValue implements IMetricValue { + /** Represents a Funnel. */ + class Funnel implements IFunnel { /** - * Constructs a new MetricValue. + * Constructs a new Funnel. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IMetricValue); + constructor(properties?: google.analytics.data.v1alpha.IFunnel); - /** MetricValue value. */ - public value?: (string|null); + /** Funnel isOpenFunnel. */ + public isOpenFunnel: boolean; - /** MetricValue oneValue. */ - public oneValue?: "value"; + /** Funnel steps. */ + public steps: google.analytics.data.v1alpha.IFunnelStep[]; /** - * Creates a new MetricValue instance using the specified properties. + * Creates a new Funnel instance using the specified properties. * @param [properties] Properties to set - * @returns MetricValue instance + * @returns Funnel instance */ - public static create(properties?: google.analytics.data.v1alpha.IMetricValue): google.analytics.data.v1alpha.MetricValue; + public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. - * @param message MetricValue message or plain object to encode + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * @param message Funnel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricValue message from the specified reader or buffer. + * Decodes a Funnel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricValue + * @returns Funnel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Funnel; /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * Decodes a Funnel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricValue + * @returns Funnel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Funnel; /** - * Verifies a MetricValue message. + * Verifies a Funnel message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricValue + * @returns Funnel */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricValue; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. - * @param message MetricValue + * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * @param message Funnel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.MetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricValue to JSON. + * Converts this Funnel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MetricValue + * Gets the default type url for Funnel * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PropertyQuota. */ - interface IPropertyQuota { - - /** PropertyQuota tokensPerDay */ - tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour */ - tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** Properties of a FunnelStep. */ + interface IFunnelStep { - /** PropertyQuota concurrentRequests */ - concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep name */ + name?: (string|null); - /** PropertyQuota serverErrorsPerProjectPerHour */ - serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); - /** PropertyQuota potentiallyThresholdedRequestsPerHour */ - potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep withinDurationFromPriorStep */ + withinDurationFromPriorStep?: (google.protobuf.IDuration|null); - /** PropertyQuota tokensPerProjectPerHour */ - tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep filterExpression */ + filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); } - /** Represents a PropertyQuota. */ - class PropertyQuota implements IPropertyQuota { + /** Represents a FunnelStep. */ + class FunnelStep implements IFunnelStep { /** - * Constructs a new PropertyQuota. + * Constructs a new FunnelStep. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IPropertyQuota); - - /** PropertyQuota tokensPerDay. */ - public tokensPerDay?: (google.analytics.data.v1alpha.IQuotaStatus|null); - - /** PropertyQuota tokensPerHour. */ - public tokensPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); - /** PropertyQuota concurrentRequests. */ - public concurrentRequests?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep name. */ + public name: string; - /** PropertyQuota serverErrorsPerProjectPerHour. */ - public serverErrorsPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; - /** PropertyQuota potentiallyThresholdedRequestsPerHour. */ - public potentiallyThresholdedRequestsPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep withinDurationFromPriorStep. */ + public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); - /** PropertyQuota tokensPerProjectPerHour. */ - public tokensPerProjectPerHour?: (google.analytics.data.v1alpha.IQuotaStatus|null); + /** FunnelStep filterExpression. */ + public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); /** - * Creates a new PropertyQuota instance using the specified properties. + * Creates a new FunnelStep instance using the specified properties. * @param [properties] Properties to set - * @returns PropertyQuota instance + * @returns FunnelStep instance */ - public static create(properties?: google.analytics.data.v1alpha.IPropertyQuota): google.analytics.data.v1alpha.PropertyQuota; + public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. - * @param message PropertyQuota message or plain object to encode + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * @param message FunnelStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IPropertyQuota, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PropertyQuota message from the specified reader or buffer. + * Decodes a FunnelStep message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PropertyQuota + * @returns FunnelStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.PropertyQuota; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelStep; /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PropertyQuota + * @returns FunnelStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.PropertyQuota; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelStep; /** - * Verifies a PropertyQuota message. + * Verifies a FunnelStep message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PropertyQuota + * @returns FunnelStep */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.PropertyQuota; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. - * @param message PropertyQuota + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * @param message FunnelStep * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.PropertyQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PropertyQuota to JSON. + * Converts this FunnelStep to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PropertyQuota + * Gets the default type url for FunnelStep * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a QuotaStatus. */ - interface IQuotaStatus { + /** Properties of a FunnelSubReport. */ + interface IFunnelSubReport { - /** QuotaStatus consumed */ - consumed?: (number|null); + /** FunnelSubReport dimensionHeaders */ + dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); - /** QuotaStatus remaining */ - remaining?: (number|null); + /** FunnelSubReport metricHeaders */ + metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + + /** FunnelSubReport rows */ + rows?: (google.analytics.data.v1alpha.IRow[]|null); + + /** FunnelSubReport metadata */ + metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); } - /** Represents a QuotaStatus. */ - class QuotaStatus implements IQuotaStatus { + /** Represents a FunnelSubReport. */ + class FunnelSubReport implements IFunnelSubReport { /** - * Constructs a new QuotaStatus. + * Constructs a new FunnelSubReport. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IQuotaStatus); + constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); - /** QuotaStatus consumed. */ - public consumed: number; + /** FunnelSubReport dimensionHeaders. */ + public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; - /** QuotaStatus remaining. */ - public remaining: number; + /** FunnelSubReport metricHeaders. */ + public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + + /** FunnelSubReport rows. */ + public rows: google.analytics.data.v1alpha.IRow[]; + + /** FunnelSubReport metadata. */ + public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); /** - * Creates a new QuotaStatus instance using the specified properties. + * Creates a new FunnelSubReport instance using the specified properties. * @param [properties] Properties to set - * @returns QuotaStatus instance + * @returns FunnelSubReport instance */ - public static create(properties?: google.analytics.data.v1alpha.IQuotaStatus): google.analytics.data.v1alpha.QuotaStatus; + public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. - * @param message QuotaStatus message or plain object to encode + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * @param message FunnelSubReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QuotaStatus message from the specified reader or buffer. + * Decodes a FunnelSubReport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QuotaStatus + * @returns FunnelSubReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.QuotaStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelSubReport; /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QuotaStatus + * @returns FunnelSubReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.QuotaStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelSubReport; /** - * Verifies a QuotaStatus message. + * Verifies a FunnelSubReport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QuotaStatus + * @returns FunnelSubReport */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.QuotaStatus; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. - * @param message QuotaStatus + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * @param message FunnelSubReport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.QuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QuotaStatus to JSON. + * Converts this FunnelSubReport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QuotaStatus + * Gets the default type url for FunnelSubReport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelBreakdown. */ - interface IFunnelBreakdown { + /** Properties of a UserSegment. */ + interface IUserSegment { - /** FunnelBreakdown breakdownDimension */ - breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + /** UserSegment userInclusionCriteria */ + userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - /** FunnelBreakdown limit */ - limit?: (number|Long|string|null); + /** UserSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); } - /** Represents a FunnelBreakdown. */ - class FunnelBreakdown implements IFunnelBreakdown { + /** Represents a UserSegment. */ + class UserSegment implements IUserSegment { /** - * Constructs a new FunnelBreakdown. + * Constructs a new UserSegment. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelBreakdown); + constructor(properties?: google.analytics.data.v1alpha.IUserSegment); - /** FunnelBreakdown breakdownDimension. */ - public breakdownDimension?: (google.analytics.data.v1alpha.IDimension|null); + /** UserSegment userInclusionCriteria. */ + public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); - /** FunnelBreakdown limit. */ - public limit?: (number|Long|string|null); + /** UserSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); /** - * Creates a new FunnelBreakdown instance using the specified properties. + * Creates a new UserSegment instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelBreakdown instance + * @returns UserSegment instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelBreakdown): google.analytics.data.v1alpha.FunnelBreakdown; + public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; /** - * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @param message FunnelBreakdown message or plain object to encode + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. - * @param message FunnelBreakdown message or plain object to encode + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * @param message UserSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelBreakdown, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelBreakdown message from the specified reader or buffer. + * Decodes a UserSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelBreakdown + * @returns UserSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelBreakdown; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegment; /** - * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * Decodes a UserSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelBreakdown + * @returns UserSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelBreakdown; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegment; /** - * Verifies a FunnelBreakdown message. + * Verifies a UserSegment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelBreakdown + * @returns UserSegment */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelBreakdown; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; /** - * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. - * @param message FunnelBreakdown + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * @param message UserSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelBreakdown, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelBreakdown to JSON. + * Converts this UserSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelBreakdown + * Gets the default type url for UserSegment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelNextAction. */ - interface IFunnelNextAction { + /** Properties of a UserSegmentCriteria. */ + interface IUserSegmentCriteria { - /** FunnelNextAction nextActionDimension */ - nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + /** UserSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); - /** FunnelNextAction limit */ - limit?: (number|Long|string|null); + /** UserSegmentCriteria andSequenceGroups */ + andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); } - /** Represents a FunnelNextAction. */ - class FunnelNextAction implements IFunnelNextAction { + /** Represents a UserSegmentCriteria. */ + class UserSegmentCriteria implements IUserSegmentCriteria { /** - * Constructs a new FunnelNextAction. + * Constructs a new UserSegmentCriteria. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelNextAction); + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); - /** FunnelNextAction nextActionDimension. */ - public nextActionDimension?: (google.analytics.data.v1alpha.IDimension|null); + /** UserSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; - /** FunnelNextAction limit. */ - public limit?: (number|Long|string|null); + /** UserSegmentCriteria andSequenceGroups. */ + public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; /** - * Creates a new FunnelNextAction instance using the specified properties. + * Creates a new UserSegmentCriteria instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelNextAction instance + * @returns UserSegmentCriteria instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelNextAction): google.analytics.data.v1alpha.FunnelNextAction; + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; /** - * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @param message FunnelNextAction message or plain object to encode + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. - * @param message FunnelNextAction message or plain object to encode + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * @param message UserSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelNextAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelNextAction message from the specified reader or buffer. + * Decodes a UserSegmentCriteria message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelNextAction + * @returns UserSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelNextAction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentCriteria; /** - * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelNextAction + * @returns UserSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelNextAction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentCriteria; /** - * Verifies a FunnelNextAction message. + * Verifies a UserSegmentCriteria message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelNextAction + * @returns UserSegmentCriteria */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelNextAction; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; /** - * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. - * @param message FunnelNextAction + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * @param message UserSegmentCriteria * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelNextAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelNextAction to JSON. + * Converts this UserSegmentCriteria to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelNextAction + * Gets the default type url for UserSegmentCriteria * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Funnel. */ - interface IFunnel { + /** UserCriteriaScoping enum. */ + enum UserCriteriaScoping { + USER_CRITERIA_SCOPING_UNSPECIFIED = 0, + USER_CRITERIA_WITHIN_SAME_EVENT = 1, + USER_CRITERIA_WITHIN_SAME_SESSION = 2, + USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 + } - /** Funnel isOpenFunnel */ - isOpenFunnel?: (boolean|null); + /** Properties of a UserSegmentConditionGroup. */ + interface IUserSegmentConditionGroup { - /** Funnel steps */ - steps?: (google.analytics.data.v1alpha.IFunnelStep[]|null); + /** UserSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + + /** UserSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); } - /** Represents a Funnel. */ - class Funnel implements IFunnel { + /** Represents a UserSegmentConditionGroup. */ + class UserSegmentConditionGroup implements IUserSegmentConditionGroup { /** - * Constructs a new Funnel. + * Constructs a new UserSegmentConditionGroup. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnel); + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); - /** Funnel isOpenFunnel. */ - public isOpenFunnel: boolean; + /** UserSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - /** Funnel steps. */ - public steps: google.analytics.data.v1alpha.IFunnelStep[]; + /** UserSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); /** - * Creates a new Funnel instance using the specified properties. + * Creates a new UserSegmentConditionGroup instance using the specified properties. * @param [properties] Properties to set - * @returns Funnel instance + * @returns UserSegmentConditionGroup instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnel): google.analytics.data.v1alpha.Funnel; + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; /** - * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @param message Funnel message or plain object to encode + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. - * @param message Funnel message or plain object to encode + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * @param message UserSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Funnel message from the specified reader or buffer. + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Funnel + * @returns UserSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Funnel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentConditionGroup; /** - * Decodes a Funnel message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Funnel + * @returns UserSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Funnel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentConditionGroup; /** - * Verifies a Funnel message. + * Verifies a UserSegmentConditionGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Funnel + * @returns UserSegmentConditionGroup */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Funnel; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; /** - * Creates a plain object from a Funnel message. Also converts values to other types if specified. - * @param message Funnel + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * @param message UserSegmentConditionGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Funnel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Funnel to JSON. + * Converts this UserSegmentConditionGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Funnel + * Gets the default type url for UserSegmentConditionGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelStep. */ - interface IFunnelStep { - - /** FunnelStep name */ - name?: (string|null); + /** Properties of a UserSegmentSequenceGroup. */ + interface IUserSegmentSequenceGroup { - /** FunnelStep isDirectlyFollowedBy */ - isDirectlyFollowedBy?: (boolean|null); + /** UserSegmentSequenceGroup sequenceScoping */ + sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); - /** FunnelStep withinDurationFromPriorStep */ - withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + /** UserSegmentSequenceGroup sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); - /** FunnelStep filterExpression */ - filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + /** UserSegmentSequenceGroup userSequenceSteps */ + userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); } - /** Represents a FunnelStep. */ - class FunnelStep implements IFunnelStep { + /** Represents a UserSegmentSequenceGroup. */ + class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { /** - * Constructs a new FunnelStep. + * Constructs a new UserSegmentSequenceGroup. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelStep); - - /** FunnelStep name. */ - public name: string; + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); - /** FunnelStep isDirectlyFollowedBy. */ - public isDirectlyFollowedBy: boolean; + /** UserSegmentSequenceGroup sequenceScoping. */ + public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - /** FunnelStep withinDurationFromPriorStep. */ - public withinDurationFromPriorStep?: (google.protobuf.IDuration|null); + /** UserSegmentSequenceGroup sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); - /** FunnelStep filterExpression. */ - public filterExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + /** UserSegmentSequenceGroup userSequenceSteps. */ + public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; /** - * Creates a new FunnelStep instance using the specified properties. + * Creates a new UserSegmentSequenceGroup instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelStep instance + * @returns UserSegmentSequenceGroup instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelStep): google.analytics.data.v1alpha.FunnelStep; + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; /** - * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @param message FunnelStep message or plain object to encode + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. - * @param message FunnelStep message or plain object to encode + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * @param message UserSegmentSequenceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelStep message from the specified reader or buffer. + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelStep + * @returns UserSegmentSequenceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelStep; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentSequenceGroup; /** - * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelStep + * @returns UserSegmentSequenceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelStep; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentSequenceGroup; /** - * Verifies a FunnelStep message. + * Verifies a UserSegmentSequenceGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelStep + * @returns UserSegmentSequenceGroup */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelStep; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; /** - * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. - * @param message FunnelStep + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * @param message UserSegmentSequenceGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelStep to JSON. + * Converts this UserSegmentSequenceGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelStep + * Gets the default type url for UserSegmentSequenceGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelSubReport. */ - interface IFunnelSubReport { - - /** FunnelSubReport dimensionHeaders */ - dimensionHeaders?: (google.analytics.data.v1alpha.IDimensionHeader[]|null); + /** Properties of a UserSequenceStep. */ + interface IUserSequenceStep { - /** FunnelSubReport metricHeaders */ - metricHeaders?: (google.analytics.data.v1alpha.IMetricHeader[]|null); + /** UserSequenceStep isDirectlyFollowedBy */ + isDirectlyFollowedBy?: (boolean|null); - /** FunnelSubReport rows */ - rows?: (google.analytics.data.v1alpha.IRow[]|null); + /** UserSequenceStep stepScoping */ + stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); - /** FunnelSubReport metadata */ - metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + /** UserSequenceStep segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); } - /** Represents a FunnelSubReport. */ - class FunnelSubReport implements IFunnelSubReport { + /** Represents a UserSequenceStep. */ + class UserSequenceStep implements IUserSequenceStep { /** - * Constructs a new FunnelSubReport. + * Constructs a new UserSequenceStep. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelSubReport); - - /** FunnelSubReport dimensionHeaders. */ - public dimensionHeaders: google.analytics.data.v1alpha.IDimensionHeader[]; + constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); - /** FunnelSubReport metricHeaders. */ - public metricHeaders: google.analytics.data.v1alpha.IMetricHeader[]; + /** UserSequenceStep isDirectlyFollowedBy. */ + public isDirectlyFollowedBy: boolean; - /** FunnelSubReport rows. */ - public rows: google.analytics.data.v1alpha.IRow[]; + /** UserSequenceStep stepScoping. */ + public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); - /** FunnelSubReport metadata. */ - public metadata?: (google.analytics.data.v1alpha.IFunnelResponseMetadata|null); + /** UserSequenceStep segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); /** - * Creates a new FunnelSubReport instance using the specified properties. + * Creates a new UserSequenceStep instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelSubReport instance + * @returns UserSequenceStep instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelSubReport): google.analytics.data.v1alpha.FunnelSubReport; + public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; /** - * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @param message FunnelSubReport message or plain object to encode + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. - * @param message FunnelSubReport message or plain object to encode + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * @param message UserSequenceStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelSubReport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelSubReport message from the specified reader or buffer. + * Decodes a UserSequenceStep message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelSubReport + * @returns UserSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelSubReport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSequenceStep; /** - * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelSubReport + * @returns UserSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelSubReport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSequenceStep; /** - * Verifies a FunnelSubReport message. + * Verifies a UserSequenceStep message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelSubReport + * @returns UserSequenceStep */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelSubReport; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; /** - * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. - * @param message FunnelSubReport + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * @param message UserSequenceStep * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelSubReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelSubReport to JSON. + * Converts this UserSequenceStep to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelSubReport + * Gets the default type url for UserSequenceStep * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserSegment. */ - interface IUserSegment { + /** Properties of a UserSegmentExclusion. */ + interface IUserSegmentExclusion { - /** UserSegment userInclusionCriteria */ - userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + /** UserSegmentExclusion userExclusionDuration */ + userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); - /** UserSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + /** UserSegmentExclusion userExclusionCriteria */ + userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); } - /** Represents a UserSegment. */ - class UserSegment implements IUserSegment { + /** Represents a UserSegmentExclusion. */ + class UserSegmentExclusion implements IUserSegmentExclusion { /** - * Constructs a new UserSegment. + * Constructs a new UserSegmentExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegment); + constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); - /** UserSegment userInclusionCriteria. */ - public userInclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + /** UserSegmentExclusion userExclusionDuration. */ + public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); - /** UserSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.IUserSegmentExclusion|null); + /** UserSegmentExclusion userExclusionCriteria. */ + public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); /** - * Creates a new UserSegment instance using the specified properties. + * Creates a new UserSegmentExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns UserSegment instance + * @returns UserSegmentExclusion instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegment): google.analytics.data.v1alpha.UserSegment; + public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; /** - * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @param message UserSegment message or plain object to encode + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. - * @param message UserSegment message or plain object to encode + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * @param message UserSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSegment message from the specified reader or buffer. + * Decodes a UserSegmentExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSegment + * @returns UserSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentExclusion; /** - * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSegment + * @returns UserSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentExclusion; /** - * Verifies a UserSegment message. + * Verifies a UserSegmentExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSegment + * @returns UserSegmentExclusion */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegment; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; /** - * Creates a plain object from a UserSegment message. Also converts values to other types if specified. - * @param message UserSegment + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * @param message UserSegmentExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSegment to JSON. + * Converts this UserSegmentExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSegment + * Gets the default type url for UserSegmentExclusion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserSegmentCriteria. */ - interface IUserSegmentCriteria { + /** UserExclusionDuration enum. */ + enum UserExclusionDuration { + USER_EXCLUSION_DURATION_UNSPECIFIED = 0, + USER_EXCLUSION_TEMPORARY = 1, + USER_EXCLUSION_PERMANENT = 2 + } - /** UserSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.IUserSegmentConditionGroup[]|null); + /** Properties of a SessionSegment. */ + interface ISessionSegment { - /** UserSegmentCriteria andSequenceGroups */ - andSequenceGroups?: (google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]|null); + /** SessionSegment sessionInclusionCriteria */ + sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + + /** SessionSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); } - /** Represents a UserSegmentCriteria. */ - class UserSegmentCriteria implements IUserSegmentCriteria { + /** Represents a SessionSegment. */ + class SessionSegment implements ISessionSegment { /** - * Constructs a new UserSegmentCriteria. + * Constructs a new SessionSegment. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria); + constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); - /** UserSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.IUserSegmentConditionGroup[]; + /** SessionSegment sessionInclusionCriteria. */ + public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); - /** UserSegmentCriteria andSequenceGroups. */ - public andSequenceGroups: google.analytics.data.v1alpha.IUserSegmentSequenceGroup[]; + /** SessionSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); /** - * Creates a new UserSegmentCriteria instance using the specified properties. + * Creates a new SessionSegment instance using the specified properties. * @param [properties] Properties to set - * @returns UserSegmentCriteria instance + * @returns SessionSegment instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentCriteria): google.analytics.data.v1alpha.UserSegmentCriteria; + public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; /** - * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @param message UserSegmentCriteria message or plain object to encode + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. - * @param message UserSegmentCriteria message or plain object to encode + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * @param message SessionSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * Decodes a SessionSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSegmentCriteria + * @returns SessionSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentCriteria; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegment; /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSegmentCriteria + * @returns SessionSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentCriteria; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegment; /** - * Verifies a UserSegmentCriteria message. + * Verifies a SessionSegment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSegmentCriteria + * @returns SessionSegment */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentCriteria; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; /** - * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. - * @param message UserSegmentCriteria + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * @param message SessionSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSegmentCriteria to JSON. + * Converts this SessionSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSegmentCriteria + * Gets the default type url for SessionSegment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** UserCriteriaScoping enum. */ - enum UserCriteriaScoping { - USER_CRITERIA_SCOPING_UNSPECIFIED = 0, - USER_CRITERIA_WITHIN_SAME_EVENT = 1, - USER_CRITERIA_WITHIN_SAME_SESSION = 2, - USER_CRITERIA_ACROSS_ALL_SESSIONS = 3 - } - - /** Properties of a UserSegmentConditionGroup. */ - interface IUserSegmentConditionGroup { - - /** UserSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + /** Properties of a SessionSegmentCriteria. */ + interface ISessionSegmentCriteria { - /** UserSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SessionSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); } - /** Represents a UserSegmentConditionGroup. */ - class UserSegmentConditionGroup implements IUserSegmentConditionGroup { + /** Represents a SessionSegmentCriteria. */ + class SessionSegmentCriteria implements ISessionSegmentCriteria { /** - * Constructs a new UserSegmentConditionGroup. + * Constructs a new SessionSegmentCriteria. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup); - - /** UserSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); - /** UserSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SessionSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; /** - * Creates a new UserSegmentConditionGroup instance using the specified properties. + * Creates a new SessionSegmentCriteria instance using the specified properties. * @param [properties] Properties to set - * @returns UserSegmentConditionGroup instance + * @returns SessionSegmentCriteria instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentConditionGroup): google.analytics.data.v1alpha.UserSegmentConditionGroup; + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; /** - * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @param message UserSegmentConditionGroup message or plain object to encode + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. - * @param message UserSegmentConditionGroup message or plain object to encode + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * @param message SessionSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSegmentConditionGroup + * @returns SessionSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentConditionGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentCriteria; /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSegmentConditionGroup + * @returns SessionSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentConditionGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentCriteria; /** - * Verifies a UserSegmentConditionGroup message. + * Verifies a SessionSegmentCriteria message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSegmentConditionGroup + * @returns SessionSegmentCriteria */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentConditionGroup; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; /** - * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. - * @param message UserSegmentConditionGroup + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * @param message SessionSegmentCriteria * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSegmentConditionGroup to JSON. + * Converts this SessionSegmentCriteria to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSegmentConditionGroup + * Gets the default type url for SessionSegmentCriteria * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserSegmentSequenceGroup. */ - interface IUserSegmentSequenceGroup { + /** SessionCriteriaScoping enum. */ + enum SessionCriteriaScoping { + SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, + SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, + SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 + } - /** UserSegmentSequenceGroup sequenceScoping */ - sequenceScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + /** Properties of a SessionSegmentConditionGroup. */ + interface ISessionSegmentConditionGroup { - /** UserSegmentSequenceGroup sequenceMaximumDuration */ - sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** SessionSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); - /** UserSegmentSequenceGroup userSequenceSteps */ - userSequenceSteps?: (google.analytics.data.v1alpha.IUserSequenceStep[]|null); + /** SessionSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); } - /** Represents a UserSegmentSequenceGroup. */ - class UserSegmentSequenceGroup implements IUserSegmentSequenceGroup { + /** Represents a SessionSegmentConditionGroup. */ + class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { /** - * Constructs a new UserSegmentSequenceGroup. + * Constructs a new SessionSegmentConditionGroup. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup); - - /** UserSegmentSequenceGroup sequenceScoping. */ - public sequenceScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); - /** UserSegmentSequenceGroup sequenceMaximumDuration. */ - public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** SessionSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); - /** UserSegmentSequenceGroup userSequenceSteps. */ - public userSequenceSteps: google.analytics.data.v1alpha.IUserSequenceStep[]; + /** SessionSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); /** - * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * Creates a new SessionSegmentConditionGroup instance using the specified properties. * @param [properties] Properties to set - * @returns UserSegmentSequenceGroup instance + * @returns SessionSegmentConditionGroup instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentSequenceGroup): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; /** - * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @param message UserSegmentSequenceGroup message or plain object to encode + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. - * @param message UserSegmentSequenceGroup message or plain object to encode + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * @param message SessionSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentSequenceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSegmentSequenceGroup + * @returns SessionSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentConditionGroup; /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSegmentSequenceGroup + * @returns SessionSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentConditionGroup; /** - * Verifies a UserSegmentSequenceGroup message. + * Verifies a SessionSegmentConditionGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSegmentSequenceGroup + * @returns SessionSegmentConditionGroup */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentSequenceGroup; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; /** - * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. - * @param message UserSegmentSequenceGroup + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * @param message SessionSegmentConditionGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentSequenceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSegmentSequenceGroup to JSON. + * Converts this SessionSegmentConditionGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSegmentSequenceGroup + * Gets the default type url for SessionSegmentConditionGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserSequenceStep. */ - interface IUserSequenceStep { - - /** UserSequenceStep isDirectlyFollowedBy */ - isDirectlyFollowedBy?: (boolean|null); + /** Properties of a SessionSegmentExclusion. */ + interface ISessionSegmentExclusion { - /** UserSequenceStep stepScoping */ - stepScoping?: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping|null); + /** SessionSegmentExclusion sessionExclusionDuration */ + sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); - /** UserSequenceStep segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SessionSegmentExclusion sessionExclusionCriteria */ + sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); } - /** Represents a UserSequenceStep. */ - class UserSequenceStep implements IUserSequenceStep { + /** Represents a SessionSegmentExclusion. */ + class SessionSegmentExclusion implements ISessionSegmentExclusion { /** - * Constructs a new UserSequenceStep. + * Constructs a new SessionSegmentExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSequenceStep); - - /** UserSequenceStep isDirectlyFollowedBy. */ - public isDirectlyFollowedBy: boolean; + constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); - /** UserSequenceStep stepScoping. */ - public stepScoping: (google.analytics.data.v1alpha.UserCriteriaScoping|keyof typeof google.analytics.data.v1alpha.UserCriteriaScoping); + /** SessionSegmentExclusion sessionExclusionDuration. */ + public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); - /** UserSequenceStep segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SessionSegmentExclusion sessionExclusionCriteria. */ + public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); /** - * Creates a new UserSequenceStep instance using the specified properties. + * Creates a new SessionSegmentExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns UserSequenceStep instance + * @returns SessionSegmentExclusion instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSequenceStep): google.analytics.data.v1alpha.UserSequenceStep; + public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; /** - * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @param message UserSequenceStep message or plain object to encode + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. - * @param message UserSequenceStep message or plain object to encode + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * @param message SessionSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSequenceStep message from the specified reader or buffer. + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSequenceStep + * @returns SessionSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSequenceStep; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentExclusion; /** - * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSequenceStep + * @returns SessionSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSequenceStep; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentExclusion; /** - * Verifies a UserSequenceStep message. + * Verifies a SessionSegmentExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSequenceStep + * @returns SessionSegmentExclusion */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSequenceStep; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; /** - * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. - * @param message UserSequenceStep + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * @param message SessionSegmentExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSequenceStep to JSON. + * Converts this SessionSegmentExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSequenceStep + * Gets the default type url for SessionSegmentExclusion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserSegmentExclusion. */ - interface IUserSegmentExclusion { + /** SessionExclusionDuration enum. */ + enum SessionExclusionDuration { + SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, + SESSION_EXCLUSION_TEMPORARY = 1, + SESSION_EXCLUSION_PERMANENT = 2 + } + + /** Properties of an EventSegment. */ + interface IEventSegment { - /** UserSegmentExclusion userExclusionDuration */ - userExclusionDuration?: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration|null); + /** EventSegment eventInclusionCriteria */ + eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - /** UserSegmentExclusion userExclusionCriteria */ - userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + /** EventSegment exclusion */ + exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); } - /** Represents a UserSegmentExclusion. */ - class UserSegmentExclusion implements IUserSegmentExclusion { + /** Represents an EventSegment. */ + class EventSegment implements IEventSegment { /** - * Constructs a new UserSegmentExclusion. + * Constructs a new EventSegment. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion); + constructor(properties?: google.analytics.data.v1alpha.IEventSegment); - /** UserSegmentExclusion userExclusionDuration. */ - public userExclusionDuration: (google.analytics.data.v1alpha.UserExclusionDuration|keyof typeof google.analytics.data.v1alpha.UserExclusionDuration); + /** EventSegment eventInclusionCriteria. */ + public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); - /** UserSegmentExclusion userExclusionCriteria. */ - public userExclusionCriteria?: (google.analytics.data.v1alpha.IUserSegmentCriteria|null); + /** EventSegment exclusion. */ + public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); /** - * Creates a new UserSegmentExclusion instance using the specified properties. + * Creates a new EventSegment instance using the specified properties. * @param [properties] Properties to set - * @returns UserSegmentExclusion instance + * @returns EventSegment instance */ - public static create(properties?: google.analytics.data.v1alpha.IUserSegmentExclusion): google.analytics.data.v1alpha.UserSegmentExclusion; + public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; /** - * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @param message UserSegmentExclusion message or plain object to encode + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. - * @param message UserSegmentExclusion message or plain object to encode + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * @param message EventSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IUserSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * Decodes an EventSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserSegmentExclusion + * @returns EventSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.UserSegmentExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegment; /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes an EventSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserSegmentExclusion + * @returns EventSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.UserSegmentExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegment; /** - * Verifies a UserSegmentExclusion message. + * Verifies an EventSegment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserSegmentExclusion + * @returns EventSegment */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.UserSegmentExclusion; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; /** - * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. - * @param message UserSegmentExclusion + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * @param message EventSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.UserSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserSegmentExclusion to JSON. + * Converts this EventSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserSegmentExclusion + * Gets the default type url for EventSegment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** UserExclusionDuration enum. */ - enum UserExclusionDuration { - USER_EXCLUSION_DURATION_UNSPECIFIED = 0, - USER_EXCLUSION_TEMPORARY = 1, - USER_EXCLUSION_PERMANENT = 2 - } - - /** Properties of a SessionSegment. */ - interface ISessionSegment { - - /** SessionSegment sessionInclusionCriteria */ - sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + /** Properties of an EventSegmentCriteria. */ + interface IEventSegmentCriteria { - /** SessionSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + /** EventSegmentCriteria andConditionGroups */ + andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); } - /** Represents a SessionSegment. */ - class SessionSegment implements ISessionSegment { + /** Represents an EventSegmentCriteria. */ + class EventSegmentCriteria implements IEventSegmentCriteria { /** - * Constructs a new SessionSegment. + * Constructs a new EventSegmentCriteria. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegment); - - /** SessionSegment sessionInclusionCriteria. */ - public sessionInclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); - /** SessionSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.ISessionSegmentExclusion|null); + /** EventSegmentCriteria andConditionGroups. */ + public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; /** - * Creates a new SessionSegment instance using the specified properties. + * Creates a new EventSegmentCriteria instance using the specified properties. * @param [properties] Properties to set - * @returns SessionSegment instance + * @returns EventSegmentCriteria instance */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegment): google.analytics.data.v1alpha.SessionSegment; + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; /** - * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @param message SessionSegment message or plain object to encode + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. - * @param message SessionSegment message or plain object to encode + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * @param message EventSegmentCriteria message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionSegment message from the specified reader or buffer. + * Decodes an EventSegmentCriteria message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionSegment + * @returns EventSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentCriteria; /** - * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionSegment + * @returns EventSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentCriteria; /** - * Verifies a SessionSegment message. + * Verifies an EventSegmentCriteria message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionSegment + * @returns EventSegmentCriteria */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegment; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; /** - * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. - * @param message SessionSegment + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * @param message EventSegmentCriteria * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionSegment to JSON. + * Converts this EventSegmentCriteria to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionSegment + * Gets the default type url for EventSegmentCriteria * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SessionSegmentCriteria. */ - interface ISessionSegmentCriteria { + /** EventCriteriaScoping enum. */ + enum EventCriteriaScoping { + EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, + EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 + } - /** SessionSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]|null); + /** Properties of an EventSegmentConditionGroup. */ + interface IEventSegmentConditionGroup { + + /** EventSegmentConditionGroup conditionScoping */ + conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); + + /** EventSegmentConditionGroup segmentFilterExpression */ + segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); } - /** Represents a SessionSegmentCriteria. */ - class SessionSegmentCriteria implements ISessionSegmentCriteria { + /** Represents an EventSegmentConditionGroup. */ + class EventSegmentConditionGroup implements IEventSegmentConditionGroup { /** - * Constructs a new SessionSegmentCriteria. + * Constructs a new EventSegmentConditionGroup. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria); + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); - /** SessionSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.ISessionSegmentConditionGroup[]; + /** EventSegmentConditionGroup conditionScoping. */ + public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); + + /** EventSegmentConditionGroup segmentFilterExpression. */ + public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); /** - * Creates a new SessionSegmentCriteria instance using the specified properties. + * Creates a new EventSegmentConditionGroup instance using the specified properties. * @param [properties] Properties to set - * @returns SessionSegmentCriteria instance + * @returns EventSegmentConditionGroup instance */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentCriteria): google.analytics.data.v1alpha.SessionSegmentCriteria; + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; /** - * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @param message SessionSegmentCriteria message or plain object to encode + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. - * @param message SessionSegmentCriteria message or plain object to encode + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * @param message EventSegmentConditionGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionSegmentCriteria + * @returns EventSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentCriteria; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentConditionGroup; /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionSegmentCriteria + * @returns EventSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentCriteria; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentConditionGroup; /** - * Verifies a SessionSegmentCriteria message. + * Verifies an EventSegmentConditionGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionSegmentCriteria + * @returns EventSegmentConditionGroup */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentCriteria; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; /** - * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. - * @param message SessionSegmentCriteria + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * @param message EventSegmentConditionGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionSegmentCriteria to JSON. + * Converts this EventSegmentConditionGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionSegmentCriteria + * Gets the default type url for EventSegmentConditionGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** SessionCriteriaScoping enum. */ - enum SessionCriteriaScoping { - SESSION_CRITERIA_SCOPING_UNSPECIFIED = 0, - SESSION_CRITERIA_WITHIN_SAME_EVENT = 1, - SESSION_CRITERIA_WITHIN_SAME_SESSION = 2 - } - - /** Properties of a SessionSegmentConditionGroup. */ - interface ISessionSegmentConditionGroup { - - /** SessionSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping|null); + /** Properties of an EventSegmentExclusion. */ + interface IEventSegmentExclusion { - /** SessionSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** EventSegmentExclusion eventExclusionDuration */ + eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); + + /** EventSegmentExclusion eventExclusionCriteria */ + eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); } - /** Represents a SessionSegmentConditionGroup. */ - class SessionSegmentConditionGroup implements ISessionSegmentConditionGroup { + /** Represents an EventSegmentExclusion. */ + class EventSegmentExclusion implements IEventSegmentExclusion { /** - * Constructs a new SessionSegmentConditionGroup. + * Constructs a new EventSegmentExclusion. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup); + constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); - /** SessionSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.SessionCriteriaScoping|keyof typeof google.analytics.data.v1alpha.SessionCriteriaScoping); + /** EventSegmentExclusion eventExclusionDuration. */ + public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); - /** SessionSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** EventSegmentExclusion eventExclusionCriteria. */ + public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); /** - * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * Creates a new EventSegmentExclusion instance using the specified properties. * @param [properties] Properties to set - * @returns SessionSegmentConditionGroup instance + * @returns EventSegmentExclusion instance */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentConditionGroup): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; /** - * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @param message SessionSegmentConditionGroup message or plain object to encode + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. - * @param message SessionSegmentConditionGroup message or plain object to encode + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * @param message EventSegmentExclusion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * Decodes an EventSegmentExclusion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionSegmentConditionGroup + * @returns EventSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentExclusion; /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionSegmentConditionGroup + * @returns EventSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentExclusion; /** - * Verifies a SessionSegmentConditionGroup message. + * Verifies an EventSegmentExclusion message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionSegmentConditionGroup + * @returns EventSegmentExclusion */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentConditionGroup; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; /** - * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. - * @param message SessionSegmentConditionGroup + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * @param message EventSegmentExclusion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionSegmentConditionGroup to JSON. + * Converts this EventSegmentExclusion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionSegmentConditionGroup + * Gets the default type url for EventSegmentExclusion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SessionSegmentExclusion. */ - interface ISessionSegmentExclusion { + /** EventExclusionDuration enum. */ + enum EventExclusionDuration { + EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, + EVENT_EXCLUSION_PERMANENT = 1 + } - /** SessionSegmentExclusion sessionExclusionDuration */ - sessionExclusionDuration?: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration|null); + /** Properties of a Segment. */ + interface ISegment { - /** SessionSegmentExclusion sessionExclusionCriteria */ - sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + /** Segment name */ + name?: (string|null); + + /** Segment userSegment */ + userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment */ + sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment */ + eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); } - /** Represents a SessionSegmentExclusion. */ - class SessionSegmentExclusion implements ISessionSegmentExclusion { + /** Represents a Segment. */ + class Segment implements ISegment { /** - * Constructs a new SessionSegmentExclusion. + * Constructs a new Segment. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion); + constructor(properties?: google.analytics.data.v1alpha.ISegment); - /** SessionSegmentExclusion sessionExclusionDuration. */ - public sessionExclusionDuration: (google.analytics.data.v1alpha.SessionExclusionDuration|keyof typeof google.analytics.data.v1alpha.SessionExclusionDuration); + /** Segment name. */ + public name: string; - /** SessionSegmentExclusion sessionExclusionCriteria. */ - public sessionExclusionCriteria?: (google.analytics.data.v1alpha.ISessionSegmentCriteria|null); + /** Segment userSegment. */ + public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + + /** Segment sessionSegment. */ + public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + + /** Segment eventSegment. */ + public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + + /** Segment oneSegmentScope. */ + public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); /** - * Creates a new SessionSegmentExclusion instance using the specified properties. + * Creates a new Segment instance using the specified properties. * @param [properties] Properties to set - * @returns SessionSegmentExclusion instance + * @returns Segment instance */ - public static create(properties?: google.analytics.data.v1alpha.ISessionSegmentExclusion): google.analytics.data.v1alpha.SessionSegmentExclusion; + public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; /** - * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @param message SessionSegmentExclusion message or plain object to encode + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. - * @param message SessionSegmentExclusion message or plain object to encode + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISessionSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * Decodes a Segment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionSegmentExclusion + * @returns Segment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SessionSegmentExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Segment; /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes a Segment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionSegmentExclusion + * @returns Segment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SessionSegmentExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Segment; /** - * Verifies a SessionSegmentExclusion message. + * Verifies a Segment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a Segment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionSegmentExclusion + * @returns Segment */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SessionSegmentExclusion; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; /** - * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. - * @param message SessionSegmentExclusion + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @param message Segment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SessionSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionSegmentExclusion to JSON. + * Converts this Segment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionSegmentExclusion + * Gets the default type url for Segment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** SessionExclusionDuration enum. */ - enum SessionExclusionDuration { - SESSION_EXCLUSION_DURATION_UNSPECIFIED = 0, - SESSION_EXCLUSION_TEMPORARY = 1, - SESSION_EXCLUSION_PERMANENT = 2 - } + /** Properties of a SegmentFilterExpression. */ + interface ISegmentFilterExpression { - /** Properties of an EventSegment. */ - interface IEventSegment { + /** SegmentFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - /** EventSegment eventInclusionCriteria */ - eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + /** SegmentFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - /** EventSegment exclusion */ - exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + /** SegmentFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter */ + segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter */ + segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); } - /** Represents an EventSegment. */ - class EventSegment implements IEventSegment { + /** Represents a SegmentFilterExpression. */ + class SegmentFilterExpression implements ISegmentFilterExpression { /** - * Constructs a new EventSegment. + * Constructs a new SegmentFilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegment); + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); - /** EventSegment eventInclusionCriteria. */ - public eventInclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + /** SegmentFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); - /** EventSegment exclusion. */ - public exclusion?: (google.analytics.data.v1alpha.IEventSegmentExclusion|null); + /** SegmentFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + + /** SegmentFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + + /** SegmentFilterExpression segmentFilter. */ + public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + + /** SegmentFilterExpression segmentEventFilter. */ + public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + + /** SegmentFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); /** - * Creates a new EventSegment instance using the specified properties. + * Creates a new SegmentFilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns EventSegment instance + * @returns SegmentFilterExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegment): google.analytics.data.v1alpha.EventSegment; + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; /** - * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @param message EventSegment message or plain object to encode + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. - * @param message EventSegment message or plain object to encode + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * @param message SegmentFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventSegment message from the specified reader or buffer. + * Decodes a SegmentFilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventSegment + * @returns SegmentFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpression; /** - * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventSegment + * @returns SegmentFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpression; /** - * Verifies an EventSegment message. + * Verifies a SegmentFilterExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventSegment + * @returns SegmentFilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegment; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; /** - * Creates a plain object from an EventSegment message. Also converts values to other types if specified. - * @param message EventSegment + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * @param message SegmentFilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.EventSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventSegment to JSON. + * Converts this SegmentFilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventSegment + * Gets the default type url for SegmentFilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EventSegmentCriteria. */ - interface IEventSegmentCriteria { + /** Properties of a SegmentFilterExpressionList. */ + interface ISegmentFilterExpressionList { - /** EventSegmentCriteria andConditionGroups */ - andConditionGroups?: (google.analytics.data.v1alpha.IEventSegmentConditionGroup[]|null); + /** SegmentFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); } - /** Represents an EventSegmentCriteria. */ - class EventSegmentCriteria implements IEventSegmentCriteria { + /** Represents a SegmentFilterExpressionList. */ + class SegmentFilterExpressionList implements ISegmentFilterExpressionList { /** - * Constructs a new EventSegmentCriteria. + * Constructs a new SegmentFilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria); + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); - /** EventSegmentCriteria andConditionGroups. */ - public andConditionGroups: google.analytics.data.v1alpha.IEventSegmentConditionGroup[]; + /** SegmentFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; /** - * Creates a new EventSegmentCriteria instance using the specified properties. + * Creates a new SegmentFilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns EventSegmentCriteria instance + * @returns SegmentFilterExpressionList instance */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentCriteria): google.analytics.data.v1alpha.EventSegmentCriteria; + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; /** - * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @param message EventSegmentCriteria message or plain object to encode + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. - * @param message EventSegmentCriteria message or plain object to encode + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * @param message SegmentFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventSegmentCriteria + * @returns SegmentFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentCriteria; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpressionList; /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventSegmentCriteria + * @returns SegmentFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentCriteria; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpressionList; /** - * Verifies an EventSegmentCriteria message. + * Verifies a SegmentFilterExpressionList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventSegmentCriteria + * @returns SegmentFilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentCriteria; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; /** - * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. - * @param message EventSegmentCriteria + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentFilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventSegmentCriteria to JSON. + * Converts this SegmentFilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventSegmentCriteria + * Gets the default type url for SegmentFilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** EventCriteriaScoping enum. */ - enum EventCriteriaScoping { - EVENT_CRITERIA_SCOPING_UNSPECIFIED = 0, - EVENT_CRITERIA_WITHIN_SAME_EVENT = 1 - } + /** Properties of a SegmentFilter. */ + interface ISegmentFilter { - /** Properties of an EventSegmentConditionGroup. */ - interface IEventSegmentConditionGroup { + /** SegmentFilter fieldName */ + fieldName?: (string|null); - /** EventSegmentConditionGroup conditionScoping */ - conditionScoping?: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping|null); + /** SegmentFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - /** EventSegmentConditionGroup segmentFilterExpression */ - segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SegmentFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); } - /** Represents an EventSegmentConditionGroup. */ - class EventSegmentConditionGroup implements IEventSegmentConditionGroup { + /** Represents a SegmentFilter. */ + class SegmentFilter implements ISegmentFilter { /** - * Constructs a new EventSegmentConditionGroup. + * Constructs a new SegmentFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup); + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); - /** EventSegmentConditionGroup conditionScoping. */ - public conditionScoping: (google.analytics.data.v1alpha.EventCriteriaScoping|keyof typeof google.analytics.data.v1alpha.EventCriteriaScoping); + /** SegmentFilter fieldName. */ + public fieldName: string; - /** EventSegmentConditionGroup segmentFilterExpression. */ - public segmentFilterExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SegmentFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** SegmentFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** SegmentFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** SegmentFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** SegmentFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + + /** SegmentFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); /** - * Creates a new EventSegmentConditionGroup instance using the specified properties. + * Creates a new SegmentFilter instance using the specified properties. * @param [properties] Properties to set - * @returns EventSegmentConditionGroup instance + * @returns SegmentFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentConditionGroup): google.analytics.data.v1alpha.EventSegmentConditionGroup; + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; /** - * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @param message EventSegmentConditionGroup message or plain object to encode + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. - * @param message EventSegmentConditionGroup message or plain object to encode + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * @param message SegmentFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentConditionGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * Decodes a SegmentFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventSegmentConditionGroup + * @returns SegmentFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentConditionGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilter; /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventSegmentConditionGroup + * @returns SegmentFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentConditionGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilter; /** - * Verifies an EventSegmentConditionGroup message. + * Verifies a SegmentFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventSegmentConditionGroup + * @returns SegmentFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentConditionGroup; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; /** - * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. - * @param message EventSegmentConditionGroup + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * @param message SegmentFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentConditionGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventSegmentConditionGroup to JSON. + * Converts this SegmentFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventSegmentConditionGroup + * Gets the default type url for SegmentFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EventSegmentExclusion. */ - interface IEventSegmentExclusion { - - /** EventSegmentExclusion eventExclusionDuration */ - eventExclusionDuration?: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration|null); + /** Properties of a SegmentFilterScoping. */ + interface ISegmentFilterScoping { - /** EventSegmentExclusion eventExclusionCriteria */ - eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + /** SegmentFilterScoping atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); } - /** Represents an EventSegmentExclusion. */ - class EventSegmentExclusion implements IEventSegmentExclusion { + /** Represents a SegmentFilterScoping. */ + class SegmentFilterScoping implements ISegmentFilterScoping { /** - * Constructs a new EventSegmentExclusion. + * Constructs a new SegmentFilterScoping. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion); - - /** EventSegmentExclusion eventExclusionDuration. */ - public eventExclusionDuration: (google.analytics.data.v1alpha.EventExclusionDuration|keyof typeof google.analytics.data.v1alpha.EventExclusionDuration); + constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); - /** EventSegmentExclusion eventExclusionCriteria. */ - public eventExclusionCriteria?: (google.analytics.data.v1alpha.IEventSegmentCriteria|null); + /** SegmentFilterScoping atAnyPointInTime. */ + public atAnyPointInTime?: (boolean|null); /** - * Creates a new EventSegmentExclusion instance using the specified properties. + * Creates a new SegmentFilterScoping instance using the specified properties. * @param [properties] Properties to set - * @returns EventSegmentExclusion instance + * @returns SegmentFilterScoping instance */ - public static create(properties?: google.analytics.data.v1alpha.IEventSegmentExclusion): google.analytics.data.v1alpha.EventSegmentExclusion; + public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; /** - * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @param message EventSegmentExclusion message or plain object to encode + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. - * @param message EventSegmentExclusion message or plain object to encode + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * @param message SegmentFilterScoping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IEventSegmentExclusion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * Decodes a SegmentFilterScoping message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventSegmentExclusion + * @returns SegmentFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.EventSegmentExclusion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterScoping; /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventSegmentExclusion + * @returns SegmentFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.EventSegmentExclusion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterScoping; /** - * Verifies an EventSegmentExclusion message. + * Verifies a SegmentFilterScoping message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventSegmentExclusion + * @returns SegmentFilterScoping */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.EventSegmentExclusion; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; - /** - * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. - * @param message EventSegmentExclusion + /** + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * @param message SegmentFilterScoping * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.EventSegmentExclusion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventSegmentExclusion to JSON. + * Converts this SegmentFilterScoping to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventSegmentExclusion + * Gets the default type url for SegmentFilterScoping * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** EventExclusionDuration enum. */ - enum EventExclusionDuration { - EVENT_EXCLUSION_DURATION_UNSPECIFIED = 0, - EVENT_EXCLUSION_PERMANENT = 1 - } - - /** Properties of a Segment. */ - interface ISegment { - - /** Segment name */ - name?: (string|null); - - /** Segment userSegment */ - userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); + /** Properties of a SegmentEventFilter. */ + interface ISegmentEventFilter { - /** Segment sessionSegment */ - sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + /** SegmentEventFilter eventName */ + eventName?: (string|null); - /** Segment eventSegment */ - eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + /** SegmentEventFilter segmentParameterFilterExpression */ + segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); } - /** Represents a Segment. */ - class Segment implements ISegment { + /** Represents a SegmentEventFilter. */ + class SegmentEventFilter implements ISegmentEventFilter { /** - * Constructs a new Segment. + * Constructs a new SegmentEventFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegment); - - /** Segment name. */ - public name: string; - - /** Segment userSegment. */ - public userSegment?: (google.analytics.data.v1alpha.IUserSegment|null); - - /** Segment sessionSegment. */ - public sessionSegment?: (google.analytics.data.v1alpha.ISessionSegment|null); + constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); - /** Segment eventSegment. */ - public eventSegment?: (google.analytics.data.v1alpha.IEventSegment|null); + /** SegmentEventFilter eventName. */ + public eventName?: (string|null); - /** Segment oneSegmentScope. */ - public oneSegmentScope?: ("userSegment"|"sessionSegment"|"eventSegment"); + /** SegmentEventFilter segmentParameterFilterExpression. */ + public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); /** - * Creates a new Segment instance using the specified properties. + * Creates a new SegmentEventFilter instance using the specified properties. * @param [properties] Properties to set - * @returns Segment instance + * @returns SegmentEventFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegment): google.analytics.data.v1alpha.Segment; + public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; /** - * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * @param message SegmentEventFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Segment message from the specified reader or buffer. + * Decodes a SegmentEventFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Segment + * @returns SegmentEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.Segment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentEventFilter; /** - * Decodes a Segment message from the specified reader or buffer, length delimited. + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Segment + * @returns SegmentEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.Segment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentEventFilter; /** - * Verifies a Segment message. + * Verifies a SegmentEventFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Segment + * @returns SegmentEventFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.Segment; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. - * @param message Segment + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * @param message SegmentEventFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Segment to JSON. + * Converts this SegmentEventFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Segment + * Gets the default type url for SegmentEventFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentFilterExpression. */ - interface ISegmentFilterExpression { - - /** SegmentFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + /** Properties of a SegmentParameterFilterExpression. */ + interface ISegmentParameterFilterExpression { - /** SegmentFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + /** SegmentParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - /** SegmentFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SegmentParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - /** SegmentFilterExpression segmentFilter */ - segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + /** SegmentParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - /** SegmentFilterExpression segmentEventFilter */ - segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + /** SegmentParameterFilterExpression segmentParameterFilter */ + segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); } - /** Represents a SegmentFilterExpression. */ - class SegmentFilterExpression implements ISegmentFilterExpression { + /** Represents a SegmentParameterFilterExpression. */ + class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { /** - * Constructs a new SegmentFilterExpression. + * Constructs a new SegmentParameterFilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression); - - /** SegmentFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); - /** SegmentFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.ISegmentFilterExpressionList|null); + /** SegmentParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - /** SegmentFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.ISegmentFilterExpression|null); + /** SegmentParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - /** SegmentFilterExpression segmentFilter. */ - public segmentFilter?: (google.analytics.data.v1alpha.ISegmentFilter|null); + /** SegmentParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - /** SegmentFilterExpression segmentEventFilter. */ - public segmentEventFilter?: (google.analytics.data.v1alpha.ISegmentEventFilter|null); + /** SegmentParameterFilterExpression segmentParameterFilter. */ + public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); - /** SegmentFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"); + /** SegmentParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); /** - * Creates a new SegmentFilterExpression instance using the specified properties. + * Creates a new SegmentParameterFilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentFilterExpression instance + * @returns SegmentParameterFilterExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpression): google.analytics.data.v1alpha.SegmentFilterExpression; + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; /** - * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @param message SegmentFilterExpression message or plain object to encode + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. - * @param message SegmentFilterExpression message or plain object to encode + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * @param message SegmentParameterFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentFilterExpression + * @returns SegmentParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpression; /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentFilterExpression + * @returns SegmentParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpression; /** - * Verifies a SegmentFilterExpression message. + * Verifies a SegmentParameterFilterExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentFilterExpression + * @returns SegmentParameterFilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; /** - * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. - * @param message SegmentFilterExpression + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentFilterExpression to JSON. + * Converts this SegmentParameterFilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentFilterExpression + * Gets the default type url for SegmentParameterFilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentFilterExpressionList. */ - interface ISegmentFilterExpressionList { + /** Properties of a SegmentParameterFilterExpressionList. */ + interface ISegmentParameterFilterExpressionList { - /** SegmentFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.ISegmentFilterExpression[]|null); + /** SegmentParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); } - /** Represents a SegmentFilterExpressionList. */ - class SegmentFilterExpressionList implements ISegmentFilterExpressionList { + /** Represents a SegmentParameterFilterExpressionList. */ + class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { /** - * Constructs a new SegmentFilterExpressionList. + * Constructs a new SegmentParameterFilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList); + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); - /** SegmentFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.ISegmentFilterExpression[]; + /** SegmentParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; /** - * Creates a new SegmentFilterExpressionList instance using the specified properties. + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentFilterExpressionList instance + * @returns SegmentParameterFilterExpressionList instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterExpressionList): google.analytics.data.v1alpha.SegmentFilterExpressionList; + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; /** - * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @param message SegmentFilterExpressionList message or plain object to encode + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. - * @param message SegmentFilterExpressionList message or plain object to encode + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * @param message SegmentParameterFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentFilterExpressionList + * @returns SegmentParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentFilterExpressionList + * @returns SegmentParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; /** - * Verifies a SegmentFilterExpressionList message. + * Verifies a SegmentParameterFilterExpressionList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentFilterExpressionList + * @returns SegmentParameterFilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; /** - * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. - * @param message SegmentFilterExpressionList + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message SegmentParameterFilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentFilterExpressionList to JSON. + * Converts this SegmentParameterFilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentFilterExpressionList + * Gets the default type url for SegmentParameterFilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentFilter. */ - interface ISegmentFilter { + /** Properties of a SegmentParameterFilter. */ + interface ISegmentParameterFilter { - /** SegmentFilter fieldName */ - fieldName?: (string|null); + /** SegmentParameterFilter eventParameterName */ + eventParameterName?: (string|null); - /** SegmentFilter stringFilter */ + /** SegmentParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter */ stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - /** SegmentFilter inListFilter */ + /** SegmentParameterFilter inListFilter */ inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - /** SegmentFilter numericFilter */ + /** SegmentParameterFilter numericFilter */ numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - /** SegmentFilter betweenFilter */ + /** SegmentParameterFilter betweenFilter */ betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - /** SegmentFilter filterScoping */ - filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + /** SegmentParameterFilter filterScoping */ + filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); } - /** Represents a SegmentFilter. */ - class SegmentFilter implements ISegmentFilter { + /** Represents a SegmentParameterFilter. */ + class SegmentParameterFilter implements ISegmentParameterFilter { /** - * Constructs a new SegmentFilter. + * Constructs a new SegmentParameterFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilter); + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); - /** SegmentFilter fieldName. */ - public fieldName: string; + /** SegmentParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); - /** SegmentFilter stringFilter. */ + /** SegmentParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** SegmentParameterFilter stringFilter. */ public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - /** SegmentFilter inListFilter. */ + /** SegmentParameterFilter inListFilter. */ public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - /** SegmentFilter numericFilter. */ + /** SegmentParameterFilter numericFilter. */ public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - /** SegmentFilter betweenFilter. */ + /** SegmentParameterFilter betweenFilter. */ public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - /** SegmentFilter filterScoping. */ - public filterScoping?: (google.analytics.data.v1alpha.ISegmentFilterScoping|null); + /** SegmentParameterFilter filterScoping. */ + public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); - /** SegmentFilter oneFilter. */ + /** SegmentParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** SegmentParameterFilter oneFilter. */ public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); /** - * Creates a new SegmentFilter instance using the specified properties. + * Creates a new SegmentParameterFilter instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentFilter instance + * @returns SegmentParameterFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilter): google.analytics.data.v1alpha.SegmentFilter; + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; /** - * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @param message SegmentFilter message or plain object to encode + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. - * @param message SegmentFilter message or plain object to encode + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * @param message SegmentParameterFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentFilter message from the specified reader or buffer. + * Decodes a SegmentParameterFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentFilter + * @returns SegmentParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilter; /** - * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentFilter + * @returns SegmentParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilter; /** - * Verifies a SegmentFilter message. + * Verifies a SegmentParameterFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentFilter + * @returns SegmentParameterFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; /** - * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. - * @param message SegmentFilter + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * @param message SegmentParameterFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentFilter to JSON. + * Converts this SegmentParameterFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentFilter + * Gets the default type url for SegmentParameterFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentFilterScoping. */ - interface ISegmentFilterScoping { + /** Properties of a SegmentParameterFilterScoping. */ + interface ISegmentParameterFilterScoping { - /** SegmentFilterScoping atAnyPointInTime */ - atAnyPointInTime?: (boolean|null); + /** SegmentParameterFilterScoping inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|Long|string|null); } - /** Represents a SegmentFilterScoping. */ - class SegmentFilterScoping implements ISegmentFilterScoping { + /** Represents a SegmentParameterFilterScoping. */ + class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { /** - * Constructs a new SegmentFilterScoping. + * Constructs a new SegmentParameterFilterScoping. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping); + constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); - /** SegmentFilterScoping atAnyPointInTime. */ - public atAnyPointInTime?: (boolean|null); + /** SegmentParameterFilterScoping inAnyNDayPeriod. */ + public inAnyNDayPeriod?: (number|Long|string|null); /** - * Creates a new SegmentFilterScoping instance using the specified properties. + * Creates a new SegmentParameterFilterScoping instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentFilterScoping instance + * @returns SegmentParameterFilterScoping instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentFilterScoping): google.analytics.data.v1alpha.SegmentFilterScoping; + public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; /** - * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @param message SegmentFilterScoping message or plain object to encode + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. - * @param message SegmentFilterScoping message or plain object to encode + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * @param message SegmentParameterFilterScoping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentFilterScoping + * @returns SegmentParameterFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentFilterScoping; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterScoping; /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentFilterScoping + * @returns SegmentParameterFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentFilterScoping; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterScoping; /** - * Verifies a SegmentFilterScoping message. + * Verifies a SegmentParameterFilterScoping message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentFilterScoping + * @returns SegmentParameterFilterScoping */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentFilterScoping; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; /** - * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. - * @param message SegmentFilterScoping + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * @param message SegmentParameterFilterScoping * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentFilterScoping to JSON. + * Converts this SegmentParameterFilterScoping to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentFilterScoping + * Gets the default type url for SegmentParameterFilterScoping * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentEventFilter. */ - interface ISegmentEventFilter { + /** Properties of a FunnelFilterExpression. */ + interface IFunnelFilterExpression { - /** SegmentEventFilter eventName */ - eventName?: (string|null); + /** FunnelFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - /** SegmentEventFilter segmentParameterFilterExpression */ - segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + /** FunnelFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter */ + funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter */ + funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); } - /** Represents a SegmentEventFilter. */ - class SegmentEventFilter implements ISegmentEventFilter { + /** Represents a FunnelFilterExpression. */ + class FunnelFilterExpression implements IFunnelFilterExpression { /** - * Constructs a new SegmentEventFilter. + * Constructs a new FunnelFilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentEventFilter); + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); - /** SegmentEventFilter eventName. */ - public eventName?: (string|null); + /** FunnelFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - /** SegmentEventFilter segmentParameterFilterExpression. */ - public segmentParameterFilterExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + /** FunnelFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); + + /** FunnelFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); + + /** FunnelFilterExpression funnelFieldFilter. */ + public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + + /** FunnelFilterExpression funnelEventFilter. */ + public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + + /** FunnelFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); /** - * Creates a new SegmentEventFilter instance using the specified properties. + * Creates a new FunnelFilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentEventFilter instance + * @returns FunnelFilterExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentEventFilter): google.analytics.data.v1alpha.SegmentEventFilter; + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; /** - * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @param message SegmentEventFilter message or plain object to encode + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. - * @param message SegmentEventFilter message or plain object to encode + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * @param message FunnelFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentEventFilter message from the specified reader or buffer. + * Decodes a FunnelFilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentEventFilter + * @returns FunnelFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentEventFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpression; /** - * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentEventFilter + * @returns FunnelFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentEventFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpression; /** - * Verifies a SegmentEventFilter message. + * Verifies a FunnelFilterExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentEventFilter + * @returns FunnelFilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentEventFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; /** - * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. - * @param message SegmentEventFilter + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * @param message FunnelFilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentEventFilter to JSON. + * Converts this FunnelFilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentEventFilter + * Gets the default type url for FunnelFilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentParameterFilterExpression. */ - interface ISegmentParameterFilterExpression { - - /** SegmentParameterFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); + /** Properties of a FunnelFilterExpressionList. */ + interface IFunnelFilterExpressionList { - /** SegmentParameterFilterExpression segmentParameterFilter */ - segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + /** FunnelFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); } - /** Represents a SegmentParameterFilterExpression. */ - class SegmentParameterFilterExpression implements ISegmentParameterFilterExpression { + /** Represents a FunnelFilterExpressionList. */ + class FunnelFilterExpressionList implements IFunnelFilterExpressionList { /** - * Constructs a new SegmentParameterFilterExpression. + * Constructs a new FunnelFilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression); - - /** SegmentParameterFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null); - - /** SegmentParameterFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null); - - /** SegmentParameterFilterExpression segmentParameterFilter. */ - public segmentParameterFilter?: (google.analytics.data.v1alpha.ISegmentParameterFilter|null); + constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); - /** SegmentParameterFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"); + /** FunnelFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; /** - * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * Creates a new FunnelFilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentParameterFilterExpression instance + * @returns FunnelFilterExpressionList instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpression): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; /** - * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @param message SegmentParameterFilterExpression message or plain object to encode + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. - * @param message SegmentParameterFilterExpression message or plain object to encode + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * @param message FunnelFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterExpression + * @returns FunnelFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpressionList; /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterExpression + * @returns FunnelFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpressionList; /** - * Verifies a SegmentParameterFilterExpression message. + * Verifies a FunnelFilterExpressionList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentParameterFilterExpression + * @returns FunnelFilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; /** - * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. - * @param message SegmentParameterFilterExpression + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelFilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentParameterFilterExpression to JSON. + * Converts this FunnelFilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentParameterFilterExpression + * Gets the default type url for FunnelFilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentParameterFilterExpressionList. */ - interface ISegmentParameterFilterExpressionList { + /** Properties of a FunnelFieldFilter. */ + interface IFunnelFieldFilter { - /** SegmentParameterFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]|null); + /** FunnelFieldFilter fieldName */ + fieldName?: (string|null); + + /** FunnelFieldFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); } - /** Represents a SegmentParameterFilterExpressionList. */ - class SegmentParameterFilterExpressionList implements ISegmentParameterFilterExpressionList { + /** Represents a FunnelFieldFilter. */ + class FunnelFieldFilter implements IFunnelFieldFilter { /** - * Constructs a new SegmentParameterFilterExpressionList. + * Constructs a new FunnelFieldFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList); + constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); - /** SegmentParameterFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.ISegmentParameterFilterExpression[]; + /** FunnelFieldFilter fieldName. */ + public fieldName: string; + + /** FunnelFieldFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelFieldFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelFieldFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelFieldFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelFieldFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); /** - * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * Creates a new FunnelFieldFilter instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentParameterFilterExpressionList instance + * @returns FunnelFieldFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; /** - * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @param message SegmentParameterFilterExpressionList message or plain object to encode + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. - * @param message SegmentParameterFilterExpressionList message or plain object to encode + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * @param message FunnelFieldFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * Decodes a FunnelFieldFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterExpressionList + * @returns FunnelFieldFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFieldFilter; /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterExpressionList + * @returns FunnelFieldFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFieldFilter; /** - * Verifies a SegmentParameterFilterExpressionList message. + * Verifies a FunnelFieldFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentParameterFilterExpressionList - */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterExpressionList; - - /** - * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. - * @param message SegmentParameterFilterExpressionList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentParameterFilterExpressionList to JSON. - * @returns JSON object + * @returns FunnelFieldFilter */ - public toJSON(): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; /** - * Gets the default type url for SegmentParameterFilterExpressionList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SegmentParameterFilter. */ - interface ISegmentParameterFilter { - - /** SegmentParameterFilter eventParameterName */ - eventParameterName?: (string|null); - - /** SegmentParameterFilter itemParameterName */ - itemParameterName?: (string|null); - - /** SegmentParameterFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** SegmentParameterFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** SegmentParameterFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** SegmentParameterFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); - - /** SegmentParameterFilter filterScoping */ - filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); - } - - /** Represents a SegmentParameterFilter. */ - class SegmentParameterFilter implements ISegmentParameterFilter { + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * @param message FunnelFieldFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new SegmentParameterFilter. - * @param [properties] Properties to set + * Converts this FunnelFieldFilter to JSON. + * @returns JSON object */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter); - - /** SegmentParameterFilter eventParameterName. */ - public eventParameterName?: (string|null); + public toJSON(): { [k: string]: any }; - /** SegmentParameterFilter itemParameterName. */ - public itemParameterName?: (string|null); + /** + * Gets the default type url for FunnelFieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SegmentParameterFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + /** Properties of a FunnelEventFilter. */ + interface IFunnelEventFilter { - /** SegmentParameterFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + /** FunnelEventFilter eventName */ + eventName?: (string|null); - /** SegmentParameterFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** FunnelEventFilter funnelParameterFilterExpression */ + funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + } - /** SegmentParameterFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** Represents a FunnelEventFilter. */ + class FunnelEventFilter implements IFunnelEventFilter { - /** SegmentParameterFilter filterScoping. */ - public filterScoping?: (google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null); + /** + * Constructs a new FunnelEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); - /** SegmentParameterFilter oneParameter. */ - public oneParameter?: ("eventParameterName"|"itemParameterName"); + /** FunnelEventFilter eventName. */ + public eventName?: (string|null); - /** SegmentParameterFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + /** FunnelEventFilter funnelParameterFilterExpression. */ + public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); /** - * Creates a new SegmentParameterFilter instance using the specified properties. + * Creates a new FunnelEventFilter instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentParameterFilter instance + * @returns FunnelEventFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilter): google.analytics.data.v1alpha.SegmentParameterFilter; + public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; /** - * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @param message SegmentParameterFilter message or plain object to encode + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. - * @param message SegmentParameterFilter message or plain object to encode + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * @param message FunnelEventFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * Decodes a FunnelEventFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentParameterFilter + * @returns FunnelEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelEventFilter; /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilter + * @returns FunnelEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelEventFilter; /** - * Verifies a SegmentParameterFilter message. + * Verifies a FunnelEventFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentParameterFilter + * @returns FunnelEventFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; /** - * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. - * @param message SegmentParameterFilter + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * @param message FunnelEventFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentParameterFilter to JSON. + * Converts this FunnelEventFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentParameterFilter + * Gets the default type url for FunnelEventFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SegmentParameterFilterScoping. */ - interface ISegmentParameterFilterScoping { + /** Properties of a FunnelParameterFilterExpression. */ + interface IFunnelParameterFilterExpression { - /** SegmentParameterFilterScoping inAnyNDayPeriod */ - inAnyNDayPeriod?: (number|Long|string|null); + /** FunnelParameterFilterExpression andGroup */ + andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup */ + orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression */ + notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter */ + funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); } - /** Represents a SegmentParameterFilterScoping. */ - class SegmentParameterFilterScoping implements ISegmentParameterFilterScoping { + /** Represents a FunnelParameterFilterExpression. */ + class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { /** - * Constructs a new SegmentParameterFilterScoping. + * Constructs a new FunnelParameterFilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping); + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); - /** SegmentParameterFilterScoping inAnyNDayPeriod. */ - public inAnyNDayPeriod?: (number|Long|string|null); + /** FunnelParameterFilterExpression andGroup. */ + public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression orGroup. */ + public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + + /** FunnelParameterFilterExpression notExpression. */ + public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + + /** FunnelParameterFilterExpression funnelParameterFilter. */ + public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + + /** FunnelParameterFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); /** - * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * Creates a new FunnelParameterFilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns SegmentParameterFilterScoping instance + * @returns FunnelParameterFilterExpression instance */ - public static create(properties?: google.analytics.data.v1alpha.ISegmentParameterFilterScoping): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; /** - * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @param message SegmentParameterFilterScoping message or plain object to encode + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. - * @param message SegmentParameterFilterScoping message or plain object to encode + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * @param message FunnelParameterFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISegmentParameterFilterScoping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SegmentParameterFilterScoping + * @returns FunnelParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpression; /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SegmentParameterFilterScoping + * @returns FunnelParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpression; /** - * Verifies a SegmentParameterFilterScoping message. + * Verifies a FunnelParameterFilterExpression message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SegmentParameterFilterScoping + * @returns FunnelParameterFilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SegmentParameterFilterScoping; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; /** - * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. - * @param message SegmentParameterFilterScoping + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SegmentParameterFilterScoping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SegmentParameterFilterScoping to JSON. + * Converts this FunnelParameterFilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SegmentParameterFilterScoping + * Gets the default type url for FunnelParameterFilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelFilterExpression. */ - interface IFunnelFilterExpression { - - /** FunnelFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - - /** FunnelFilterExpression funnelFieldFilter */ - funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); + /** Properties of a FunnelParameterFilterExpressionList. */ + interface IFunnelParameterFilterExpressionList { - /** FunnelFilterExpression funnelEventFilter */ - funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + /** FunnelParameterFilterExpressionList expressions */ + expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); } - /** Represents a FunnelFilterExpression. */ - class FunnelFilterExpression implements IFunnelFilterExpression { + /** Represents a FunnelParameterFilterExpressionList. */ + class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { /** - * Constructs a new FunnelFilterExpression. + * Constructs a new FunnelParameterFilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression); - - /** FunnelFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFunnelFilterExpressionList|null); - - /** FunnelFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFunnelFilterExpression|null); - - /** FunnelFilterExpression funnelFieldFilter. */ - public funnelFieldFilter?: (google.analytics.data.v1alpha.IFunnelFieldFilter|null); - - /** FunnelFilterExpression funnelEventFilter. */ - public funnelEventFilter?: (google.analytics.data.v1alpha.IFunnelEventFilter|null); + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); - /** FunnelFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"); + /** FunnelParameterFilterExpressionList expressions. */ + public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; /** - * Creates a new FunnelFilterExpression instance using the specified properties. + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelFilterExpression instance + * @returns FunnelParameterFilterExpressionList instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpression): google.analytics.data.v1alpha.FunnelFilterExpression; + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; /** - * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @param message FunnelFilterExpression message or plain object to encode + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. - * @param message FunnelFilterExpression message or plain object to encode + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * @param message FunnelParameterFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelFilterExpression + * @returns FunnelParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelFilterExpression + * @returns FunnelParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; /** - * Verifies a FunnelFilterExpression message. + * Verifies a FunnelParameterFilterExpressionList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelFilterExpression + * @returns FunnelParameterFilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; /** - * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. - * @param message FunnelFilterExpression + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * @param message FunnelParameterFilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelFilterExpression to JSON. + * Converts this FunnelParameterFilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelFilterExpression + * Gets the default type url for FunnelParameterFilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelFilterExpressionList. */ - interface IFunnelFilterExpressionList { + /** Properties of a FunnelParameterFilter. */ + interface IFunnelParameterFilter { - /** FunnelFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFunnelFilterExpression[]|null); + /** FunnelParameterFilter eventParameterName */ + eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName */ + itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter */ + stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter */ + inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter */ + numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter */ + betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); } - /** Represents a FunnelFilterExpressionList. */ - class FunnelFilterExpressionList implements IFunnelFilterExpressionList { + /** Represents a FunnelParameterFilter. */ + class FunnelParameterFilter implements IFunnelParameterFilter { /** - * Constructs a new FunnelFilterExpressionList. + * Constructs a new FunnelParameterFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList); + constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); - /** FunnelFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFunnelFilterExpression[]; + /** FunnelParameterFilter eventParameterName. */ + public eventParameterName?: (string|null); + + /** FunnelParameterFilter itemParameterName. */ + public itemParameterName?: (string|null); + + /** FunnelParameterFilter stringFilter. */ + public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + + /** FunnelParameterFilter inListFilter. */ + public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + + /** FunnelParameterFilter numericFilter. */ + public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + + /** FunnelParameterFilter betweenFilter. */ + public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + + /** FunnelParameterFilter oneParameter. */ + public oneParameter?: ("eventParameterName"|"itemParameterName"); + + /** FunnelParameterFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); /** - * Creates a new FunnelFilterExpressionList instance using the specified properties. + * Creates a new FunnelParameterFilter instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelFilterExpressionList instance + * @returns FunnelParameterFilter instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFilterExpressionList): google.analytics.data.v1alpha.FunnelFilterExpressionList; + public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; /** - * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @param message FunnelFilterExpressionList message or plain object to encode + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. - * @param message FunnelFilterExpressionList message or plain object to encode + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * @param message FunnelParameterFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * Decodes a FunnelParameterFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelFilterExpressionList + * @returns FunnelParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilter; /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelFilterExpressionList + * @returns FunnelParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilter; /** - * Verifies a FunnelFilterExpressionList message. + * Verifies a FunnelParameterFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelFilterExpressionList + * @returns FunnelParameterFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; /** - * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. - * @param message FunnelFilterExpressionList + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * @param message FunnelParameterFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelFilterExpressionList to JSON. + * Converts this FunnelParameterFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelFilterExpressionList + * Gets the default type url for FunnelParameterFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelFieldFilter. */ - interface IFunnelFieldFilter { - - /** FunnelFieldFilter fieldName */ - fieldName?: (string|null); - - /** FunnelFieldFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelFieldFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelFieldFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** Properties of a FunnelResponseMetadata. */ + interface IFunnelResponseMetadata { - /** FunnelFieldFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** FunnelResponseMetadata samplingMetadatas */ + samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); } - /** Represents a FunnelFieldFilter. */ - class FunnelFieldFilter implements IFunnelFieldFilter { + /** Represents a FunnelResponseMetadata. */ + class FunnelResponseMetadata implements IFunnelResponseMetadata { /** - * Constructs a new FunnelFieldFilter. + * Constructs a new FunnelResponseMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter); - - /** FunnelFieldFilter fieldName. */ - public fieldName: string; - - /** FunnelFieldFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); - - /** FunnelFieldFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); - - /** FunnelFieldFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); - - /** FunnelFieldFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); - /** FunnelFieldFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + /** FunnelResponseMetadata samplingMetadatas. */ + public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; /** - * Creates a new FunnelFieldFilter instance using the specified properties. + * Creates a new FunnelResponseMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelFieldFilter instance + * @returns FunnelResponseMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelFieldFilter): google.analytics.data.v1alpha.FunnelFieldFilter; + public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; /** - * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @param message FunnelFieldFilter message or plain object to encode + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. - * @param message FunnelFieldFilter message or plain object to encode + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * @param message FunnelResponseMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelFieldFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelFieldFilter + * @returns FunnelResponseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelFieldFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelResponseMetadata; /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelFieldFilter + * @returns FunnelResponseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelFieldFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelResponseMetadata; /** - * Verifies a FunnelFieldFilter message. + * Verifies a FunnelResponseMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelFieldFilter + * @returns FunnelResponseMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelFieldFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; /** - * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. - * @param message FunnelFieldFilter + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * @param message FunnelResponseMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelFieldFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelFieldFilter to JSON. + * Converts this FunnelResponseMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelFieldFilter + * Gets the default type url for FunnelResponseMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelEventFilter. */ - interface IFunnelEventFilter { + /** Properties of a SamplingMetadata. */ + interface ISamplingMetadata { - /** FunnelEventFilter eventName */ - eventName?: (string|null); + /** SamplingMetadata samplesReadCount */ + samplesReadCount?: (number|Long|string|null); - /** FunnelEventFilter funnelParameterFilterExpression */ - funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + /** SamplingMetadata samplingSpaceSize */ + samplingSpaceSize?: (number|Long|string|null); } - /** Represents a FunnelEventFilter. */ - class FunnelEventFilter implements IFunnelEventFilter { + /** Represents a SamplingMetadata. */ + class SamplingMetadata implements ISamplingMetadata { /** - * Constructs a new FunnelEventFilter. + * Constructs a new SamplingMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelEventFilter); - - /** FunnelEventFilter eventName. */ - public eventName?: (string|null); + constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); - /** FunnelEventFilter funnelParameterFilterExpression. */ - public funnelParameterFilterExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + /** SamplingMetadata samplesReadCount. */ + public samplesReadCount: (number|Long|string); + + /** SamplingMetadata samplingSpaceSize. */ + public samplingSpaceSize: (number|Long|string); /** - * Creates a new FunnelEventFilter instance using the specified properties. + * Creates a new SamplingMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelEventFilter instance + * @returns SamplingMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelEventFilter): google.analytics.data.v1alpha.FunnelEventFilter; + public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; /** - * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @param message FunnelEventFilter message or plain object to encode + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. - * @param message FunnelEventFilter message or plain object to encode + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * @param message SamplingMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelEventFilter message from the specified reader or buffer. + * Decodes a SamplingMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelEventFilter + * @returns SamplingMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelEventFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SamplingMetadata; /** - * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelEventFilter + * @returns SamplingMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelEventFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SamplingMetadata; /** - * Verifies a FunnelEventFilter message. + * Verifies a SamplingMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelEventFilter + * @returns SamplingMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelEventFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; /** - * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. - * @param message FunnelEventFilter + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * @param message SamplingMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelEventFilter to JSON. + * Converts this SamplingMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelEventFilter + * Gets the default type url for SamplingMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelParameterFilterExpression. */ - interface IFunnelParameterFilterExpression { + /** MetricAggregation enum. */ + enum MetricAggregation { + METRIC_AGGREGATION_UNSPECIFIED = 0, + TOTAL = 1, + MINIMUM = 5, + MAXIMUM = 6, + COUNT = 4 + } - /** FunnelParameterFilterExpression andGroup */ - andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + /** MetricType enum. */ + enum MetricType { + METRIC_TYPE_UNSPECIFIED = 0, + TYPE_INTEGER = 1, + TYPE_FLOAT = 2, + TYPE_SECONDS = 4, + TYPE_MILLISECONDS = 5, + TYPE_MINUTES = 6, + TYPE_HOURS = 7, + TYPE_STANDARD = 8, + TYPE_CURRENCY = 9, + TYPE_FEET = 10, + TYPE_MILES = 11, + TYPE_METERS = 12, + TYPE_KILOMETERS = 13 + } - /** FunnelParameterFilterExpression orGroup */ - orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } - /** FunnelParameterFilterExpression notExpression */ - notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + /** SamplingLevel enum. */ + enum SamplingLevel { + SAMPLING_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + UNSAMPLED = 3 + } - /** FunnelParameterFilterExpression funnelParameterFilter */ - funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + /** Properties of a ConversionSpec. */ + interface IConversionSpec { + + /** ConversionSpec conversionActions */ + conversionActions?: (string[]|null); + + /** ConversionSpec attributionModel */ + attributionModel?: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null); } - /** Represents a FunnelParameterFilterExpression. */ - class FunnelParameterFilterExpression implements IFunnelParameterFilterExpression { + /** Represents a ConversionSpec. */ + class ConversionSpec implements IConversionSpec { /** - * Constructs a new FunnelParameterFilterExpression. + * Constructs a new ConversionSpec. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression); - - /** FunnelParameterFilterExpression andGroup. */ - public andGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression orGroup. */ - public orGroup?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null); - - /** FunnelParameterFilterExpression notExpression. */ - public notExpression?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null); + constructor(properties?: google.analytics.data.v1alpha.IConversionSpec); - /** FunnelParameterFilterExpression funnelParameterFilter. */ - public funnelParameterFilter?: (google.analytics.data.v1alpha.IFunnelParameterFilter|null); + /** ConversionSpec conversionActions. */ + public conversionActions: string[]; - /** FunnelParameterFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"); + /** ConversionSpec attributionModel. */ + public attributionModel: (google.analytics.data.v1alpha.ConversionSpec.AttributionModel|keyof typeof google.analytics.data.v1alpha.ConversionSpec.AttributionModel); /** - * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * Creates a new ConversionSpec instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelParameterFilterExpression instance + * @returns ConversionSpec instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpression): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + public static create(properties?: google.analytics.data.v1alpha.IConversionSpec): google.analytics.data.v1alpha.ConversionSpec; /** - * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @param message FunnelParameterFilterExpression message or plain object to encode + * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @param message ConversionSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. - * @param message FunnelParameterFilterExpression message or plain object to encode + * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. + * @param message ConversionSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * Decodes a ConversionSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelParameterFilterExpression + * @returns ConversionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionSpec; /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilterExpression + * @returns ConversionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionSpec; /** - * Verifies a FunnelParameterFilterExpression message. + * Verifies a ConversionSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelParameterFilterExpression + * @returns ConversionSpec */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionSpec; /** - * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. - * @param message FunnelParameterFilterExpression + * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. + * @param message ConversionSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.ConversionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelParameterFilterExpression to JSON. + * Converts this ConversionSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelParameterFilterExpression + * Gets the default type url for ConversionSpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelParameterFilterExpressionList. */ - interface IFunnelParameterFilterExpressionList { + namespace ConversionSpec { - /** FunnelParameterFilterExpressionList expressions */ - expressions?: (google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]|null); + /** AttributionModel enum. */ + enum AttributionModel { + ATTRIBUTION_MODEL_UNSPECIFIED = 0, + DATA_DRIVEN = 1, + LAST_CLICK = 2 + } } - /** Represents a FunnelParameterFilterExpressionList. */ - class FunnelParameterFilterExpressionList implements IFunnelParameterFilterExpressionList { + /** Properties of a DimensionMetadata. */ + interface IDimensionMetadata { + + /** DimensionMetadata apiName */ + apiName?: (string|null); + + /** DimensionMetadata uiName */ + uiName?: (string|null); + + /** DimensionMetadata description */ + description?: (string|null); + + /** DimensionMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** DimensionMetadata customDefinition */ + customDefinition?: (boolean|null); + + /** DimensionMetadata category */ + category?: (string|null); + + /** DimensionMetadata sections */ + sections?: (google.analytics.data.v1alpha.Section[]|null); + } + + /** Represents a DimensionMetadata. */ + class DimensionMetadata implements IDimensionMetadata { /** - * Constructs a new FunnelParameterFilterExpressionList. + * Constructs a new DimensionMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList); + constructor(properties?: google.analytics.data.v1alpha.IDimensionMetadata); - /** FunnelParameterFilterExpressionList expressions. */ - public expressions: google.analytics.data.v1alpha.IFunnelParameterFilterExpression[]; + /** DimensionMetadata apiName. */ + public apiName: string; + + /** DimensionMetadata uiName. */ + public uiName: string; + + /** DimensionMetadata description. */ + public description: string; + + /** DimensionMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; + + /** DimensionMetadata customDefinition. */ + public customDefinition: boolean; + + /** DimensionMetadata category. */ + public category: string; + + /** DimensionMetadata sections. */ + public sections: google.analytics.data.v1alpha.Section[]; /** - * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * Creates a new DimensionMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelParameterFilterExpressionList instance + * @returns DimensionMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + public static create(properties?: google.analytics.data.v1alpha.IDimensionMetadata): google.analytics.data.v1alpha.DimensionMetadata; /** - * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @param message FunnelParameterFilterExpressionList message or plain object to encode + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. - * @param message FunnelParameterFilterExpressionList message or plain object to encode + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. + * @param message DimensionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * Decodes a DimensionMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelParameterFilterExpressionList + * @returns DimensionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.DimensionMetadata; /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilterExpressionList + * @returns DimensionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.DimensionMetadata; /** - * Verifies a FunnelParameterFilterExpressionList message. + * Verifies a DimensionMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelParameterFilterExpressionList + * @returns DimensionMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.DimensionMetadata; /** - * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. - * @param message FunnelParameterFilterExpressionList + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. + * @param message DimensionMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.DimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelParameterFilterExpressionList to JSON. + * Converts this DimensionMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelParameterFilterExpressionList + * Gets the default type url for DimensionMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelParameterFilter. */ - interface IFunnelParameterFilter { + /** Properties of a MetricMetadata. */ + interface IMetricMetadata { - /** FunnelParameterFilter eventParameterName */ - eventParameterName?: (string|null); + /** MetricMetadata apiName */ + apiName?: (string|null); - /** FunnelParameterFilter itemParameterName */ - itemParameterName?: (string|null); + /** MetricMetadata uiName */ + uiName?: (string|null); + + /** MetricMetadata description */ + description?: (string|null); + + /** MetricMetadata deprecatedApiNames */ + deprecatedApiNames?: (string[]|null); + + /** MetricMetadata type */ + type?: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType|null); - /** FunnelParameterFilter stringFilter */ - stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + /** MetricMetadata expression */ + expression?: (string|null); - /** FunnelParameterFilter inListFilter */ - inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + /** MetricMetadata customDefinition */ + customDefinition?: (boolean|null); - /** FunnelParameterFilter numericFilter */ - numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** MetricMetadata blockedReasons */ + blockedReasons?: (google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]|null); - /** FunnelParameterFilter betweenFilter */ - betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** MetricMetadata category */ + category?: (string|null); + + /** MetricMetadata sections */ + sections?: (google.analytics.data.v1alpha.Section[]|null); } - /** Represents a FunnelParameterFilter. */ - class FunnelParameterFilter implements IFunnelParameterFilter { + /** Represents a MetricMetadata. */ + class MetricMetadata implements IMetricMetadata { /** - * Constructs a new FunnelParameterFilter. + * Constructs a new MetricMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter); + constructor(properties?: google.analytics.data.v1alpha.IMetricMetadata); - /** FunnelParameterFilter eventParameterName. */ - public eventParameterName?: (string|null); + /** MetricMetadata apiName. */ + public apiName: string; - /** FunnelParameterFilter itemParameterName. */ - public itemParameterName?: (string|null); + /** MetricMetadata uiName. */ + public uiName: string; - /** FunnelParameterFilter stringFilter. */ - public stringFilter?: (google.analytics.data.v1alpha.IStringFilter|null); + /** MetricMetadata description. */ + public description: string; - /** FunnelParameterFilter inListFilter. */ - public inListFilter?: (google.analytics.data.v1alpha.IInListFilter|null); + /** MetricMetadata deprecatedApiNames. */ + public deprecatedApiNames: string[]; - /** FunnelParameterFilter numericFilter. */ - public numericFilter?: (google.analytics.data.v1alpha.INumericFilter|null); + /** MetricMetadata type. */ + public type: (google.analytics.data.v1alpha.MetricType|keyof typeof google.analytics.data.v1alpha.MetricType); - /** FunnelParameterFilter betweenFilter. */ - public betweenFilter?: (google.analytics.data.v1alpha.IBetweenFilter|null); + /** MetricMetadata expression. */ + public expression: string; - /** FunnelParameterFilter oneParameter. */ - public oneParameter?: ("eventParameterName"|"itemParameterName"); + /** MetricMetadata customDefinition. */ + public customDefinition: boolean; - /** FunnelParameterFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + /** MetricMetadata blockedReasons. */ + public blockedReasons: google.analytics.data.v1alpha.MetricMetadata.BlockedReason[]; + + /** MetricMetadata category. */ + public category: string; + + /** MetricMetadata sections. */ + public sections: google.analytics.data.v1alpha.Section[]; /** - * Creates a new FunnelParameterFilter instance using the specified properties. + * Creates a new MetricMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelParameterFilter instance + * @returns MetricMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelParameterFilter): google.analytics.data.v1alpha.FunnelParameterFilter; + public static create(properties?: google.analytics.data.v1alpha.IMetricMetadata): google.analytics.data.v1alpha.MetricMetadata; /** - * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @param message FunnelParameterFilter message or plain object to encode + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. - * @param message FunnelParameterFilter message or plain object to encode + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. + * @param message MetricMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelParameterFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IMetricMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * Decodes a MetricMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelParameterFilter + * @returns MetricMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelParameterFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.MetricMetadata; /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelParameterFilter + * @returns MetricMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelParameterFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.MetricMetadata; /** - * Verifies a FunnelParameterFilter message. + * Verifies a MetricMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelParameterFilter + * @returns MetricMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelParameterFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.MetricMetadata; /** - * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. - * @param message FunnelParameterFilter + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. + * @param message MetricMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelParameterFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.MetricMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelParameterFilter to JSON. + * Converts this MetricMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelParameterFilter + * Gets the default type url for MetricMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FunnelResponseMetadata. */ - interface IFunnelResponseMetadata { + namespace MetricMetadata { - /** FunnelResponseMetadata samplingMetadatas */ - samplingMetadatas?: (google.analytics.data.v1alpha.ISamplingMetadata[]|null); + /** BlockedReason enum. */ + enum BlockedReason { + BLOCKED_REASON_UNSPECIFIED = 0, + NO_REVENUE_METRICS = 1, + NO_COST_METRICS = 2 + } } - /** Represents a FunnelResponseMetadata. */ - class FunnelResponseMetadata implements IFunnelResponseMetadata { + /** Properties of a ComparisonMetadata. */ + interface IComparisonMetadata { + + /** ComparisonMetadata apiName */ + apiName?: (string|null); + + /** ComparisonMetadata uiName */ + uiName?: (string|null); + + /** ComparisonMetadata description */ + description?: (string|null); + } + + /** Represents a ComparisonMetadata. */ + class ComparisonMetadata implements IComparisonMetadata { /** - * Constructs a new FunnelResponseMetadata. + * Constructs a new ComparisonMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata); + constructor(properties?: google.analytics.data.v1alpha.IComparisonMetadata); - /** FunnelResponseMetadata samplingMetadatas. */ - public samplingMetadatas: google.analytics.data.v1alpha.ISamplingMetadata[]; + /** ComparisonMetadata apiName. */ + public apiName: string; + + /** ComparisonMetadata uiName. */ + public uiName: string; + + /** ComparisonMetadata description. */ + public description: string; /** - * Creates a new FunnelResponseMetadata instance using the specified properties. + * Creates a new ComparisonMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns FunnelResponseMetadata instance + * @returns ComparisonMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.IFunnelResponseMetadata): google.analytics.data.v1alpha.FunnelResponseMetadata; + public static create(properties?: google.analytics.data.v1alpha.IComparisonMetadata): google.analytics.data.v1alpha.ComparisonMetadata; /** - * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @param message FunnelResponseMetadata message or plain object to encode + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. - * @param message FunnelResponseMetadata message or plain object to encode + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. + * @param message ComparisonMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.IFunnelResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * Decodes a ComparisonMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FunnelResponseMetadata + * @returns ComparisonMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.FunnelResponseMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ComparisonMetadata; /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FunnelResponseMetadata + * @returns ComparisonMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.FunnelResponseMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ComparisonMetadata; /** - * Verifies a FunnelResponseMetadata message. + * Verifies a ComparisonMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FunnelResponseMetadata + * @returns ComparisonMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.FunnelResponseMetadata; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ComparisonMetadata; /** - * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. - * @param message FunnelResponseMetadata + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. + * @param message ComparisonMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.FunnelResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FunnelResponseMetadata to JSON. + * Converts this ComparisonMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FunnelResponseMetadata + * Gets the default type url for ComparisonMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SamplingMetadata. */ - interface ISamplingMetadata { + /** Properties of a ConversionMetadata. */ + interface IConversionMetadata { - /** SamplingMetadata samplesReadCount */ - samplesReadCount?: (number|Long|string|null); + /** ConversionMetadata conversionAction */ + conversionAction?: (string|null); - /** SamplingMetadata samplingSpaceSize */ - samplingSpaceSize?: (number|Long|string|null); + /** ConversionMetadata displayName */ + displayName?: (string|null); } - /** Represents a SamplingMetadata. */ - class SamplingMetadata implements ISamplingMetadata { + /** Represents a ConversionMetadata. */ + class ConversionMetadata implements IConversionMetadata { /** - * Constructs a new SamplingMetadata. + * Constructs a new ConversionMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.data.v1alpha.ISamplingMetadata); + constructor(properties?: google.analytics.data.v1alpha.IConversionMetadata); - /** SamplingMetadata samplesReadCount. */ - public samplesReadCount: (number|Long|string); + /** ConversionMetadata conversionAction. */ + public conversionAction: string; - /** SamplingMetadata samplingSpaceSize. */ - public samplingSpaceSize: (number|Long|string); + /** ConversionMetadata displayName. */ + public displayName: string; /** - * Creates a new SamplingMetadata instance using the specified properties. + * Creates a new ConversionMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SamplingMetadata instance + * @returns ConversionMetadata instance */ - public static create(properties?: google.analytics.data.v1alpha.ISamplingMetadata): google.analytics.data.v1alpha.SamplingMetadata; + public static create(properties?: google.analytics.data.v1alpha.IConversionMetadata): google.analytics.data.v1alpha.ConversionMetadata; /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode + * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @param message ConversionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. - * @param message SamplingMetadata message or plain object to encode + * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. + * @param message ConversionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.data.v1alpha.ISamplingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.data.v1alpha.IConversionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SamplingMetadata message from the specified reader or buffer. + * Decodes a ConversionMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SamplingMetadata + * @returns ConversionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.SamplingMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1alpha.ConversionMetadata; /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SamplingMetadata + * @returns ConversionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.SamplingMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1alpha.ConversionMetadata; /** - * Verifies a SamplingMetadata message. + * Verifies a ConversionMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SamplingMetadata + * @returns ConversionMetadata */ - public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.SamplingMetadata; + public static fromObject(object: { [k: string]: any }): google.analytics.data.v1alpha.ConversionMetadata; /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. - * @param message SamplingMetadata + * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. + * @param message ConversionMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.data.v1alpha.SamplingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.data.v1alpha.ConversionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SamplingMetadata to JSON. + * Converts this ConversionMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SamplingMetadata + * Gets the default type url for ConversionMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** MetricAggregation enum. */ - enum MetricAggregation { - METRIC_AGGREGATION_UNSPECIFIED = 0, - TOTAL = 1, - MINIMUM = 5, - MAXIMUM = 6, - COUNT = 4 - } - - /** MetricType enum. */ - enum MetricType { - METRIC_TYPE_UNSPECIFIED = 0, - TYPE_INTEGER = 1, - TYPE_FLOAT = 2, - TYPE_SECONDS = 4, - TYPE_MILLISECONDS = 5, - TYPE_MINUTES = 6, - TYPE_HOURS = 7, - TYPE_STANDARD = 8, - TYPE_CURRENCY = 9, - TYPE_FEET = 10, - TYPE_MILES = 11, - TYPE_METERS = 12, - TYPE_KILOMETERS = 13 - } - - /** RestrictedMetricType enum. */ - enum RestrictedMetricType { - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, - COST_DATA = 1, - REVENUE_DATA = 2 - } - - /** SamplingLevel enum. */ - enum SamplingLevel { - SAMPLING_LEVEL_UNSPECIFIED = 0, - LOW = 1, - MEDIUM = 2, - UNSAMPLED = 3 - } } /** Namespace v1beta. */ diff --git a/packages/google-analytics-data/protos/protos.js b/packages/google-analytics-data/protos/protos.js index 28b263c28655..c5814ccb74ed 100644 --- a/packages/google-analytics-data/protos/protos.js +++ b/packages/google-analytics-data/protos/protos.js @@ -13210,39 +13210,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|sheetExportAudienceList}. - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @typedef SheetExportAudienceListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} [response] SheetExportAudienceListResponse - */ - - /** - * Calls SheetExportAudienceList. - * @function sheetExportAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object - * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceListCallback} callback Node-style callback called with the error, if any, and SheetExportAudienceListResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AlphaAnalyticsData.prototype.sheetExportAudienceList = function sheetExportAudienceList(request, callback) { - return this.rpcCall(sheetExportAudienceList, $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest, $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse, request, callback); - }, "name", { value: "SheetExportAudienceList" }); - - /** - * Calls SheetExportAudienceList. - * @function sheetExportAudienceList - * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData - * @instance - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} request SheetExportAudienceListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getAudienceList}. * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData @@ -13573,6 +13540,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|runReport}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef RunReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.RunReportResponse} [response] RunReportResponse + */ + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.RunReportCallback} callback Node-style callback called with the error, if any, and RunReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.runReport = function runReport(request, callback) { + return this.rpcCall(runReport, $root.google.analytics.data.v1alpha.RunReportRequest, $root.google.analytics.data.v1alpha.RunReportResponse, request, callback); + }, "name", { value: "RunReport" }); + + /** + * Calls RunReport. + * @function runReport + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IRunReportRequest} request RunReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.data.v1alpha.AlphaAnalyticsData|getMetadata}. + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @typedef GetMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.data.v1alpha.Metadata} [response] Metadata + */ + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @param {google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadataCallback} callback Node-style callback called with the error, if any, and Metadata + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlphaAnalyticsData.prototype.getMetadata = function getMetadata(request, callback) { + return this.rpcCall(getMetadata, $root.google.analytics.data.v1alpha.GetMetadataRequest, $root.google.analytics.data.v1alpha.Metadata, request, callback); + }, "name", { value: "GetMetadata" }); + + /** + * Calls GetMetadata. + * @function getMetadata + * @memberof google.analytics.data.v1alpha.AlphaAnalyticsData + * @instance + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} request GetMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return AlphaAnalyticsData; })(); @@ -18016,26 +18049,25 @@ return QueryAudienceListResponse; })(); - v1alpha.SheetExportAudienceListRequest = (function() { + v1alpha.AudienceRow = (function() { /** - * Properties of a SheetExportAudienceListRequest. + * Properties of an AudienceRow. * @memberof google.analytics.data.v1alpha - * @interface ISheetExportAudienceListRequest - * @property {string|null} [name] SheetExportAudienceListRequest name - * @property {number|Long|null} [offset] SheetExportAudienceListRequest offset - * @property {number|Long|null} [limit] SheetExportAudienceListRequest limit + * @interface IAudienceRow + * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues */ /** - * Constructs a new SheetExportAudienceListRequest. + * Constructs a new AudienceRow. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SheetExportAudienceListRequest. - * @implements ISheetExportAudienceListRequest + * @classdesc Represents an AudienceRow. + * @implements IAudienceRow * @constructor - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set */ - function SheetExportAudienceListRequest(properties) { + function AudienceRow(properties) { + this.dimensionValues = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18043,105 +18075,80 @@ } /** - * SheetExportAudienceListRequest name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest - * @instance - */ - SheetExportAudienceListRequest.prototype.name = ""; - - /** - * SheetExportAudienceListRequest offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest - * @instance - */ - SheetExportAudienceListRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SheetExportAudienceListRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * AudienceRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.AudienceRow * @instance */ - SheetExportAudienceListRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AudienceRow.prototype.dimensionValues = $util.emptyArray; /** - * Creates a new SheetExportAudienceListRequest instance using the specified properties. + * Creates a new AudienceRow instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest instance + * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance */ - SheetExportAudienceListRequest.create = function create(properties) { - return new SheetExportAudienceListRequest(properties); + AudienceRow.create = function create(properties) { + return new AudienceRow(properties); }; /** - * Encodes the specified SheetExportAudienceListRequest message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SheetExportAudienceListRequest.encode = function encode(message, writer) { + AudienceRow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limit); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SheetExportAudienceListRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListRequest.verify|verify} messages. + * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListRequest} message SheetExportAudienceListRequest message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SheetExportAudienceListRequest.encodeDelimited = function encodeDelimited(message, writer) { + AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer. + * Decodes an AudienceRow message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SheetExportAudienceListRequest.decode = function decode(reader, length, error) { + AudienceRow.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.offset = reader.int64(); - break; - } - case 3: { - message.limit = reader.int64(); + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); break; } default: @@ -18153,170 +18160,139 @@ }; /** - * Decodes a SheetExportAudienceListRequest message from the specified reader or buffer, length delimited. + * Decodes an AudienceRow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SheetExportAudienceListRequest.decodeDelimited = function decodeDelimited(reader) { + AudienceRow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SheetExportAudienceListRequest message. + * Verifies an AudienceRow message. * @function verify - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SheetExportAudienceListRequest.verify = function verify(message) { + AudienceRow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } return null; }; /** - * Creates a SheetExportAudienceListRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListRequest} SheetExportAudienceListRequest + * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow */ - SheetExportAudienceListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest) + AudienceRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) return object; - var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + var message = new $root.google.analytics.data.v1alpha.AudienceRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); + } + } return message; }; /** - * Creates a plain object from a SheetExportAudienceListRequest message. Also converts values to other types if specified. + * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static - * @param {google.analytics.data.v1alpha.SheetExportAudienceListRequest} message SheetExportAudienceListRequest + * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SheetExportAudienceListRequest.toObject = function toObject(message, options) { + AudienceRow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.dimensionValues = []; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; return object; }; /** - * Converts this SheetExportAudienceListRequest to JSON. + * Converts this AudienceRow to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @instance * @returns {Object.} JSON object */ - SheetExportAudienceListRequest.prototype.toJSON = function toJSON() { + AudienceRow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SheetExportAudienceListRequest + * Gets the default type url for AudienceRow * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListRequest + * @memberof google.analytics.data.v1alpha.AudienceRow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SheetExportAudienceListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListRequest"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; }; - return SheetExportAudienceListRequest; + return AudienceRow; })(); - v1alpha.SheetExportAudienceListResponse = (function() { + v1alpha.AudienceDimension = (function() { /** - * Properties of a SheetExportAudienceListResponse. + * Properties of an AudienceDimension. * @memberof google.analytics.data.v1alpha - * @interface ISheetExportAudienceListResponse - * @property {string|null} [spreadsheetUri] SheetExportAudienceListResponse spreadsheetUri - * @property {string|null} [spreadsheetId] SheetExportAudienceListResponse spreadsheetId - * @property {number|null} [rowCount] SheetExportAudienceListResponse rowCount - * @property {google.analytics.data.v1alpha.IAudienceList|null} [audienceList] SheetExportAudienceListResponse audienceList + * @interface IAudienceDimension + * @property {string|null} [dimensionName] AudienceDimension dimensionName */ /** - * Constructs a new SheetExportAudienceListResponse. + * Constructs a new AudienceDimension. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SheetExportAudienceListResponse. - * @implements ISheetExportAudienceListResponse + * @classdesc Represents an AudienceDimension. + * @implements IAudienceDimension * @constructor - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set */ - function SheetExportAudienceListResponse(properties) { + function AudienceDimension(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18324,146 +18300,77 @@ } /** - * SheetExportAudienceListResponse spreadsheetUri. - * @member {string|null|undefined} spreadsheetUri - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse - * @instance - */ - SheetExportAudienceListResponse.prototype.spreadsheetUri = null; - - /** - * SheetExportAudienceListResponse spreadsheetId. - * @member {string|null|undefined} spreadsheetId - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * AudienceDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.AudienceDimension * @instance */ - SheetExportAudienceListResponse.prototype.spreadsheetId = null; + AudienceDimension.prototype.dimensionName = ""; /** - * SheetExportAudienceListResponse rowCount. - * @member {number|null|undefined} rowCount - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse - * @instance - */ - SheetExportAudienceListResponse.prototype.rowCount = null; - - /** - * SheetExportAudienceListResponse audienceList. - * @member {google.analytics.data.v1alpha.IAudienceList|null|undefined} audienceList - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse - * @instance - */ - SheetExportAudienceListResponse.prototype.audienceList = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetUri", { - get: $util.oneOfGetter($oneOfFields = ["spreadsheetUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SheetExportAudienceListResponse.prototype, "_spreadsheetId", { - get: $util.oneOfGetter($oneOfFields = ["spreadsheetId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SheetExportAudienceListResponse.prototype, "_rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SheetExportAudienceListResponse.prototype, "_audienceList", { - get: $util.oneOfGetter($oneOfFields = ["audienceList"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SheetExportAudienceListResponse instance using the specified properties. + * Creates a new AudienceDimension instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse instance + * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance */ - SheetExportAudienceListResponse.create = function create(properties) { - return new SheetExportAudienceListResponse(properties); + AudienceDimension.create = function create(properties) { + return new AudienceDimension(properties); }; /** - * Encodes the specified SheetExportAudienceListResponse message. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SheetExportAudienceListResponse.encode = function encode(message, writer) { + AudienceDimension.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.spreadsheetUri != null && Object.hasOwnProperty.call(message, "spreadsheetUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.spreadsheetUri); - if (message.spreadsheetId != null && Object.hasOwnProperty.call(message, "spreadsheetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.spreadsheetId); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rowCount); - if (message.audienceList != null && Object.hasOwnProperty.call(message, "audienceList")) - $root.google.analytics.data.v1alpha.AudienceList.encode(message.audienceList, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); return writer; }; /** - * Encodes the specified SheetExportAudienceListResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SheetExportAudienceListResponse.verify|verify} messages. + * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static - * @param {google.analytics.data.v1alpha.ISheetExportAudienceListResponse} message SheetExportAudienceListResponse message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SheetExportAudienceListResponse.encodeDelimited = function encodeDelimited(message, writer) { + AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer. + * Decodes an AudienceDimension message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SheetExportAudienceListResponse.decode = function decode(reader, length, error) { + AudienceDimension.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.spreadsheetUri = reader.string(); - break; - } - case 2: { - message.spreadsheetId = reader.string(); - break; - } - case 3: { - message.rowCount = reader.int32(); - break; - } - case 4: { - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.decode(reader, reader.uint32()); + message.dimensionName = reader.string(); break; } default: @@ -18475,169 +18382,122 @@ }; /** - * Decodes a SheetExportAudienceListResponse message from the specified reader or buffer, length delimited. + * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SheetExportAudienceListResponse.decodeDelimited = function decodeDelimited(reader) { + AudienceDimension.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SheetExportAudienceListResponse message. + * Verifies an AudienceDimension message. * @function verify - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SheetExportAudienceListResponse.verify = function verify(message) { + AudienceDimension.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { - properties._spreadsheetUri = 1; - if (!$util.isString(message.spreadsheetUri)) - return "spreadsheetUri: string expected"; - } - if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { - properties._spreadsheetId = 1; - if (!$util.isString(message.spreadsheetId)) - return "spreadsheetId: string expected"; - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - properties._rowCount = 1; - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - } - if (message.audienceList != null && message.hasOwnProperty("audienceList")) { - properties._audienceList = 1; - { - var error = $root.google.analytics.data.v1alpha.AudienceList.verify(message.audienceList); - if (error) - return "audienceList." + error; - } - } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; return null; }; /** - * Creates a SheetExportAudienceListResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SheetExportAudienceListResponse} SheetExportAudienceListResponse + * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension */ - SheetExportAudienceListResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse) + AudienceDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) return object; - var message = new $root.google.analytics.data.v1alpha.SheetExportAudienceListResponse(); - if (object.spreadsheetUri != null) - message.spreadsheetUri = String(object.spreadsheetUri); - if (object.spreadsheetId != null) - message.spreadsheetId = String(object.spreadsheetId); - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.audienceList != null) { - if (typeof object.audienceList !== "object") - throw TypeError(".google.analytics.data.v1alpha.SheetExportAudienceListResponse.audienceList: object expected"); - message.audienceList = $root.google.analytics.data.v1alpha.AudienceList.fromObject(object.audienceList); - } + var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); return message; }; /** - * Creates a plain object from a SheetExportAudienceListResponse message. Also converts values to other types if specified. + * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static - * @param {google.analytics.data.v1alpha.SheetExportAudienceListResponse} message SheetExportAudienceListResponse + * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SheetExportAudienceListResponse.toObject = function toObject(message, options) { + AudienceDimension.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.spreadsheetUri != null && message.hasOwnProperty("spreadsheetUri")) { - object.spreadsheetUri = message.spreadsheetUri; - if (options.oneofs) - object._spreadsheetUri = "spreadsheetUri"; - } - if (message.spreadsheetId != null && message.hasOwnProperty("spreadsheetId")) { - object.spreadsheetId = message.spreadsheetId; - if (options.oneofs) - object._spreadsheetId = "spreadsheetId"; - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) { - object.rowCount = message.rowCount; - if (options.oneofs) - object._rowCount = "rowCount"; - } - if (message.audienceList != null && message.hasOwnProperty("audienceList")) { - object.audienceList = $root.google.analytics.data.v1alpha.AudienceList.toObject(message.audienceList, options); - if (options.oneofs) - object._audienceList = "audienceList"; - } + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; return object; }; /** - * Converts this SheetExportAudienceListResponse to JSON. + * Converts this AudienceDimension to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @instance * @returns {Object.} JSON object */ - SheetExportAudienceListResponse.prototype.toJSON = function toJSON() { + AudienceDimension.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SheetExportAudienceListResponse + * Gets the default type url for AudienceDimension * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SheetExportAudienceListResponse + * @memberof google.analytics.data.v1alpha.AudienceDimension * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SheetExportAudienceListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SheetExportAudienceListResponse"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; }; - return SheetExportAudienceListResponse; + return AudienceDimension; })(); - v1alpha.AudienceRow = (function() { + v1alpha.AudienceDimensionValue = (function() { /** - * Properties of an AudienceRow. + * Properties of an AudienceDimensionValue. * @memberof google.analytics.data.v1alpha - * @interface IAudienceRow - * @property {Array.|null} [dimensionValues] AudienceRow dimensionValues + * @interface IAudienceDimensionValue + * @property {string|null} [value] AudienceDimensionValue value */ /** - * Constructs a new AudienceRow. + * Constructs a new AudienceDimensionValue. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceRow. - * @implements IAudienceRow + * @classdesc Represents an AudienceDimensionValue. + * @implements IAudienceDimensionValue * @constructor - * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set */ - function AudienceRow(properties) { - this.dimensionValues = []; + function AudienceDimensionValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18645,80 +18505,91 @@ } /** - * AudienceRow dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1alpha.AudienceRow + * AudienceDimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @instance */ - AudienceRow.prototype.dimensionValues = $util.emptyArray; + AudienceDimensionValue.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new AudienceRow instance using the specified properties. + * AudienceDimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @instance + */ + Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionValue instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static - * @param {google.analytics.data.v1alpha.IAudienceRow=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow instance + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance */ - AudienceRow.create = function create(properties) { - return new AudienceRow(properties); + AudienceDimensionValue.create = function create(properties) { + return new AudienceDimensionValue(properties); }; /** - * Encodes the specified AudienceRow message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static - * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceRow.encode = function encode(message, writer) { + AudienceDimensionValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1alpha.AudienceDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified AudienceRow message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceRow.verify|verify} messages. + * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static - * @param {google.analytics.data.v1alpha.IAudienceRow} message AudienceRow message or plain object to encode + * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceRow.encodeDelimited = function encodeDelimited(message, writer) { + AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceRow message from the specified reader or buffer. + * Decodes an AudienceDimensionValue message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceRow.decode = function decode(reader, length, error) { + AudienceDimensionValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceRow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1alpha.AudienceDimensionValue.decode(reader, reader.uint32())); + message.value = reader.string(); break; } default: @@ -18730,139 +18601,137 @@ }; /** - * Decodes an AudienceRow message from the specified reader or buffer, length delimited. + * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceRow.decodeDelimited = function decodeDelimited(reader) { + AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceRow message. + * Verifies an AudienceDimensionValue message. * @function verify - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceRow.verify = function verify(message) { + AudienceDimensionValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.AudienceDimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; } return null; }; /** - * Creates an AudienceRow message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceRow} AudienceRow + * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue */ - AudienceRow.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceRow) + AudienceDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) return object; - var message = new $root.google.analytics.data.v1alpha.AudienceRow(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.AudienceRow.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.fromObject(object.dimensionValues[i]); - } - } + var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from an AudienceRow message. Also converts values to other types if specified. + * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static - * @param {google.analytics.data.v1alpha.AudienceRow} message AudienceRow + * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceRow.toObject = function toObject(message, options) { + AudienceDimensionValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dimensionValues = []; - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1alpha.AudienceDimensionValue.toObject(message.dimensionValues[j], options); + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; } return object; }; /** - * Converts this AudienceRow to JSON. + * Converts this AudienceDimensionValue to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @instance * @returns {Object.} JSON object */ - AudienceRow.prototype.toJSON = function toJSON() { + AudienceDimensionValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceRow + * Gets the default type url for AudienceDimensionValue * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceRow + * @memberof google.analytics.data.v1alpha.AudienceDimensionValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceRow"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; }; - return AudienceRow; + return AudienceDimensionValue; })(); - v1alpha.AudienceDimension = (function() { + v1alpha.RunFunnelReportRequest = (function() { /** - * Properties of an AudienceDimension. + * Properties of a RunFunnelReportRequest. * @memberof google.analytics.data.v1alpha - * @interface IAudienceDimension - * @property {string|null} [dimensionName] AudienceDimension dimensionName + * @interface IRunFunnelReportRequest + * @property {string|null} [property] RunFunnelReportRequest property + * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel + * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown + * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction + * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType + * @property {Array.|null} [segments] RunFunnelReportRequest segments + * @property {number|Long|null} [limit] RunFunnelReportRequest limit + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter + * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota */ /** - * Constructs a new AudienceDimension. + * Constructs a new RunFunnelReportRequest. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceDimension. - * @implements IAudienceDimension + * @classdesc Represents a RunFunnelReportRequest. + * @implements IRunFunnelReportRequest * @constructor - * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set */ - function AudienceDimension(properties) { + function RunFunnelReportRequest(properties) { + this.dateRanges = []; + this.segments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18870,296 +18739,209 @@ } /** - * AudienceDimension dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.AudienceDimension + * RunFunnelReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @instance */ - AudienceDimension.prototype.dimensionName = ""; + RunFunnelReportRequest.prototype.property = ""; /** - * Creates a new AudienceDimension instance using the specified properties. + * RunFunnelReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunFunnelReportRequest funnel. + * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnel = null; + + /** + * RunFunnelReportRequest funnelBreakdown. + * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelBreakdown = null; + + /** + * RunFunnelReportRequest funnelNextAction. + * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelNextAction = null; + + /** + * RunFunnelReportRequest funnelVisualizationType. + * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.funnelVisualizationType = 0; + + /** + * RunFunnelReportRequest segments. + * @member {Array.} segments + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.segments = $util.emptyArray; + + /** + * RunFunnelReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunFunnelReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.dimensionFilter = null; + + /** + * RunFunnelReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @instance + */ + RunFunnelReportRequest.prototype.returnPropertyQuota = false; + + /** + * Creates a new RunFunnelReportRequest instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.AudienceDimension + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance */ - AudienceDimension.create = function create(properties) { - return new AudienceDimension(properties); + RunFunnelReportRequest.create = function create(properties) { + return new RunFunnelReportRequest(properties); }; /** - * Encodes the specified AudienceDimension message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.AudienceDimension + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimension.encode = function encode(message, writer) { + RunFunnelReportRequest.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.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) + $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) + $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) + $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); return writer; }; /** - * Encodes the specified AudienceDimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimension.verify|verify} messages. + * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimension + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static - * @param {google.analytics.data.v1alpha.IAudienceDimension} message AudienceDimension message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimension.encodeDelimited = function encodeDelimited(message, writer) { + RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceDimension message from the specified reader or buffer. + * Decodes a RunFunnelReportRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.AudienceDimension + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimension.decode = function decode(reader, length, error) { + RunFunnelReportRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimension(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.dimensionName = reader.string(); + message.property = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceDimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceDimension message. - * @function verify - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceDimension.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; - - /** - * Creates an AudienceDimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceDimension} AudienceDimension - */ - AudienceDimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimension) - return object; - var message = new $root.google.analytics.data.v1alpha.AudienceDimension(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; - - /** - * Creates a plain object from an AudienceDimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {google.analytics.data.v1alpha.AudienceDimension} message AudienceDimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceDimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - return object; - }; - - /** - * Converts this AudienceDimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @instance - * @returns {Object.} JSON object - */ - AudienceDimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceDimension - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceDimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimension"; - }; - - return AudienceDimension; - })(); - - v1alpha.AudienceDimensionValue = (function() { - - /** - * Properties of an AudienceDimensionValue. - * @memberof google.analytics.data.v1alpha - * @interface IAudienceDimensionValue - * @property {string|null} [value] AudienceDimensionValue value - */ - - /** - * Constructs a new AudienceDimensionValue. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an AudienceDimensionValue. - * @implements IAudienceDimensionValue - * @constructor - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set - */ - function AudienceDimensionValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceDimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @instance - */ - AudienceDimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AudienceDimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @instance - */ - Object.defineProperty(AudienceDimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AudienceDimensionValue instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue instance - */ - AudienceDimensionValue.create = function create(properties) { - return new AudienceDimensionValue(properties); - }; - - /** - * Encodes the specified AudienceDimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified AudienceDimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.AudienceDimensionValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {google.analytics.data.v1alpha.IAudienceDimensionValue} message AudienceDimensionValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceDimensionValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); + case 2: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 3: { + message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); + break; + } + case 6: { + message.funnelVisualizationType = reader.int32(); + break; + } + case 7: { + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); + break; + } + case 9: { + message.limit = reader.int64(); + break; + } + case 10: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 12: { + message.returnPropertyQuota = reader.bool(); break; } default: @@ -19171,137 +18953,308 @@ }; /** - * Decodes an AudienceDimensionValue message from the specified reader or buffer, length delimited. + * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimensionValue.decodeDelimited = function decodeDelimited(reader) { + RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceDimensionValue message. + * Verifies a RunFunnelReportRequest message. * @function verify - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceDimensionValue.verify = function verify(message) { + RunFunnelReportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } } - return null; - }; + if (message.funnel != null && message.hasOwnProperty("funnel")) { + var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); + if (error) + return "funnel." + error; + } + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { + var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); + if (error) + return "funnelBreakdown." + error; + } + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { + var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); + if (error) + return "funnelNextAction." + error; + } + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + switch (message.funnelVisualizationType) { + default: + return "funnelVisualizationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + return null; + }; /** - * Creates an AudienceDimensionValue message from a plain object. Also converts values to their respective internal types. + * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.AudienceDimensionValue} AudienceDimensionValue + * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest */ - AudienceDimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.AudienceDimensionValue) + RunFunnelReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) return object; - var message = new $root.google.analytics.data.v1alpha.AudienceDimensionValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } + } + if (object.funnel != null) { + if (typeof object.funnel !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); + message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); + } + if (object.funnelBreakdown != null) { + if (typeof object.funnelBreakdown !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); + message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); + } + if (object.funnelNextAction != null) { + if (typeof object.funnelNextAction !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); + message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); + } + switch (object.funnelVisualizationType) { + default: + if (typeof object.funnelVisualizationType === "number") { + message.funnelVisualizationType = object.funnelVisualizationType; + break; + } + break; + case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": + case 0: + message.funnelVisualizationType = 0; + break; + case "STANDARD_FUNNEL": + case 1: + message.funnelVisualizationType = 1; + break; + case "TRENDED_FUNNEL": + case 2: + message.funnelVisualizationType = 2; + break; + } + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); + message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); + } + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); return message; }; /** - * Creates a plain object from an AudienceDimensionValue message. Also converts values to other types if specified. + * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static - * @param {google.analytics.data.v1alpha.AudienceDimensionValue} message AudienceDimensionValue + * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceDimensionValue.toObject = function toObject(message, options) { + RunFunnelReportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; + if (options.arrays || options.defaults) { + object.dateRanges = []; + object.segments = []; + } + if (options.defaults) { + object.property = ""; + object.funnel = null; + object.funnelBreakdown = null; + object.funnelNextAction = null; + object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.dimensionFilter = null; + object.returnPropertyQuota = false; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.funnel != null && message.hasOwnProperty("funnel")) + object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); + if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) + object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); + if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) + object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); + if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) + object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); } + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; return object; }; /** - * Converts this AudienceDimensionValue to JSON. + * Converts this RunFunnelReportRequest to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @instance * @returns {Object.} JSON object */ - AudienceDimensionValue.prototype.toJSON = function toJSON() { + RunFunnelReportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceDimensionValue + * Gets the default type url for RunFunnelReportRequest * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.AudienceDimensionValue + * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.AudienceDimensionValue"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; }; - return AudienceDimensionValue; + /** + * FunnelVisualizationType enum. + * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType + * @enum {number} + * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value + * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value + * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value + */ + RunFunnelReportRequest.FunnelVisualizationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD_FUNNEL"] = 1; + values[valuesById[2] = "TRENDED_FUNNEL"] = 2; + return values; + })(); + + return RunFunnelReportRequest; })(); - v1alpha.RunFunnelReportRequest = (function() { + v1alpha.RunFunnelReportResponse = (function() { /** - * Properties of a RunFunnelReportRequest. + * Properties of a RunFunnelReportResponse. * @memberof google.analytics.data.v1alpha - * @interface IRunFunnelReportRequest - * @property {string|null} [property] RunFunnelReportRequest property - * @property {Array.|null} [dateRanges] RunFunnelReportRequest dateRanges - * @property {google.analytics.data.v1alpha.IFunnel|null} [funnel] RunFunnelReportRequest funnel - * @property {google.analytics.data.v1alpha.IFunnelBreakdown|null} [funnelBreakdown] RunFunnelReportRequest funnelBreakdown - * @property {google.analytics.data.v1alpha.IFunnelNextAction|null} [funnelNextAction] RunFunnelReportRequest funnelNextAction - * @property {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType|null} [funnelVisualizationType] RunFunnelReportRequest funnelVisualizationType - * @property {Array.|null} [segments] RunFunnelReportRequest segments - * @property {number|Long|null} [limit] RunFunnelReportRequest limit - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunFunnelReportRequest dimensionFilter - * @property {boolean|null} [returnPropertyQuota] RunFunnelReportRequest returnPropertyQuota + * @interface IRunFunnelReportResponse + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable + * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota + * @property {string|null} [kind] RunFunnelReportResponse kind */ /** - * Constructs a new RunFunnelReportRequest. + * Constructs a new RunFunnelReportResponse. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunFunnelReportRequest. - * @implements IRunFunnelReportRequest + * @classdesc Represents a RunFunnelReportResponse. + * @implements IRunFunnelReportResponse * @constructor - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set */ - function RunFunnelReportRequest(properties) { - this.dateRanges = []; - this.segments = []; + function RunFunnelReportResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19309,209 +19262,119 @@ } /** - * RunFunnelReportRequest property. - * @member {string} property - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.property = ""; - - /** - * RunFunnelReportRequest dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.dateRanges = $util.emptyArray; - - /** - * RunFunnelReportRequest funnel. - * @member {google.analytics.data.v1alpha.IFunnel|null|undefined} funnel - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnel = null; - - /** - * RunFunnelReportRequest funnelBreakdown. - * @member {google.analytics.data.v1alpha.IFunnelBreakdown|null|undefined} funnelBreakdown - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelBreakdown = null; - - /** - * RunFunnelReportRequest funnelNextAction. - * @member {google.analytics.data.v1alpha.IFunnelNextAction|null|undefined} funnelNextAction - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelNextAction = null; - - /** - * RunFunnelReportRequest funnelVisualizationType. - * @member {google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType} funnelVisualizationType - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest - * @instance - */ - RunFunnelReportRequest.prototype.funnelVisualizationType = 0; - - /** - * RunFunnelReportRequest segments. - * @member {Array.} segments - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * RunFunnelReportResponse funnelTable. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @instance */ - RunFunnelReportRequest.prototype.segments = $util.emptyArray; + RunFunnelReportResponse.prototype.funnelTable = null; /** - * RunFunnelReportRequest limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * RunFunnelReportResponse funnelVisualization. + * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @instance */ - RunFunnelReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RunFunnelReportResponse.prototype.funnelVisualization = null; /** - * RunFunnelReportRequest dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * RunFunnelReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @instance */ - RunFunnelReportRequest.prototype.dimensionFilter = null; + RunFunnelReportResponse.prototype.propertyQuota = null; /** - * RunFunnelReportRequest returnPropertyQuota. - * @member {boolean} returnPropertyQuota - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * RunFunnelReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @instance */ - RunFunnelReportRequest.prototype.returnPropertyQuota = false; + RunFunnelReportResponse.prototype.kind = ""; /** - * Creates a new RunFunnelReportRequest instance using the specified properties. + * Creates a new RunFunnelReportResponse instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest instance + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance */ - RunFunnelReportRequest.create = function create(properties) { - return new RunFunnelReportRequest(properties); + RunFunnelReportResponse.create = function create(properties) { + return new RunFunnelReportResponse(properties); }; /** - * Encodes the specified RunFunnelReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunFunnelReportRequest.encode = function encode(message, writer) { + RunFunnelReportResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.dateRanges != null && message.dateRanges.length) - for (var i = 0; i < message.dateRanges.length; ++i) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.funnel != null && Object.hasOwnProperty.call(message, "funnel")) - $root.google.analytics.data.v1alpha.Funnel.encode(message.funnel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelBreakdown != null && Object.hasOwnProperty.call(message, "funnelBreakdown")) - $root.google.analytics.data.v1alpha.FunnelBreakdown.encode(message.funnelBreakdown, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.funnelNextAction != null && Object.hasOwnProperty.call(message, "funnelNextAction")) - $root.google.analytics.data.v1alpha.FunnelNextAction.encode(message.funnelNextAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.funnelVisualizationType != null && Object.hasOwnProperty.call(message, "funnelVisualizationType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.funnelVisualizationType); - if (message.segments != null && message.segments.length) - for (var i = 0; i < message.segments.length; ++i) - $root.google.analytics.data.v1alpha.Segment.encode(message.segments[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.limit); - if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.returnPropertyQuota); + if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) + $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); return writer; }; /** - * Encodes the specified RunFunnelReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportRequest.verify|verify} messages. + * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportRequest} message RunFunnelReportRequest message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunFunnelReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer. + * Decodes a RunFunnelReportResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunFunnelReportRequest.decode = function decode(reader, length, error) { + RunFunnelReportResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.property = reader.string(); + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.dateRanges && message.dateRanges.length)) - message.dateRanges = []; - message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); break; } case 3: { - message.funnel = $root.google.analytics.data.v1alpha.Funnel.decode(reader, reader.uint32()); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); break; } case 4: { - message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.decode(reader, reader.uint32()); - break; - } - case 5: { - message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.decode(reader, reader.uint32()); - break; - } - case 6: { - message.funnelVisualizationType = reader.int32(); - break; - } - case 7: { - if (!(message.segments && message.segments.length)) - message.segments = []; - message.segments.push($root.google.analytics.data.v1alpha.Segment.decode(reader, reader.uint32())); - break; - } - case 9: { - message.limit = reader.int64(); - break; - } - case 10: { - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 12: { - message.returnPropertyQuota = reader.bool(); + message.kind = reader.string(); break; } default: @@ -19523,308 +19386,164 @@ }; /** - * Decodes a RunFunnelReportRequest message from the specified reader or buffer, length delimited. + * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunFunnelReportRequest.decodeDelimited = function decodeDelimited(reader) { + RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunFunnelReportRequest message. + * Verifies a RunFunnelReportResponse message. * @function verify - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunFunnelReportRequest.verify = function verify(message) { + RunFunnelReportResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { - if (!Array.isArray(message.dateRanges)) - return "dateRanges: array expected"; - for (var i = 0; i < message.dateRanges.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); - if (error) - return "dateRanges." + error; - } - } - if (message.funnel != null && message.hasOwnProperty("funnel")) { - var error = $root.google.analytics.data.v1alpha.Funnel.verify(message.funnel); - if (error) - return "funnel." + error; - } - if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) { - var error = $root.google.analytics.data.v1alpha.FunnelBreakdown.verify(message.funnelBreakdown); + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); if (error) - return "funnelBreakdown." + error; + return "funnelTable." + error; } - if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) { - var error = $root.google.analytics.data.v1alpha.FunnelNextAction.verify(message.funnelNextAction); + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { + var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); if (error) - return "funnelNextAction." + error; - } - if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) - switch (message.funnelVisualizationType) { - default: - return "funnelVisualizationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.segments != null && message.hasOwnProperty("segments")) { - if (!Array.isArray(message.segments)) - return "segments: array expected"; - for (var i = 0; i < message.segments.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Segment.verify(message.segments[i]); - if (error) - return "segments." + error; - } + return "funnelVisualization." + error; } - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); if (error) - return "dimensionFilter." + error; + return "propertyQuota." + error; } - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - if (typeof message.returnPropertyQuota !== "boolean") - return "returnPropertyQuota: boolean expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; return null; }; /** - * Creates a RunFunnelReportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunFunnelReportRequest} RunFunnelReportRequest + * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse */ - RunFunnelReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportRequest) + RunFunnelReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) return object; - var message = new $root.google.analytics.data.v1alpha.RunFunnelReportRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.dateRanges) { - if (!Array.isArray(object.dateRanges)) - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: array expected"); - message.dateRanges = []; - for (var i = 0; i < object.dateRanges.length; ++i) { - if (typeof object.dateRanges[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dateRanges: object expected"); - message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); - } - } - if (object.funnel != null) { - if (typeof object.funnel !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnel: object expected"); - message.funnel = $root.google.analytics.data.v1alpha.Funnel.fromObject(object.funnel); - } - if (object.funnelBreakdown != null) { - if (typeof object.funnelBreakdown !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelBreakdown: object expected"); - message.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.fromObject(object.funnelBreakdown); - } - if (object.funnelNextAction != null) { - if (typeof object.funnelNextAction !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.funnelNextAction: object expected"); - message.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.fromObject(object.funnelNextAction); - } - switch (object.funnelVisualizationType) { - default: - if (typeof object.funnelVisualizationType === "number") { - message.funnelVisualizationType = object.funnelVisualizationType; - break; - } - break; - case "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED": - case 0: - message.funnelVisualizationType = 0; - break; - case "STANDARD_FUNNEL": - case 1: - message.funnelVisualizationType = 1; - break; - case "TRENDED_FUNNEL": - case 2: - message.funnelVisualizationType = 2; - break; + var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + if (object.funnelTable != null) { + if (typeof object.funnelTable !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); + message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); } - if (object.segments) { - if (!Array.isArray(object.segments)) - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: array expected"); - message.segments = []; - for (var i = 0; i < object.segments.length; ++i) { - if (typeof object.segments[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.segments: object expected"); - message.segments[i] = $root.google.analytics.data.v1alpha.Segment.fromObject(object.segments[i]); - } + if (object.funnelVisualization != null) { + if (typeof object.funnelVisualization !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); + message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); - if (object.dimensionFilter != null) { - if (typeof object.dimensionFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportRequest.dimensionFilter: object expected"); - message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); } - if (object.returnPropertyQuota != null) - message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.kind != null) + message.kind = String(object.kind); return message; }; /** - * Creates a plain object from a RunFunnelReportRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static - * @param {google.analytics.data.v1alpha.RunFunnelReportRequest} message RunFunnelReportRequest + * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunFunnelReportRequest.toObject = function toObject(message, options) { + RunFunnelReportResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dateRanges = []; - object.segments = []; - } if (options.defaults) { - object.property = ""; - object.funnel = null; - object.funnelBreakdown = null; - object.funnelNextAction = null; - object.funnelVisualizationType = options.enums === String ? "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.dimensionFilter = null; - object.returnPropertyQuota = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.dateRanges && message.dateRanges.length) { - object.dateRanges = []; - for (var j = 0; j < message.dateRanges.length; ++j) - object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); - } - if (message.funnel != null && message.hasOwnProperty("funnel")) - object.funnel = $root.google.analytics.data.v1alpha.Funnel.toObject(message.funnel, options); - if (message.funnelBreakdown != null && message.hasOwnProperty("funnelBreakdown")) - object.funnelBreakdown = $root.google.analytics.data.v1alpha.FunnelBreakdown.toObject(message.funnelBreakdown, options); - if (message.funnelNextAction != null && message.hasOwnProperty("funnelNextAction")) - object.funnelNextAction = $root.google.analytics.data.v1alpha.FunnelNextAction.toObject(message.funnelNextAction, options); - if (message.funnelVisualizationType != null && message.hasOwnProperty("funnelVisualizationType")) - object.funnelVisualizationType = options.enums === String ? $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] === undefined ? message.funnelVisualizationType : $root.google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType[message.funnelVisualizationType] : message.funnelVisualizationType; - if (message.segments && message.segments.length) { - object.segments = []; - for (var j = 0; j < message.segments.length; ++j) - object.segments[j] = $root.google.analytics.data.v1alpha.Segment.toObject(message.segments[j], options); + object.funnelTable = null; + object.funnelVisualization = null; + object.propertyQuota = null; + object.kind = ""; } - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) - object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); - if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) - object.returnPropertyQuota = message.returnPropertyQuota; + if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) + object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); + if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) + object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; return object; }; /** - * Converts this RunFunnelReportRequest to JSON. + * Converts this RunFunnelReportResponse to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @instance * @returns {Object.} JSON object */ - RunFunnelReportRequest.prototype.toJSON = function toJSON() { + RunFunnelReportResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunFunnelReportRequest + * Gets the default type url for RunFunnelReportResponse * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunFunnelReportRequest + * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunFunnelReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportRequest"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; }; - /** - * FunnelVisualizationType enum. - * @name google.analytics.data.v1alpha.RunFunnelReportRequest.FunnelVisualizationType - * @enum {number} - * @property {number} FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED=0 FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED value - * @property {number} STANDARD_FUNNEL=1 STANDARD_FUNNEL value - * @property {number} TRENDED_FUNNEL=2 TRENDED_FUNNEL value - */ - RunFunnelReportRequest.FunnelVisualizationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD_FUNNEL"] = 1; - values[valuesById[2] = "TRENDED_FUNNEL"] = 2; - return values; - })(); - - return RunFunnelReportRequest; + return RunFunnelReportResponse; })(); - v1alpha.RunFunnelReportResponse = (function() { + v1alpha.ReportTask = (function() { /** - * Properties of a RunFunnelReportResponse. + * Properties of a ReportTask. * @memberof google.analytics.data.v1alpha - * @interface IRunFunnelReportResponse - * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelTable] RunFunnelReportResponse funnelTable - * @property {google.analytics.data.v1alpha.IFunnelSubReport|null} [funnelVisualization] RunFunnelReportResponse funnelVisualization - * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunFunnelReportResponse propertyQuota - * @property {string|null} [kind] RunFunnelReportResponse kind + * @interface IReportTask + * @property {string|null} [name] ReportTask name + * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition + * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata */ /** - * Constructs a new RunFunnelReportResponse. + * Constructs a new ReportTask. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a RunFunnelReportResponse. - * @implements IRunFunnelReportResponse + * @classdesc Represents a ReportTask. + * @implements IReportTask * @constructor - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set */ - function RunFunnelReportResponse(properties) { + function ReportTask(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19832,119 +19551,105 @@ } /** - * RunFunnelReportResponse funnelTable. - * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelTable - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse - * @instance - */ - RunFunnelReportResponse.prototype.funnelTable = null; - - /** - * RunFunnelReportResponse funnelVisualization. - * @member {google.analytics.data.v1alpha.IFunnelSubReport|null|undefined} funnelVisualization - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * ReportTask name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.ReportTask * @instance */ - RunFunnelReportResponse.prototype.funnelVisualization = null; + ReportTask.prototype.name = ""; /** - * RunFunnelReportResponse propertyQuota. - * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * ReportTask reportDefinition. + * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition + * @memberof google.analytics.data.v1alpha.ReportTask * @instance */ - RunFunnelReportResponse.prototype.propertyQuota = null; + ReportTask.prototype.reportDefinition = null; /** - * RunFunnelReportResponse kind. - * @member {string} kind - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * ReportTask reportMetadata. + * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata + * @memberof google.analytics.data.v1alpha.ReportTask * @instance */ - RunFunnelReportResponse.prototype.kind = ""; + ReportTask.prototype.reportMetadata = null; /** - * Creates a new RunFunnelReportResponse instance using the specified properties. + * Creates a new ReportTask instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse instance + * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance */ - RunFunnelReportResponse.create = function create(properties) { - return new RunFunnelReportResponse(properties); + ReportTask.create = function create(properties) { + return new ReportTask(properties); }; /** - * Encodes the specified RunFunnelReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunFunnelReportResponse.encode = function encode(message, writer) { + ReportTask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.funnelTable != null && Object.hasOwnProperty.call(message, "funnelTable")) - $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.funnelVisualization != null && Object.hasOwnProperty.call(message, "funnelVisualization")) - $root.google.analytics.data.v1alpha.FunnelSubReport.encode(message.funnelVisualization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) - $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) + $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) + $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunFunnelReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunFunnelReportResponse.verify|verify} messages. + * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static - * @param {google.analytics.data.v1alpha.IRunFunnelReportResponse} message RunFunnelReportResponse message or plain object to encode + * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunFunnelReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReportTask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer. + * Decodes a ReportTask message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunFunnelReportResponse.decode = function decode(reader, length, error) { + ReportTask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.decode(reader, reader.uint32()); + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); break; } case 3: { - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); - break; - } - case 4: { - message.kind = reader.string(); + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); break; } default: @@ -19956,531 +19661,256 @@ }; /** - * Decodes a RunFunnelReportResponse message from the specified reader or buffer, length delimited. + * Decodes a ReportTask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunFunnelReportResponse.decodeDelimited = function decodeDelimited(reader) { + ReportTask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunFunnelReportResponse message. + * Verifies a ReportTask message. * @function verify - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunFunnelReportResponse.verify = function verify(message) { + ReportTask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) { - var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelTable); - if (error) - return "funnelTable." + error; - } - if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) { - var error = $root.google.analytics.data.v1alpha.FunnelSubReport.verify(message.funnelVisualization); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); if (error) - return "funnelVisualization." + error; + return "reportDefinition." + error; } - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { - var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { + var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); if (error) - return "propertyQuota." + error; + return "reportMetadata." + error; } - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; return null; }; /** - * Creates a RunFunnelReportResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.RunFunnelReportResponse} RunFunnelReportResponse + * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask */ - RunFunnelReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.RunFunnelReportResponse) + ReportTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) return object; - var message = new $root.google.analytics.data.v1alpha.RunFunnelReportResponse(); - if (object.funnelTable != null) { - if (typeof object.funnelTable !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelTable: object expected"); - message.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelTable); - } - if (object.funnelVisualization != null) { - if (typeof object.funnelVisualization !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.funnelVisualization: object expected"); - message.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.fromObject(object.funnelVisualization); + var message = new $root.google.analytics.data.v1alpha.ReportTask(); + if (object.name != null) + message.name = String(object.name); + if (object.reportDefinition != null) { + if (typeof object.reportDefinition !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); + message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); } - if (object.propertyQuota != null) { - if (typeof object.propertyQuota !== "object") - throw TypeError(".google.analytics.data.v1alpha.RunFunnelReportResponse.propertyQuota: object expected"); - message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + if (object.reportMetadata != null) { + if (typeof object.reportMetadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); + message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); } - if (object.kind != null) - message.kind = String(object.kind); return message; }; /** - * Creates a plain object from a RunFunnelReportResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReportTask message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static - * @param {google.analytics.data.v1alpha.RunFunnelReportResponse} message RunFunnelReportResponse + * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunFunnelReportResponse.toObject = function toObject(message, options) { + ReportTask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.funnelTable = null; - object.funnelVisualization = null; - object.propertyQuota = null; - object.kind = ""; + object.name = ""; + object.reportDefinition = null; + object.reportMetadata = null; } - if (message.funnelTable != null && message.hasOwnProperty("funnelTable")) - object.funnelTable = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelTable, options); - if (message.funnelVisualization != null && message.hasOwnProperty("funnelVisualization")) - object.funnelVisualization = $root.google.analytics.data.v1alpha.FunnelSubReport.toObject(message.funnelVisualization, options); - if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) - object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) + object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); + if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) + object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); return object; }; /** - * Converts this RunFunnelReportResponse to JSON. + * Converts this ReportTask to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @instance * @returns {Object.} JSON object */ - RunFunnelReportResponse.prototype.toJSON = function toJSON() { + ReportTask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunFunnelReportResponse + * Gets the default type url for ReportTask * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.RunFunnelReportResponse + * @memberof google.analytics.data.v1alpha.ReportTask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunFunnelReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.RunFunnelReportResponse"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; }; - return RunFunnelReportResponse; - })(); - - v1alpha.ReportTask = (function() { + ReportTask.ReportDefinition = (function() { - /** - * Properties of a ReportTask. - * @memberof google.analytics.data.v1alpha - * @interface IReportTask - * @property {string|null} [name] ReportTask name - * @property {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null} [reportDefinition] ReportTask reportDefinition - * @property {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null} [reportMetadata] ReportTask reportMetadata - */ + /** + * Properties of a ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @interface IReportDefinition + * @property {Array.|null} [dimensions] ReportDefinition dimensions + * @property {Array.|null} [metrics] ReportDefinition metrics + * @property {Array.|null} [dateRanges] ReportDefinition dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter + * @property {number|Long|null} [offset] ReportDefinition offset + * @property {number|Long|null} [limit] ReportDefinition limit + * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations + * @property {Array.|null} [orderBys] ReportDefinition orderBys + * @property {string|null} [currencyCode] ReportDefinition currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec + * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows + * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel + */ - /** - * Constructs a new ReportTask. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ReportTask. - * @implements IReportTask - * @constructor - * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set - */ - function ReportTask(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ReportDefinition. + * @memberof google.analytics.data.v1alpha.ReportTask + * @classdesc Represents a ReportDefinition. + * @implements IReportDefinition + * @constructor + * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set + */ + function ReportDefinition(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ReportTask name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.name = ""; + /** + * ReportDefinition dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensions = $util.emptyArray; - /** - * ReportTask reportDefinition. - * @member {google.analytics.data.v1alpha.ReportTask.IReportDefinition|null|undefined} reportDefinition - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.reportDefinition = null; + /** + * ReportDefinition metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metrics = $util.emptyArray; - /** - * ReportTask reportMetadata. - * @member {google.analytics.data.v1alpha.ReportTask.IReportMetadata|null|undefined} reportMetadata - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - */ - ReportTask.prototype.reportMetadata = null; + /** + * ReportDefinition dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dateRanges = $util.emptyArray; - /** - * Creates a new ReportTask instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask instance - */ - ReportTask.create = function create(properties) { - return new ReportTask(properties); - }; + /** + * ReportDefinition dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.dimensionFilter = null; - /** - * Encodes the specified ReportTask message. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.reportDefinition != null && Object.hasOwnProperty.call(message, "reportDefinition")) - $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.encode(message.reportDefinition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.reportMetadata != null && Object.hasOwnProperty.call(message, "reportMetadata")) - $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.encode(message.reportMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * ReportDefinition metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricFilter = null; - /** - * Encodes the specified ReportTask message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ReportTask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.IReportTask} message ReportTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportTask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ReportDefinition offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Decodes a ReportTask message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ReportTask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.decode(reader, reader.uint32()); - break; - } - case 3: { - message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ReportDefinition limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Decodes a ReportTask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportTask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ReportDefinition metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.metricAggregations = $util.emptyArray; - /** - * Verifies a ReportTask message. - * @function verify - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportTask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) { - var error = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.verify(message.reportDefinition); - if (error) - return "reportDefinition." + error; - } - if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) { - var error = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.verify(message.reportMetadata); - if (error) - return "reportMetadata." + error; - } - return null; - }; + /** + * ReportDefinition orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.orderBys = $util.emptyArray; - /** - * Creates a ReportTask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ReportTask} ReportTask - */ - ReportTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ReportTask) - return object; - var message = new $root.google.analytics.data.v1alpha.ReportTask(); - if (object.name != null) - message.name = String(object.name); - if (object.reportDefinition != null) { - if (typeof object.reportDefinition !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportDefinition: object expected"); - message.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.fromObject(object.reportDefinition); - } - if (object.reportMetadata != null) { - if (typeof object.reportMetadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.ReportTask.reportMetadata: object expected"); - message.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.fromObject(object.reportMetadata); - } - return message; - }; + /** + * ReportDefinition currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.currencyCode = ""; - /** - * Creates a plain object from a ReportTask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {google.analytics.data.v1alpha.ReportTask} message ReportTask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportTask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.reportDefinition = null; - object.reportMetadata = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.reportDefinition != null && message.hasOwnProperty("reportDefinition")) - object.reportDefinition = $root.google.analytics.data.v1alpha.ReportTask.ReportDefinition.toObject(message.reportDefinition, options); - if (message.reportMetadata != null && message.hasOwnProperty("reportMetadata")) - object.reportMetadata = $root.google.analytics.data.v1alpha.ReportTask.ReportMetadata.toObject(message.reportMetadata, options); - return object; - }; - - /** - * Converts this ReportTask to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ReportTask - * @instance - * @returns {Object.} JSON object - */ - ReportTask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportTask - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ReportTask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ReportTask"; - }; - - ReportTask.ReportDefinition = (function() { - - /** - * Properties of a ReportDefinition. - * @memberof google.analytics.data.v1alpha.ReportTask - * @interface IReportDefinition - * @property {Array.|null} [dimensions] ReportDefinition dimensions - * @property {Array.|null} [metrics] ReportDefinition metrics - * @property {Array.|null} [dateRanges] ReportDefinition dateRanges - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] ReportDefinition dimensionFilter - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] ReportDefinition metricFilter - * @property {number|Long|null} [offset] ReportDefinition offset - * @property {number|Long|null} [limit] ReportDefinition limit - * @property {Array.|null} [metricAggregations] ReportDefinition metricAggregations - * @property {Array.|null} [orderBys] ReportDefinition orderBys - * @property {string|null} [currencyCode] ReportDefinition currencyCode - * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec - * @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows - * @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel - */ - - /** - * Constructs a new ReportDefinition. - * @memberof google.analytics.data.v1alpha.ReportTask - * @classdesc Represents a ReportDefinition. - * @implements IReportDefinition - * @constructor - * @param {google.analytics.data.v1alpha.ReportTask.IReportDefinition=} [properties] Properties to set - */ - function ReportDefinition(properties) { - this.dimensions = []; - this.metrics = []; - this.dateRanges = []; - this.metricAggregations = []; - this.orderBys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReportDefinition dimensions. - * @member {Array.} dimensions - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dimensions = $util.emptyArray; - - /** - * ReportDefinition metrics. - * @member {Array.} metrics - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metrics = $util.emptyArray; - - /** - * ReportDefinition dateRanges. - * @member {Array.} dateRanges - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dateRanges = $util.emptyArray; - - /** - * ReportDefinition dimensionFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.dimensionFilter = null; - - /** - * ReportDefinition metricFilter. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metricFilter = null; - - /** - * ReportDefinition offset. - * @member {number|Long} offset - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReportDefinition limit. - * @member {number|Long} limit - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReportDefinition metricAggregations. - * @member {Array.} metricAggregations - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.metricAggregations = $util.emptyArray; - - /** - * ReportDefinition orderBys. - * @member {Array.} orderBys - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.orderBys = $util.emptyArray; - - /** - * ReportDefinition currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.currencyCode = ""; - - /** - * ReportDefinition cohortSpec. - * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec - * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition - * @instance - */ - ReportDefinition.prototype.cohortSpec = null; + /** + * ReportDefinition cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition + * @instance + */ + ReportDefinition.prototype.cohortSpec = null; /** * ReportDefinition keepEmptyRows. @@ -23406,26 +22836,45 @@ return ListReportTasksResponse; })(); - v1alpha.DateRange = (function() { + v1alpha.RunReportRequest = (function() { /** - * Properties of a DateRange. + * Properties of a RunReportRequest. * @memberof google.analytics.data.v1alpha - * @interface IDateRange - * @property {string|null} [startDate] DateRange startDate - * @property {string|null} [endDate] DateRange endDate - * @property {string|null} [name] DateRange name + * @interface IRunReportRequest + * @property {string|null} [property] RunReportRequest property + * @property {Array.|null} [dimensions] RunReportRequest dimensions + * @property {Array.|null} [metrics] RunReportRequest metrics + * @property {Array.|null} [dateRanges] RunReportRequest dateRanges + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] RunReportRequest dimensionFilter + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [metricFilter] RunReportRequest metricFilter + * @property {number|Long|null} [offset] RunReportRequest offset + * @property {number|Long|null} [limit] RunReportRequest limit + * @property {Array.|null} [metricAggregations] RunReportRequest metricAggregations + * @property {Array.|null} [orderBys] RunReportRequest orderBys + * @property {string|null} [currencyCode] RunReportRequest currencyCode + * @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec + * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows + * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota + * @property {Array.|null} [comparisons] RunReportRequest comparisons + * @property {google.analytics.data.v1alpha.IConversionSpec|null} [conversionSpec] RunReportRequest conversionSpec */ /** - * Constructs a new DateRange. + * Constructs a new RunReportRequest. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DateRange. - * @implements IDateRange + * @classdesc Represents a RunReportRequest. + * @implements IRunReportRequest * @constructor - * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set */ - function DateRange(properties) { + function RunReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.metricAggregations = []; + this.orderBys = []; + this.comparisons = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23433,346 +22882,317 @@ } /** - * DateRange startDate. - * @member {string} startDate - * @memberof google.analytics.data.v1alpha.DateRange + * RunReportRequest property. + * @member {string} property + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance */ - DateRange.prototype.startDate = ""; + RunReportRequest.prototype.property = ""; /** - * DateRange endDate. - * @member {string} endDate - * @memberof google.analytics.data.v1alpha.DateRange + * RunReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance */ - DateRange.prototype.endDate = ""; + RunReportRequest.prototype.dimensions = $util.emptyArray; /** - * DateRange name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.DateRange + * RunReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance */ - DateRange.prototype.name = ""; + RunReportRequest.prototype.metrics = $util.emptyArray; /** - * Creates a new DateRange instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance + * RunReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.create = function create(properties) { - return new DateRange(properties); - }; + RunReportRequest.prototype.dateRanges = $util.emptyArray; /** - * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * RunReportRequest dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; + RunReportRequest.prototype.dimensionFilter = null; /** - * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * RunReportRequest metricFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + RunReportRequest.prototype.metricFilter = null; /** - * Decodes a DateRange message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DateRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startDate = reader.string(); - break; - } - case 2: { - message.endDate = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DateRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DateRange} DateRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * RunReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + RunReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Verifies a DateRange message. - * @function verify - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * RunReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startDate != null && message.hasOwnProperty("startDate")) - if (!$util.isString(message.startDate)) - return "startDate: string expected"; - if (message.endDate != null && message.hasOwnProperty("endDate")) - if (!$util.isString(message.endDate)) - return "endDate: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + RunReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a DateRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DateRange} DateRange + * RunReportRequest metricAggregations. + * @member {Array.} metricAggregations + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DateRange) - return object; - var message = new $root.google.analytics.data.v1alpha.DateRange(); - if (object.startDate != null) - message.startDate = String(object.startDate); - if (object.endDate != null) - message.endDate = String(object.endDate); - if (object.name != null) - message.name = String(object.name); - return message; - }; + RunReportRequest.prototype.metricAggregations = $util.emptyArray; /** - * Creates a plain object from a DateRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {google.analytics.data.v1alpha.DateRange} message DateRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * RunReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startDate = ""; - object.endDate = ""; - object.name = ""; - } - if (message.startDate != null && message.hasOwnProperty("startDate")) - object.startDate = message.startDate; - if (message.endDate != null && message.hasOwnProperty("endDate")) - object.endDate = message.endDate; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + RunReportRequest.prototype.orderBys = $util.emptyArray; /** - * Converts this DateRange to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DateRange + * RunReportRequest currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance - * @returns {Object.} JSON object */ - DateRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + RunReportRequest.prototype.currencyCode = ""; /** - * Gets the default type url for DateRange - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DateRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * RunReportRequest cohortSpec. + * @member {google.analytics.data.v1alpha.ICohortSpec|null|undefined} cohortSpec + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; - }; - - return DateRange; - })(); - - v1alpha.Dimension = (function() { + RunReportRequest.prototype.cohortSpec = null; /** - * Properties of a Dimension. - * @memberof google.analytics.data.v1alpha - * @interface IDimension - * @property {string|null} [name] Dimension name - * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression + * RunReportRequest keepEmptyRows. + * @member {boolean} keepEmptyRows + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ + RunReportRequest.prototype.keepEmptyRows = false; /** - * Constructs a new Dimension. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Dimension. - * @implements IDimension - * @constructor - * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + * RunReportRequest returnPropertyQuota. + * @member {boolean} returnPropertyQuota + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance */ - function Dimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + RunReportRequest.prototype.returnPropertyQuota = false; /** - * Dimension name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Dimension + * RunReportRequest comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance */ - Dimension.prototype.name = ""; + RunReportRequest.prototype.comparisons = $util.emptyArray; /** - * Dimension dimensionExpression. - * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression - * @memberof google.analytics.data.v1alpha.Dimension + * RunReportRequest conversionSpec. + * @member {google.analytics.data.v1alpha.IConversionSpec|null|undefined} conversionSpec + * @memberof google.analytics.data.v1alpha.RunReportRequest * @instance */ - Dimension.prototype.dimensionExpression = null; + RunReportRequest.prototype.conversionSpec = null; /** - * Creates a new Dimension instance using the specified properties. + * Creates a new RunReportRequest instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static - * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance + * @param {google.analytics.data.v1alpha.IRunReportRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest instance */ - Dimension.create = function create(properties) { - return new Dimension(properties); + RunReportRequest.create = function create(properties) { + return new RunReportRequest(properties); }; /** - * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * Encodes the specified RunReportRequest message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static - * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dimension.encode = function encode(message, writer) { + RunReportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) - $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.Dimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.Metric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.metricAggregations != null && message.metricAggregations.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.metricAggregations.length; ++i) + writer.int32(message.metricAggregations[i]); + writer.ldelim(); + } + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.data.v1alpha.OrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.currencyCode); + if (message.cohortSpec != null && Object.hasOwnProperty.call(message, "cohortSpec")) + $root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows); + if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1alpha.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.conversionSpec != null && Object.hasOwnProperty.call(message, "conversionSpec")) + $root.google.analytics.data.v1alpha.ConversionSpec.encode(message.conversionSpec, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); return writer; }; /** - * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. + * Encodes the specified RunReportRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static - * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunReportRequest} message RunReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dimension.encodeDelimited = function encodeDelimited(message, writer) { + RunReportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dimension message from the specified reader or buffer. + * Decodes a RunReportRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dimension.decode = function decode(reader, length, error) { + RunReportRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.property = reader.string(); break; } case 2: { - message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32())); break; } - default: - reader.skipType(tag & 7); + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.Metric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + if (!(message.metricAggregations && message.metricAggregations.length)) + message.metricAggregations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.metricAggregations.push(reader.int32()); + } else + message.metricAggregations.push(reader.int32()); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.data.v1alpha.OrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.currencyCode = reader.string(); + break; + } + case 12: { + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.decode(reader, reader.uint32()); + break; + } + case 13: { + message.keepEmptyRows = reader.bool(); + break; + } + case 14: { + message.returnPropertyQuota = reader.bool(); + break; + } + case 15: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1alpha.Comparison.decode(reader, reader.uint32())); + break; + } + case 16: { + message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -23780,138 +23200,440 @@ }; /** - * Decodes a Dimension message from the specified reader or buffer, length delimited. + * Decodes a RunReportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dimension.decodeDelimited = function decodeDelimited(reader) { + RunReportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dimension message. + * Verifies a RunReportRequest message. * @function verify - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dimension.verify = function verify(message) { + RunReportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); if (error) - return "dimensionExpression." + error; + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.metricAggregations != null && message.hasOwnProperty("metricAggregations")) { + if (!Array.isArray(message.metricAggregations)) + return "metricAggregations: array expected"; + for (var i = 0; i < message.metricAggregations.length; ++i) + switch (message.metricAggregations[i]) { + default: + return "metricAggregations: enum value[] expected"; + case 0: + case 1: + case 5: + case 6: + case 4: + break; + } + } + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.data.v1alpha.OrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) { + var error = $root.google.analytics.data.v1alpha.CohortSpec.verify(message.cohortSpec); + if (error) + return "cohortSpec." + error; + } + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + if (typeof message.keepEmptyRows !== "boolean") + return "keepEmptyRows: boolean expected"; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + if (typeof message.returnPropertyQuota !== "boolean") + return "returnPropertyQuota: boolean expected"; + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Comparison.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) { + var error = $root.google.analytics.data.v1alpha.ConversionSpec.verify(message.conversionSpec); + if (error) + return "conversionSpec." + error; } return null; }; /** - * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * Creates a RunReportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Dimension + * @memberof google.analytics.data.v1alpha.RunReportRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Dimension} Dimension + * @returns {google.analytics.data.v1alpha.RunReportRequest} RunReportRequest */ - Dimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Dimension) + RunReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunReportRequest) return object; - var message = new $root.google.analytics.data.v1alpha.Dimension(); - if (object.name != null) - message.name = String(object.name); - if (object.dimensionExpression != null) { - if (typeof object.dimensionExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); - message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); + var message = new $root.google.analytics.data.v1alpha.RunReportRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.dimensions[i]); + } } - return message; - }; - - /** - * Creates a plain object from a Dimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {google.analytics.data.v1alpha.Dimension} message Dimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Dimension.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.dimensionExpression = null; + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.Metric.fromObject(object.metrics[i]); + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) - object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); - return object; - }; - - /** - * Converts this Dimension to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Dimension - * @instance - * @returns {Object.} JSON object - */ - Dimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Dimension - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Dimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRanges[i]); + } } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; - }; - - return Dimension; + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.metricAggregations) { + if (!Array.isArray(object.metricAggregations)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.metricAggregations: array expected"); + message.metricAggregations = []; + for (var i = 0; i < object.metricAggregations.length; ++i) + switch (object.metricAggregations[i]) { + default: + if (typeof object.metricAggregations[i] === "number") { + message.metricAggregations[i] = object.metricAggregations[i]; + break; + } + case "METRIC_AGGREGATION_UNSPECIFIED": + case 0: + message.metricAggregations[i] = 0; + break; + case "TOTAL": + case 1: + message.metricAggregations[i] = 1; + break; + case "MINIMUM": + case 5: + message.metricAggregations[i] = 5; + break; + case "MAXIMUM": + case 6: + message.metricAggregations[i] = 6; + break; + case "COUNT": + case 4: + message.metricAggregations[i] = 4; + break; + } + } + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.data.v1alpha.OrderBy.fromObject(object.orderBys[i]); + } + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.cohortSpec != null) { + if (typeof object.cohortSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.cohortSpec: object expected"); + message.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.fromObject(object.cohortSpec); + } + if (object.keepEmptyRows != null) + message.keepEmptyRows = Boolean(object.keepEmptyRows); + if (object.returnPropertyQuota != null) + message.returnPropertyQuota = Boolean(object.returnPropertyQuota); + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1alpha.Comparison.fromObject(object.comparisons[i]); + } + } + if (object.conversionSpec != null) { + if (typeof object.conversionSpec !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportRequest.conversionSpec: object expected"); + message.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.fromObject(object.conversionSpec); + } + return message; + }; + + /** + * Creates a plain object from a RunReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {google.analytics.data.v1alpha.RunReportRequest} message RunReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.metricAggregations = []; + object.orderBys = []; + object.comparisons = []; + } + if (options.defaults) { + object.property = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.currencyCode = ""; + object.cohortSpec = null; + object.keepEmptyRows = false; + object.returnPropertyQuota = false; + object.conversionSpec = null; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.Dimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.Metric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.metricAggregations && message.metricAggregations.length) { + object.metricAggregations = []; + for (var j = 0; j < message.metricAggregations.length; ++j) + object.metricAggregations[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] === undefined ? message.metricAggregations[j] : $root.google.analytics.data.v1alpha.MetricAggregation[message.metricAggregations[j]] : message.metricAggregations[j]; + } + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.data.v1alpha.OrderBy.toObject(message.orderBys[j], options); + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.cohortSpec != null && message.hasOwnProperty("cohortSpec")) + object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options); + if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows")) + object.keepEmptyRows = message.keepEmptyRows; + if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota")) + object.returnPropertyQuota = message.returnPropertyQuota; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1alpha.Comparison.toObject(message.comparisons[j], options); + } + if (message.conversionSpec != null && message.hasOwnProperty("conversionSpec")) + object.conversionSpec = $root.google.analytics.data.v1alpha.ConversionSpec.toObject(message.conversionSpec, options); + return object; + }; + + /** + * Converts this RunReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunReportRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.RunReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportRequest"; + }; + + return RunReportRequest; })(); - v1alpha.DimensionExpression = (function() { + v1alpha.RunReportResponse = (function() { /** - * Properties of a DimensionExpression. + * Properties of a RunReportResponse. * @memberof google.analytics.data.v1alpha - * @interface IDimensionExpression - * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase - * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase - * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate + * @interface IRunReportResponse + * @property {Array.|null} [dimensionHeaders] RunReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunReportResponse metricHeaders + * @property {Array.|null} [rows] RunReportResponse rows + * @property {Array.|null} [totals] RunReportResponse totals + * @property {Array.|null} [maximums] RunReportResponse maximums + * @property {Array.|null} [minimums] RunReportResponse minimums + * @property {number|null} [rowCount] RunReportResponse rowCount + * @property {google.analytics.data.v1alpha.IResponseMetaData|null} [metadata] RunReportResponse metadata + * @property {google.analytics.data.v1alpha.IPropertyQuota|null} [propertyQuota] RunReportResponse propertyQuota + * @property {string|null} [kind] RunReportResponse kind + * @property {string|null} [nextPageToken] RunReportResponse nextPageToken */ /** - * Constructs a new DimensionExpression. + * Constructs a new RunReportResponse. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionExpression. - * @implements IDimensionExpression + * @classdesc Represents a RunReportResponse. + * @implements IRunReportResponse * @constructor - * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set */ - function DimensionExpression(properties) { + function RunReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + this.totals = []; + this.maximums = []; + this.minimums = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23919,119 +23641,244 @@ } /** - * DimensionExpression lowerCase. - * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase - * @memberof google.analytics.data.v1alpha.DimensionExpression + * RunReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.RunReportResponse * @instance */ - DimensionExpression.prototype.lowerCase = null; + RunReportResponse.prototype.dimensionHeaders = $util.emptyArray; /** - * DimensionExpression upperCase. - * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase - * @memberof google.analytics.data.v1alpha.DimensionExpression + * RunReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.RunReportResponse * @instance */ - DimensionExpression.prototype.upperCase = null; + RunReportResponse.prototype.metricHeaders = $util.emptyArray; /** - * DimensionExpression concatenate. - * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate - * @memberof google.analytics.data.v1alpha.DimensionExpression + * RunReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.RunReportResponse * @instance */ - DimensionExpression.prototype.concatenate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + RunReportResponse.prototype.rows = $util.emptyArray; /** - * DimensionExpression oneExpression. - * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression - * @memberof google.analytics.data.v1alpha.DimensionExpression + * RunReportResponse totals. + * @member {Array.} totals + * @memberof google.analytics.data.v1alpha.RunReportResponse * @instance */ - Object.defineProperty(DimensionExpression.prototype, "oneExpression", { - get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), - set: $util.oneOfSetter($oneOfFields) - }); + RunReportResponse.prototype.totals = $util.emptyArray; /** - * Creates a new DimensionExpression instance using the specified properties. + * RunReportResponse maximums. + * @member {Array.} maximums + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.maximums = $util.emptyArray; + + /** + * RunReportResponse minimums. + * @member {Array.} minimums + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.minimums = $util.emptyArray; + + /** + * RunReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.rowCount = 0; + + /** + * RunReportResponse metadata. + * @member {google.analytics.data.v1alpha.IResponseMetaData|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.metadata = null; + + /** + * RunReportResponse propertyQuota. + * @member {google.analytics.data.v1alpha.IPropertyQuota|null|undefined} propertyQuota + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.propertyQuota = null; + + /** + * RunReportResponse kind. + * @member {string} kind + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.kind = ""; + + /** + * RunReportResponse nextPageToken. + * @member {string|null|undefined} nextPageToken + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @instance + */ + RunReportResponse.prototype.nextPageToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RunReportResponse.prototype, "_nextPageToken", { + get: $util.oneOfGetter($oneOfFields = ["nextPageToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RunReportResponse instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance + * @param {google.analytics.data.v1alpha.IRunReportResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse instance */ - DimensionExpression.create = function create(properties) { - return new DimensionExpression(properties); + RunReportResponse.create = function create(properties) { + return new RunReportResponse(properties); }; /** - * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * Encodes the specified RunReportResponse message. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionExpression.encode = function encode(message, writer) { + RunReportResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) - $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) - $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) - $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totals != null && message.totals.length) + for (var i = 0; i < message.totals.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.totals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maximums != null && message.maximums.length) + for (var i = 0; i < message.maximums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.maximums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimums != null && message.minimums.length) + for (var i = 0; i < message.minimums.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.minimums[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.rowCount); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.ResponseMetaData.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.propertyQuota != null && Object.hasOwnProperty.call(message, "propertyQuota")) + $root.google.analytics.data.v1alpha.PropertyQuota.encode(message.propertyQuota, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.kind); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. + * Encodes the specified RunReportResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.RunReportResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static - * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IRunReportResponse} message RunReportResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { + RunReportResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DimensionExpression message from the specified reader or buffer. + * Decodes a RunReportResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionExpression.decode = function decode(reader, length, error) { + RunReportResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.RunReportResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } case 4: { - message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + if (!(message.totals && message.totals.length)) + message.totals = []; + message.totals.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); break; } case 5: { - message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); + if (!(message.maximums && message.maximums.length)) + message.maximums = []; + message.maximums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); break; } case 6: { - message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); + if (!(message.minimums && message.minimums.length)) + message.minimums = []; + message.minimums.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 7: { + message.rowCount = reader.int32(); + break; + } + case 8: { + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.decode(reader, reader.uint32()); + break; + } + case 10: { + message.kind = reader.string(); + break; + } + case 11: { + message.nextPageToken = reader.string(); break; } default: @@ -24043,730 +23890,681 @@ }; /** - * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. + * Decodes a RunReportResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionExpression.decodeDelimited = function decodeDelimited(reader) { + RunReportResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DimensionExpression message. + * Verifies a RunReportResponse message. * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DimensionExpression.verify = function verify(message) { + RunReportResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); if (error) - return "lowerCase." + error; + return "dimensionHeaders." + error; } } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); if (error) - return "upperCase." + error; + return "metricHeaders." + error; } } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - if (properties.oneExpression === 1) - return "oneExpression: multiple values"; - properties.oneExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); if (error) - return "concatenate." + error; + return "rows." + error; } } - return null; - }; - - /** - * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression - */ - DimensionExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); - if (object.lowerCase != null) { - if (typeof object.lowerCase !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); - message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); - } - if (object.upperCase != null) { - if (typeof object.upperCase !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); - message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); + if (message.totals != null && message.hasOwnProperty("totals")) { + if (!Array.isArray(message.totals)) + return "totals: array expected"; + for (var i = 0; i < message.totals.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.totals[i]); + if (error) + return "totals." + error; + } } - if (object.concatenate != null) { - if (typeof object.concatenate !== "object") - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); - message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); + if (message.maximums != null && message.hasOwnProperty("maximums")) { + if (!Array.isArray(message.maximums)) + return "maximums: array expected"; + for (var i = 0; i < message.maximums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.maximums[i]); + if (error) + return "maximums." + error; + } } - return message; + if (message.minimums != null && message.hasOwnProperty("minimums")) { + if (!Array.isArray(message.minimums)) + return "minimums: array expected"; + for (var i = 0; i < message.minimums.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.minimums[i]); + if (error) + return "minimums." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) { + var error = $root.google.analytics.data.v1alpha.PropertyQuota.verify(message.propertyQuota); + if (error) + return "propertyQuota." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + properties._nextPageToken = 1; + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + } + return null; }; /** - * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. + * Creates a RunReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.RunReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.RunReportResponse} RunReportResponse + */ + RunReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.RunReportResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.RunReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.totals) { + if (!Array.isArray(object.totals)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: array expected"); + message.totals = []; + for (var i = 0; i < object.totals.length; ++i) { + if (typeof object.totals[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.totals: object expected"); + message.totals[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.totals[i]); + } + } + if (object.maximums) { + if (!Array.isArray(object.maximums)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: array expected"); + message.maximums = []; + for (var i = 0; i < object.maximums.length; ++i) { + if (typeof object.maximums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.maximums: object expected"); + message.maximums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.maximums[i]); + } + } + if (object.minimums) { + if (!Array.isArray(object.minimums)) + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: array expected"); + message.minimums = []; + for (var i = 0; i < object.minimums.length; ++i) { + if (typeof object.minimums[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.minimums: object expected"); + message.minimums[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.minimums[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.fromObject(object.metadata); + } + if (object.propertyQuota != null) { + if (typeof object.propertyQuota !== "object") + throw TypeError(".google.analytics.data.v1alpha.RunReportResponse.propertyQuota: object expected"); + message.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.fromObject(object.propertyQuota); + } + if (object.kind != null) + message.kind = String(object.kind); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a RunReportResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static - * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression + * @param {google.analytics.data.v1alpha.RunReportResponse} message RunReportResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DimensionExpression.toObject = function toObject(message, options) { + RunReportResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { - object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); - if (options.oneofs) - object.oneExpression = "lowerCase"; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + object.totals = []; + object.maximums = []; + object.minimums = []; } - if (message.upperCase != null && message.hasOwnProperty("upperCase")) { - object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); - if (options.oneofs) - object.oneExpression = "upperCase"; + if (options.defaults) { + object.rowCount = 0; + object.metadata = null; + object.propertyQuota = null; + object.kind = ""; } - if (message.concatenate != null && message.hasOwnProperty("concatenate")) { - object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.totals && message.totals.length) { + object.totals = []; + for (var j = 0; j < message.totals.length; ++j) + object.totals[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.totals[j], options); + } + if (message.maximums && message.maximums.length) { + object.maximums = []; + for (var j = 0; j < message.maximums.length; ++j) + object.maximums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.maximums[j], options); + } + if (message.minimums && message.minimums.length) { + object.minimums = []; + for (var j = 0; j < message.minimums.length; ++j) + object.minimums[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.minimums[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.ResponseMetaData.toObject(message.metadata, options); + if (message.propertyQuota != null && message.hasOwnProperty("propertyQuota")) + object.propertyQuota = $root.google.analytics.data.v1alpha.PropertyQuota.toObject(message.propertyQuota, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) { + object.nextPageToken = message.nextPageToken; if (options.oneofs) - object.oneExpression = "concatenate"; + object._nextPageToken = "nextPageToken"; } return object; }; /** - * Converts this DimensionExpression to JSON. + * Converts this RunReportResponse to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @instance * @returns {Object.} JSON object */ - DimensionExpression.prototype.toJSON = function toJSON() { + RunReportResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DimensionExpression + * Gets the default type url for RunReportResponse * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression + * @memberof google.analytics.data.v1alpha.RunReportResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.RunReportResponse"; }; - DimensionExpression.CaseExpression = (function() { + return RunReportResponse; + })(); - /** - * Properties of a CaseExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @interface ICaseExpression - * @property {string|null} [dimensionName] CaseExpression dimensionName - */ + v1alpha.GetMetadataRequest = (function() { - /** - * Constructs a new CaseExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @classdesc Represents a CaseExpression. - * @implements ICaseExpression - * @constructor - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set - */ - function CaseExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GetMetadataRequest. + * @memberof google.analytics.data.v1alpha + * @interface IGetMetadataRequest + * @property {string|null} [name] GetMetadataRequest name + */ - /** - * CaseExpression dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @instance - */ - CaseExpression.prototype.dimensionName = ""; + /** + * Constructs a new GetMetadataRequest. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a GetMetadataRequest. + * @implements IGetMetadataRequest + * @constructor + * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set + */ + function GetMetadataRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new CaseExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance - */ - CaseExpression.create = function create(properties) { - return new CaseExpression(properties); - }; + /** + * GetMetadataRequest name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @instance + */ + GetMetadataRequest.prototype.name = ""; - /** - * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - return writer; - }; + /** + * Creates a new GetMetadataRequest instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest instance + */ + GetMetadataRequest.create = function create(properties) { + return new GetMetadataRequest(properties); + }; - /** - * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetMetadataRequest message. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes a CaseExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetMetadataRequest message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.GetMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.IGetMetadataRequest} message GetMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a CaseExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a CaseExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - return null; - }; + /** + * Decodes a GetMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression - */ - CaseExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - return message; - }; + /** + * Verifies a GetMetadataRequest message. + * @function verify + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dimensionName = ""; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; + /** + * Creates a GetMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.GetMetadataRequest} GetMetadataRequest + */ + GetMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.GetMetadataRequest) return object; - }; - - /** - * Converts this CaseExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @instance - * @returns {Object.} JSON object - */ - CaseExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.analytics.data.v1alpha.GetMetadataRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Gets the default type url for CaseExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; - }; + /** + * Creates a plain object from a GetMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {google.analytics.data.v1alpha.GetMetadataRequest} message GetMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return CaseExpression; - })(); - - DimensionExpression.ConcatenateExpression = (function() { - - /** - * Properties of a ConcatenateExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @interface IConcatenateExpression - * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames - * @property {string|null} [delimiter] ConcatenateExpression delimiter - */ + /** + * Converts this GetMetadataRequest to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ConcatenateExpression. - * @memberof google.analytics.data.v1alpha.DimensionExpression - * @classdesc Represents a ConcatenateExpression. - * @implements IConcatenateExpression - * @constructor - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - */ - function ConcatenateExpression(properties) { - this.dimensionNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for GetMetadataRequest + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.GetMetadataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.data.v1alpha.GetMetadataRequest"; + }; - /** - * ConcatenateExpression dimensionNames. - * @member {Array.} dimensionNames - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; + return GetMetadataRequest; + })(); - /** - * ConcatenateExpression delimiter. - * @member {string} delimiter - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - */ - ConcatenateExpression.prototype.delimiter = ""; + v1alpha.Metadata = (function() { - /** - * Creates a new ConcatenateExpression instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance - */ - ConcatenateExpression.create = function create(properties) { - return new ConcatenateExpression(properties); - }; + /** + * Properties of a Metadata. + * @memberof google.analytics.data.v1alpha + * @interface IMetadata + * @property {string|null} [name] Metadata name + * @property {Array.|null} [dimensions] Metadata dimensions + * @property {Array.|null} [metrics] Metadata metrics + * @property {Array.|null} [comparisons] Metadata comparisons + * @property {Array.|null} [conversions] Metadata conversions + */ - /** - * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionNames != null && message.dimensionNames.length) - for (var i = 0; i < message.dimensionNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - return writer; - }; + /** + * Constructs a new Metadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.dimensions = []; + this.metrics = []; + this.comparisons = []; + this.conversions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Metadata name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.name = ""; - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.dimensionNames && message.dimensionNames.length)) - message.dimensionNames = []; - message.dimensionNames.push(reader.string()); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Metadata dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.dimensions = $util.emptyArray; - /** - * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Metadata metrics. + * @member {Array.} metrics + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.metrics = $util.emptyArray; - /** - * Verifies a ConcatenateExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConcatenateExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { - if (!Array.isArray(message.dimensionNames)) - return "dimensionNames: array expected"; - for (var i = 0; i < message.dimensionNames.length; ++i) - if (!$util.isString(message.dimensionNames[i])) - return "dimensionNames: string[] expected"; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - return null; - }; + /** + * Metadata comparisons. + * @member {Array.} comparisons + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.comparisons = $util.emptyArray; - /** - * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression - */ - ConcatenateExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); - if (object.dimensionNames) { - if (!Array.isArray(object.dimensionNames)) - throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); - message.dimensionNames = []; - for (var i = 0; i < object.dimensionNames.length; ++i) - message.dimensionNames[i] = String(object.dimensionNames[i]); - } - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - return message; - }; - - /** - * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcatenateExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dimensionNames = []; - if (options.defaults) - object.delimiter = ""; - if (message.dimensionNames && message.dimensionNames.length) { - object.dimensionNames = []; - for (var j = 0; j < message.dimensionNames.length; ++j) - object.dimensionNames[j] = message.dimensionNames[j]; - } - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - return object; - }; - - /** - * Converts this ConcatenateExpression to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @instance - * @returns {Object.} JSON object - */ - ConcatenateExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConcatenateExpression - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; - }; - - return ConcatenateExpression; - })(); - - return DimensionExpression; - })(); - - v1alpha.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.analytics.data.v1alpha - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {string|null} [expression] Metric expression - * @property {boolean|null} [invisible] Metric invisible - */ - - /** - * Constructs a new Metric. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metric name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.name = ""; - - /** - * Metric expression. - * @member {string} expression - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.expression = ""; - - /** - * Metric invisible. - * @member {boolean} invisible - * @memberof google.analytics.data.v1alpha.Metric - * @instance - */ - Metric.prototype.invisible = false; + /** + * Metadata conversions. + * @member {Array.} conversions + * @memberof google.analytics.data.v1alpha.Metadata + * @instance + */ + Metadata.prototype.conversions = $util.emptyArray; /** - * Creates a new Metric instance using the specified properties. + * Creates a new Metadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static - * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Metric} Metric instance + * @param {google.analytics.data.v1alpha.IMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metadata} Metadata instance */ - Metric.create = function create(properties) { - return new Metric(properties); + Metadata.create = function create(properties) { + return new Metadata(properties); }; /** - * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * Encodes the specified Metadata message. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static - * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encode = function encode(message, writer) { + Metadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.data.v1alpha.DimensionMetadata.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.data.v1alpha.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); - if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.comparisons != null && message.comparisons.length) + for (var i = 0; i < message.comparisons.length; ++i) + $root.google.analytics.data.v1alpha.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conversions != null && message.conversions.length) + for (var i = 0; i < message.conversions.length; ++i) + $root.google.analytics.data.v1alpha.ConversionMetadata.encode(message.conversions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static - * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { + Metadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes a Metadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Metric} Metric + * @returns {google.analytics.data.v1alpha.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length, error) { + Metadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { + case 3: { message.name = reader.string(); break; } + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.data.v1alpha.DimensionMetadata.decode(reader, reader.uint32())); + break; + } case 2: { - message.expression = reader.string(); + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.data.v1alpha.MetricMetadata.decode(reader, reader.uint32())); break; } - case 3: { - message.invisible = reader.bool(); + case 4: { + if (!(message.comparisons && message.comparisons.length)) + message.comparisons = []; + message.comparisons.push($root.google.analytics.data.v1alpha.ComparisonMetadata.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.conversions && message.conversions.length)) + message.conversions = []; + message.conversions.push($root.google.analytics.data.v1alpha.ConversionMetadata.decode(reader, reader.uint32())); break; } default: @@ -24778,142 +24576,226 @@ }; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes a Metadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Metric} Metric + * @returns {google.analytics.data.v1alpha.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decodeDelimited = function decodeDelimited(reader) { + Metadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metric message. + * Verifies a Metadata message. * @function verify - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metric.verify = function verify(message) { + Metadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.invisible != null && message.hasOwnProperty("invisible")) - if (typeof message.invisible !== "boolean") - return "invisible: boolean expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionMetadata.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricMetadata.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.comparisons != null && message.hasOwnProperty("comparisons")) { + if (!Array.isArray(message.comparisons)) + return "comparisons: array expected"; + for (var i = 0; i < message.comparisons.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ComparisonMetadata.verify(message.comparisons[i]); + if (error) + return "comparisons." + error; + } + } + if (message.conversions != null && message.hasOwnProperty("conversions")) { + if (!Array.isArray(message.conversions)) + return "conversions: array expected"; + for (var i = 0; i < message.conversions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ConversionMetadata.verify(message.conversions[i]); + if (error) + return "conversions." + error; + } + } return null; }; /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Metric} Metric + * @returns {google.analytics.data.v1alpha.Metadata} Metadata */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Metric) + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metadata) return object; - var message = new $root.google.analytics.data.v1alpha.Metric(); + var message = new $root.google.analytics.data.v1alpha.Metadata(); if (object.name != null) message.name = String(object.name); - if (object.expression != null) - message.expression = String(object.expression); - if (object.invisible != null) - message.invisible = Boolean(object.invisible); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.data.v1alpha.DimensionMetadata.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.metrics: object expected"); + message.metrics[i] = $root.google.analytics.data.v1alpha.MetricMetadata.fromObject(object.metrics[i]); + } + } + if (object.comparisons) { + if (!Array.isArray(object.comparisons)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: array expected"); + message.comparisons = []; + for (var i = 0; i < object.comparisons.length; ++i) { + if (typeof object.comparisons[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.comparisons: object expected"); + message.comparisons[i] = $root.google.analytics.data.v1alpha.ComparisonMetadata.fromObject(object.comparisons[i]); + } + } + if (object.conversions) { + if (!Array.isArray(object.conversions)) + throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: array expected"); + message.conversions = []; + for (var i = 0; i < object.conversions.length; ++i) { + if (typeof object.conversions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Metadata.conversions: object expected"); + message.conversions[i] = $root.google.analytics.data.v1alpha.ConversionMetadata.fromObject(object.conversions[i]); + } + } return message; }; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. + * Creates a plain object from a Metadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static - * @param {google.analytics.data.v1alpha.Metric} message Metric + * @param {google.analytics.data.v1alpha.Metadata} message Metadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metric.toObject = function toObject(message, options) { + Metadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.comparisons = []; + object.conversions = []; + } + if (options.defaults) object.name = ""; - object.expression = ""; - object.invisible = false; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.data.v1alpha.DimensionMetadata.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.data.v1alpha.MetricMetadata.toObject(message.metrics[j], options); } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.invisible != null && message.hasOwnProperty("invisible")) - object.invisible = message.invisible; + if (message.comparisons && message.comparisons.length) { + object.comparisons = []; + for (var j = 0; j < message.comparisons.length; ++j) + object.comparisons[j] = $root.google.analytics.data.v1alpha.ComparisonMetadata.toObject(message.comparisons[j], options); + } + if (message.conversions && message.conversions.length) { + object.conversions = []; + for (var j = 0; j < message.conversions.length; ++j) + object.conversions[j] = $root.google.analytics.data.v1alpha.ConversionMetadata.toObject(message.conversions[j], options); + } return object; }; /** - * Converts this Metric to JSON. + * Converts this Metadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @instance * @returns {Object.} JSON object */ - Metric.prototype.toJSON = function toJSON() { + Metadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Metric + * Gets the default type url for Metadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Metric + * @memberof google.analytics.data.v1alpha.Metadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metadata"; }; - return Metric; + return Metadata; })(); - v1alpha.FilterExpression = (function() { + v1alpha.DateRange = (function() { /** - * Properties of a FilterExpression. + * Properties of a DateRange. * @memberof google.analytics.data.v1alpha - * @interface IFilterExpression - * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter + * @interface IDateRange + * @property {string|null} [startDate] DateRange startDate + * @property {string|null} [endDate] DateRange endDate + * @property {string|null} [name] DateRange name */ /** - * Constructs a new FilterExpression. + * Constructs a new DateRange. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FilterExpression. - * @implements IFilterExpression + * @classdesc Represents a DateRange. + * @implements IDateRange * @constructor - * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set */ - function FilterExpression(properties) { + function DateRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24921,133 +24803,105 @@ } /** - * FilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.andGroup = null; - - /** - * FilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FilterExpression - * @instance - */ - FilterExpression.prototype.orGroup = null; - - /** - * FilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FilterExpression + * DateRange startDate. + * @member {string} startDate + * @memberof google.analytics.data.v1alpha.DateRange * @instance */ - FilterExpression.prototype.notExpression = null; + DateRange.prototype.startDate = ""; /** - * FilterExpression filter. - * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter - * @memberof google.analytics.data.v1alpha.FilterExpression + * DateRange endDate. + * @member {string} endDate + * @memberof google.analytics.data.v1alpha.DateRange * @instance */ - FilterExpression.prototype.filter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DateRange.prototype.endDate = ""; /** - * FilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FilterExpression + * DateRange name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DateRange * @instance */ - Object.defineProperty(FilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), - set: $util.oneOfSetter($oneOfFields) - }); + DateRange.prototype.name = ""; /** - * Creates a new FilterExpression instance using the specified properties. + * Creates a new DateRange instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static - * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance + * @param {google.analytics.data.v1alpha.IDateRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DateRange} DateRange instance */ - FilterExpression.create = function create(properties) { - return new FilterExpression(properties); + DateRange.create = function create(properties) { + return new DateRange(properties); }; /** - * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * Encodes the specified DateRange message. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static - * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterExpression.encode = function encode(message, writer) { + DateRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * Encodes the specified DateRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DateRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static - * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IDateRange} message DateRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + DateRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FilterExpression message from the specified reader or buffer. + * Decodes a DateRange message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @returns {google.analytics.data.v1alpha.DateRange} DateRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterExpression.decode = function decode(reader, length, error) { + DateRange.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DateRange(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + message.startDate = reader.string(); break; } case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); + message.endDate = reader.string(); break; } case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -25059,193 +24913,140 @@ }; /** - * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * Decodes a DateRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @returns {google.analytics.data.v1alpha.DateRange} DateRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterExpression.decodeDelimited = function decodeDelimited(reader) { + DateRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FilterExpression message. + * Verifies a DateRange message. * @function verify - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FilterExpression.verify = function verify(message) { + DateRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.filter != null && message.hasOwnProperty("filter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - } + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a DateRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @returns {google.analytics.data.v1alpha.DateRange} DateRange */ - FilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) + DateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DateRange) return object; - var message = new $root.google.analytics.data.v1alpha.FilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); - message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); - } + var message = new $root.google.analytics.data.v1alpha.DateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a DateRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static - * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression + * @param {google.analytics.data.v1alpha.DateRange} message DateRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FilterExpression.toObject = function toObject(message, options) { + DateRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); - if (options.oneofs) - object.expr = "filter"; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + object.name = ""; } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this FilterExpression to JSON. + * Converts this DateRange to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @instance * @returns {Object.} JSON object */ - FilterExpression.prototype.toJSON = function toJSON() { + DateRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FilterExpression + * Gets the default type url for DateRange * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FilterExpression + * @memberof google.analytics.data.v1alpha.DateRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.DateRange"; }; - return FilterExpression; + return DateRange; })(); - v1alpha.FilterExpressionList = (function() { + v1alpha.Dimension = (function() { /** - * Properties of a FilterExpressionList. + * Properties of a Dimension. * @memberof google.analytics.data.v1alpha - * @interface IFilterExpressionList - * @property {Array.|null} [expressions] FilterExpressionList expressions + * @interface IDimension + * @property {string|null} [name] Dimension name + * @property {google.analytics.data.v1alpha.IDimensionExpression|null} [dimensionExpression] Dimension dimensionExpression */ /** - * Constructs a new FilterExpressionList. + * Constructs a new Dimension. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FilterExpressionList. - * @implements IFilterExpressionList + * @classdesc Represents a Dimension. + * @implements IDimension * @constructor - * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set */ - function FilterExpressionList(properties) { - this.expressions = []; + function Dimension(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25253,80 +25054,91 @@ } /** - * FilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * Dimension name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Dimension * @instance */ - FilterExpressionList.prototype.expressions = $util.emptyArray; + Dimension.prototype.name = ""; /** - * Creates a new FilterExpressionList instance using the specified properties. + * Dimension dimensionExpression. + * @member {google.analytics.data.v1alpha.IDimensionExpression|null|undefined} dimensionExpression + * @memberof google.analytics.data.v1alpha.Dimension + * @instance + */ + Dimension.prototype.dimensionExpression = null; + + /** + * Creates a new Dimension instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance + * @param {google.analytics.data.v1alpha.IDimension=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Dimension} Dimension instance */ - FilterExpressionList.create = function create(properties) { - return new FilterExpressionList(properties); + Dimension.create = function create(properties) { + return new Dimension(properties); }; /** - * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * Encodes the specified Dimension message. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterExpressionList.encode = function encode(message, writer) { + Dimension.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionExpression != null && Object.hasOwnProperty.call(message, "dimensionExpression")) + $root.google.analytics.data.v1alpha.DimensionExpression.encode(message.dimensionExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Dimension.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static - * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimension} message Dimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + Dimension.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FilterExpressionList message from the specified reader or buffer. + * Decodes a Dimension message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @returns {google.analytics.data.v1alpha.Dimension} Dimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterExpressionList.decode = function decode(reader, length, error) { + Dimension.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Dimension(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 2: { + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.decode(reader, reader.uint32()); break; } default: @@ -25338,144 +25150,138 @@ }; /** - * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a Dimension message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @returns {google.analytics.data.v1alpha.Dimension} Dimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + Dimension.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FilterExpressionList message. + * Verifies a Dimension message. * @function verify - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FilterExpressionList.verify = function verify(message) { + Dimension.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) { + var error = $root.google.analytics.data.v1alpha.DimensionExpression.verify(message.dimensionExpression); + if (error) + return "dimensionExpression." + error; } return null; }; /** - * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList + * @returns {google.analytics.data.v1alpha.Dimension} Dimension */ - FilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Dimension) return object; - var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); - } + var message = new $root.google.analytics.data.v1alpha.Dimension(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionExpression != null) { + if (typeof object.dimensionExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.Dimension.dimensionExpression: object expected"); + message.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.fromObject(object.dimensionExpression); } return message; }; /** - * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from a Dimension message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static - * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList + * @param {google.analytics.data.v1alpha.Dimension} message Dimension * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FilterExpressionList.toObject = function toObject(message, options) { + Dimension.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); + if (options.defaults) { + object.name = ""; + object.dimensionExpression = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimensionExpression != null && message.hasOwnProperty("dimensionExpression")) + object.dimensionExpression = $root.google.analytics.data.v1alpha.DimensionExpression.toObject(message.dimensionExpression, options); return object; }; /** - * Converts this FilterExpressionList to JSON. + * Converts this Dimension to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @instance * @returns {Object.} JSON object */ - FilterExpressionList.prototype.toJSON = function toJSON() { + Dimension.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FilterExpressionList + * Gets the default type url for Dimension * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FilterExpressionList + * @memberof google.analytics.data.v1alpha.Dimension * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Dimension"; }; - return FilterExpressionList; + return Dimension; })(); - v1alpha.Filter = (function() { + v1alpha.DimensionExpression = (function() { /** - * Properties of a Filter. + * Properties of a DimensionExpression. * @memberof google.analytics.data.v1alpha - * @interface IFilter - * @property {string|null} [fieldName] Filter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter - * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter + * @interface IDimensionExpression + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [lowerCase] DimensionExpression lowerCase + * @property {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null} [upperCase] DimensionExpression upperCase + * @property {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null} [concatenate] DimensionExpression concatenate */ /** - * Constructs a new Filter. + * Constructs a new DimensionExpression. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Filter. - * @implements IFilter + * @classdesc Represents a DimensionExpression. + * @implements IDimensionExpression * @constructor - * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set */ - function Filter(properties) { + function DimensionExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25483,161 +25289,119 @@ } /** - * Filter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.fieldName = ""; - - /** - * Filter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.stringFilter = null; - - /** - * Filter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.Filter - * @instance - */ - Filter.prototype.inListFilter = null; - - /** - * Filter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.Filter + * DimensionExpression lowerCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} lowerCase + * @memberof google.analytics.data.v1alpha.DimensionExpression * @instance */ - Filter.prototype.numericFilter = null; + DimensionExpression.prototype.lowerCase = null; /** - * Filter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.Filter + * DimensionExpression upperCase. + * @member {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression|null|undefined} upperCase + * @memberof google.analytics.data.v1alpha.DimensionExpression * @instance */ - Filter.prototype.betweenFilter = null; + DimensionExpression.prototype.upperCase = null; /** - * Filter emptyFilter. - * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter - * @memberof google.analytics.data.v1alpha.Filter + * DimensionExpression concatenate. + * @member {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression|null|undefined} concatenate + * @memberof google.analytics.data.v1alpha.DimensionExpression * @instance */ - Filter.prototype.emptyFilter = null; + DimensionExpression.prototype.concatenate = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Filter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.Filter + * DimensionExpression oneExpression. + * @member {"lowerCase"|"upperCase"|"concatenate"|undefined} oneExpression + * @memberof google.analytics.data.v1alpha.DimensionExpression * @instance */ - Object.defineProperty(Filter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + Object.defineProperty(DimensionExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["lowerCase", "upperCase", "concatenate"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Filter instance using the specified properties. + * Creates a new DimensionExpression instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static - * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Filter} Filter instance + * @param {google.analytics.data.v1alpha.IDimensionExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression instance */ - Filter.create = function create(properties) { - return new Filter(properties); + DimensionExpression.create = function create(properties) { + return new DimensionExpression(properties); }; /** - * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * Encodes the specified DimensionExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static - * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Filter.encode = function encode(message, writer) { + DimensionExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) - $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lowerCase != null && Object.hasOwnProperty.call(message, "lowerCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.lowerCase, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.upperCase != null && Object.hasOwnProperty.call(message, "upperCase")) + $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.encode(message.upperCase, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.concatenate != null && Object.hasOwnProperty.call(message, "concatenate")) + $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.encode(message.concatenate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. + * Encodes the specified DimensionExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static - * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionExpression} message DimensionExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { + DimensionExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Filter message from the specified reader or buffer. + * Decodes a DimensionExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Filter} Filter + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Filter.decode = function decode(reader, length, error) { + DimensionExpression.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } case 4: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); break; } case 5: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.decode(reader, reader.uint32()); break; } case 6: { - message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.decode(reader, reader.uint32()); break; } default: @@ -25649,787 +25413,624 @@ }; /** - * Decodes a Filter message from the specified reader or buffer, length delimited. + * Decodes a DimensionExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Filter} Filter + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Filter.decodeDelimited = function decodeDelimited(reader) { + DimensionExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Filter message. + * Verifies a DimensionExpression message. * @function verify - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Filter.verify = function verify(message) { + DimensionExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + properties.oneExpression = 1; { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.lowerCase); if (error) - return "numericFilter." + error; + return "lowerCase." + error; } } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + var error = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify(message.upperCase); if (error) - return "betweenFilter." + error; + return "upperCase." + error; } } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; { - var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); + var error = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify(message.concatenate); if (error) - return "emptyFilter." + error; + return "concatenate." + error; } } return null; }; /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Filter} Filter + * @returns {google.analytics.data.v1alpha.DimensionExpression} DimensionExpression */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Filter) + DimensionExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression) return object; - var message = new $root.google.analytics.data.v1alpha.Filter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + var message = new $root.google.analytics.data.v1alpha.DimensionExpression(); + if (object.lowerCase != null) { + if (typeof object.lowerCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.lowerCase: object expected"); + message.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.lowerCase); } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + if (object.upperCase != null) { + if (typeof object.upperCase !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.upperCase: object expected"); + message.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.fromObject(object.upperCase); } - if (object.emptyFilter != null) { - if (typeof object.emptyFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); - message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); + if (object.concatenate != null) { + if (typeof object.concatenate !== "object") + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.concatenate: object expected"); + message.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.fromObject(object.concatenate); } return message; }; /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. + * Creates a plain object from a DimensionExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static - * @param {google.analytics.data.v1alpha.Filter} message Filter + * @param {google.analytics.data.v1alpha.DimensionExpression} message DimensionExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Filter.toObject = function toObject(message, options) { + DimensionExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (message.lowerCase != null && message.hasOwnProperty("lowerCase")) { + object.lowerCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.lowerCase, options); if (options.oneofs) - object.oneFilter = "numericFilter"; + object.oneExpression = "lowerCase"; } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (message.upperCase != null && message.hasOwnProperty("upperCase")) { + object.upperCase = $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression.toObject(message.upperCase, options); if (options.oneofs) - object.oneFilter = "betweenFilter"; + object.oneExpression = "upperCase"; } - if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { - object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); + if (message.concatenate != null && message.hasOwnProperty("concatenate")) { + object.concatenate = $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.toObject(message.concatenate, options); if (options.oneofs) - object.oneFilter = "emptyFilter"; + object.oneExpression = "concatenate"; } return object; }; /** - * Converts this Filter to JSON. + * Converts this DimensionExpression to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @instance * @returns {Object.} JSON object */ - Filter.prototype.toJSON = function toJSON() { + DimensionExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Filter + * Gets the default type url for DimensionExpression * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Filter + * @memberof google.analytics.data.v1alpha.DimensionExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DimensionExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression"; }; - return Filter; - })(); - - v1alpha.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.data.v1alpha - * @interface IStringFilter - * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ - - /** - * Constructs a new StringFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set - */ - function StringFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + DimensionExpression.CaseExpression = (function() { - /** - * StringFilter matchType. - * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; + /** + * Properties of a CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface ICaseExpression + * @property {string|null} [dimensionName] CaseExpression dimensionName + */ - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; + /** + * Constructs a new CaseExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a CaseExpression. + * @implements ICaseExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + */ + function CaseExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; + /** + * CaseExpression dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + */ + CaseExpression.prototype.dimensionName = ""; - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; + /** + * Creates a new CaseExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression instance + */ + CaseExpression.create = function create(properties) { + return new CaseExpression(properties); + }; - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; + /** + * Encodes the specified CaseExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CaseExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.CaseExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ICaseExpression} message CaseExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); + /** + * Decodes a CaseExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CaseExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; + /** + * Verifies a CaseExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) + /** + * Creates a CaseExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} CaseExpression + */ + CaseExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.CaseExpression(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from a CaseExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.CaseExpression} message CaseExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; return object; - var message = new $root.google.analytics.data.v1alpha.StringFilter(); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; + }; + + /** + * Converts this CaseExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @instance + * @returns {Object.} JSON object + */ + CaseExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.CaseExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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; - }; + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.CaseExpression"; + }; - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; + return CaseExpression; + })(); - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + DimensionExpression.ConcatenateExpression = (function() { - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; - }; - - /** - * MatchType enum. - * @name google.analytics.data.v1alpha.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BEGINS_WITH=2 BEGINS_WITH value - * @property {number} ENDS_WITH=3 ENDS_WITH value - * @property {number} CONTAINS=4 CONTAINS value - * @property {number} FULL_REGEXP=5 FULL_REGEXP value - * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BEGINS_WITH"] = 2; - values[valuesById[3] = "ENDS_WITH"] = 3; - values[valuesById[4] = "CONTAINS"] = 4; - values[valuesById[5] = "FULL_REGEXP"] = 5; - values[valuesById[6] = "PARTIAL_REGEXP"] = 6; - return values; - })(); - - return StringFilter; - })(); - - v1alpha.InListFilter = (function() { - - /** - * Properties of an InListFilter. - * @memberof google.analytics.data.v1alpha - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ + /** + * Properties of a ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @interface IConcatenateExpression + * @property {Array.|null} [dimensionNames] ConcatenateExpression dimensionNames + * @property {string|null} [delimiter] ConcatenateExpression delimiter + */ - /** - * Constructs a new InListFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set - */ - function InListFilter(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ConcatenateExpression. + * @memberof google.analytics.data.v1alpha.DimensionExpression + * @classdesc Represents a ConcatenateExpression. + * @implements IConcatenateExpression + * @constructor + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + */ + function ConcatenateExpression(properties) { + this.dimensionNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; + /** + * ConcatenateExpression dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.dimensionNames = $util.emptyArray; - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; + /** + * ConcatenateExpression delimiter. + * @member {string} delimiter + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + */ + ConcatenateExpression.prototype.delimiter = ""; - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; + /** + * Creates a new ConcatenateExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression instance + */ + ConcatenateExpression.create = function create(properties) { + return new ConcatenateExpression(properties); + }; - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; + /** + * Encodes the specified ConcatenateExpression message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionNames[i]); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + return writer; + }; - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ConcatenateExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.IConcatenateExpression} message ConcatenateExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConcatenateExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.caseSensitive = reader.bool(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ConcatenateExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConcatenateExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; + /** + * Verifies a ConcatenateExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConcatenateExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + return null; + }; - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) + /** + * Creates a ConcatenateExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} ConcatenateExpression + */ + ConcatenateExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression(); + if (object.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a ConcatenateExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression} message ConcatenateExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConcatenateExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensionNames = []; + if (options.defaults) + object.delimiter = ""; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; return object; - var message = new $root.google.analytics.data.v1alpha.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; + }; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; + /** + * Converts this ConcatenateExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @instance + * @returns {Object.} JSON object + */ + ConcatenateExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ConcatenateExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConcatenateExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionExpression.ConcatenateExpression"; + }; - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; - }; + return ConcatenateExpression; + })(); - return InListFilter; + return DimensionExpression; })(); - v1alpha.NumericFilter = (function() { + v1alpha.Metric = (function() { /** - * Properties of a NumericFilter. + * Properties of a Metric. * @memberof google.analytics.data.v1alpha - * @interface INumericFilter - * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation - * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [expression] Metric expression + * @property {boolean|null} [invisible] Metric invisible */ /** - * Constructs a new NumericFilter. + * Constructs a new Metric. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a NumericFilter. - * @implements INumericFilter + * @classdesc Represents a Metric. + * @implements IMetric * @constructor - * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set */ - function NumericFilter(properties) { + function Metric(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26437,91 +26038,105 @@ } /** - * NumericFilter operation. - * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation - * @memberof google.analytics.data.v1alpha.NumericFilter + * Metric name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Metric * @instance */ - NumericFilter.prototype.operation = 0; + Metric.prototype.name = ""; /** - * NumericFilter value. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value - * @memberof google.analytics.data.v1alpha.NumericFilter - * @instance + * Metric expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.Metric + * @instance */ - NumericFilter.prototype.value = null; + Metric.prototype.expression = ""; /** - * Creates a new NumericFilter instance using the specified properties. + * Metric invisible. + * @member {boolean} invisible + * @memberof google.analytics.data.v1alpha.Metric + * @instance + */ + Metric.prototype.invisible = false; + + /** + * Creates a new Metric instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static - * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance + * @param {google.analytics.data.v1alpha.IMetric=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Metric} Metric instance */ - NumericFilter.create = function create(properties) { - return new NumericFilter(properties); + Metric.create = function create(properties) { + return new Metric(properties); }; /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * Encodes the specified Metric message. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static - * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericFilter.encode = function encode(message, writer) { + Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression); + if (message.invisible != null && Object.hasOwnProperty.call(message, "invisible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.invisible); return writer; }; /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Metric.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static - * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + Metric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NumericFilter message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @returns {google.analytics.data.v1alpha.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericFilter.decode = function decode(reader, length, error) { + Metric.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Metric(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.operation = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + message.expression = reader.string(); + break; + } + case 3: { + message.invisible = reader.bool(); break; } default: @@ -26533,199 +26148,141 @@ }; /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @returns {google.analytics.data.v1alpha.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericFilter.decodeDelimited = function decodeDelimited(reader) { + Metric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NumericFilter message. + * Verifies a Metric message. * @function verify - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NumericFilter.verify = function verify(message) { + Metric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); - if (error) - return "value." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.invisible != null && message.hasOwnProperty("invisible")) + if (typeof message.invisible !== "boolean") + return "invisible: boolean expected"; return null; }; /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter + * @returns {google.analytics.data.v1alpha.Metric} Metric */ - NumericFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Metric) return object; - var message = new $root.google.analytics.data.v1alpha.NumericFilter(); - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; - break; - } - break; - case "OPERATION_UNSPECIFIED": - case 0: - message.operation = 0; - break; - case "EQUAL": - case 1: - message.operation = 1; - break; - case "LESS_THAN": - case 2: - message.operation = 2; - break; - case "LESS_THAN_OR_EQUAL": - case 3: - message.operation = 3; - break; - case "GREATER_THAN": - case 4: - message.operation = 4; - break; - case "GREATER_THAN_OR_EQUAL": - case 5: - message.operation = 5; - break; - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); - message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); - } + var message = new $root.google.analytics.data.v1alpha.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.expression != null) + message.expression = String(object.expression); + if (object.invisible != null) + message.invisible = Boolean(object.invisible); return message; }; /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * Creates a plain object from a Metric message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static - * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter + * @param {google.analytics.data.v1alpha.Metric} message Metric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NumericFilter.toObject = function toObject(message, options) { + Metric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.value = null; + object.name = ""; + object.expression = ""; + object.invisible = false; } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.invisible != null && message.hasOwnProperty("invisible")) + object.invisible = message.invisible; return object; }; /** - * Converts this NumericFilter to JSON. + * Converts this Metric to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @instance * @returns {Object.} JSON object */ - NumericFilter.prototype.toJSON = function toJSON() { + Metric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NumericFilter + * Gets the default type url for Metric * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.NumericFilter + * @memberof google.analytics.data.v1alpha.Metric * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Metric"; }; - /** - * Operation enum. - * @name google.analytics.data.v1alpha.NumericFilter.Operation - * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} EQUAL=1 EQUAL value - * @property {number} LESS_THAN=2 LESS_THAN value - * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value - * @property {number} GREATER_THAN=4 GREATER_THAN value - * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value - */ - NumericFilter.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EQUAL"] = 1; - values[valuesById[2] = "LESS_THAN"] = 2; - values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; - values[valuesById[4] = "GREATER_THAN"] = 4; - values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; - return values; - })(); - - return NumericFilter; + return Metric; })(); - v1alpha.OrderBy = (function() { + v1alpha.Comparison = (function() { /** - * Properties of an OrderBy. + * Properties of a Comparison. * @memberof google.analytics.data.v1alpha - * @interface IOrderBy - * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric - * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension - * @property {boolean|null} [desc] OrderBy desc + * @interface IComparison + * @property {string|null} [name] Comparison name + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter + * @property {string|null} [comparison] Comparison comparison */ /** - * Constructs a new OrderBy. + * Constructs a new Comparison. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an OrderBy. - * @implements IOrderBy + * @classdesc Represents a Comparison. + * @implements IComparison * @constructor - * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set */ - function OrderBy(properties) { + function Comparison(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26733,119 +26290,125 @@ } /** - * OrderBy metric. - * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric - * @memberof google.analytics.data.v1alpha.OrderBy + * Comparison name. + * @member {string|null|undefined} name + * @memberof google.analytics.data.v1alpha.Comparison * @instance */ - OrderBy.prototype.metric = null; + Comparison.prototype.name = null; /** - * OrderBy dimension. - * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension - * @memberof google.analytics.data.v1alpha.OrderBy - * @instance + * Comparison dimensionFilter. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.data.v1alpha.Comparison + * @instance */ - OrderBy.prototype.dimension = null; + Comparison.prototype.dimensionFilter = null; /** - * OrderBy desc. - * @member {boolean} desc - * @memberof google.analytics.data.v1alpha.OrderBy + * Comparison comparison. + * @member {string|null|undefined} comparison + * @memberof google.analytics.data.v1alpha.Comparison * @instance */ - OrderBy.prototype.desc = false; + Comparison.prototype.comparison = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(Comparison.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** - * OrderBy oneOrderBy. - * @member {"metric"|"dimension"|undefined} oneOrderBy - * @memberof google.analytics.data.v1alpha.OrderBy + * Comparison oneComparison. + * @member {"dimensionFilter"|"comparison"|undefined} oneComparison + * @memberof google.analytics.data.v1alpha.Comparison * @instance */ - Object.defineProperty(OrderBy.prototype, "oneOrderBy", { - get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + Object.defineProperty(Comparison.prototype, "oneComparison", { + get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new OrderBy instance using the specified properties. + * Creates a new Comparison instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static - * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance + * @param {google.analytics.data.v1alpha.IComparison=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Comparison} Comparison instance */ - OrderBy.create = function create(properties) { - return new OrderBy(properties); + Comparison.create = function create(properties) { + return new Comparison(properties); }; /** - * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static - * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderBy.encode = function encode(message, writer) { + Comparison.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison); return writer; }; /** - * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Comparison.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static - * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {google.analytics.data.v1alpha.IComparison} message Comparison message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + Comparison.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OrderBy message from the specified reader or buffer. + * Decodes a Comparison message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @returns {google.analytics.data.v1alpha.Comparison} Comparison * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrderBy.decode = function decode(reader, length, error) { + Comparison.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Comparison(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); break; } - case 4: { - message.desc = reader.bool(); + case 3: { + message.comparison = reader.string(); break; } default: @@ -26857,643 +26420,493 @@ }; /** - * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * Decodes a Comparison message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @returns {google.analytics.data.v1alpha.Comparison} Comparison * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrderBy.decodeDelimited = function decodeDelimited(reader) { + Comparison.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrderBy message. + * Verifies a Comparison message. * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrderBy.verify = function verify(message) { + Comparison.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.metric != null && message.hasOwnProperty("metric")) { - properties.oneOrderBy = 1; - { - var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); - if (error) - return "metric." + error; - } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - if (properties.oneOrderBy === 1) - return "oneOrderBy: multiple values"; - properties.oneOrderBy = 1; + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + properties.oneComparison = 1; { - var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.dimensionFilter); if (error) - return "dimension." + error; + return "dimensionFilter." + error; } } - if (message.desc != null && message.hasOwnProperty("desc")) - if (typeof message.desc !== "boolean") - return "desc: boolean expected"; + if (message.comparison != null && message.hasOwnProperty("comparison")) { + if (properties.oneComparison === 1) + return "oneComparison: multiple values"; + properties.oneComparison = 1; + if (!$util.isString(message.comparison)) + return "comparison: string expected"; + } return null; }; /** - * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * Creates a Comparison message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @returns {google.analytics.data.v1alpha.Comparison} Comparison */ - OrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) + Comparison.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Comparison) return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy(); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); - message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); - } - if (object.dimension != null) { - if (typeof object.dimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); - message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); + var message = new $root.google.analytics.data.v1alpha.Comparison(); + if (object.name != null) + message.name = String(object.name); + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Comparison.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.dimensionFilter); } - if (object.desc != null) - message.desc = Boolean(object.desc); + if (object.comparison != null) + message.comparison = String(object.comparison); return message; }; /** - * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * Creates a plain object from a Comparison message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static - * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy + * @param {google.analytics.data.v1alpha.Comparison} message Comparison * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrderBy.toObject = function toObject(message, options) { + Comparison.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.desc = false; - if (message.metric != null && message.hasOwnProperty("metric")) { - object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; if (options.oneofs) - object.oneOrderBy = "metric"; + object._name = "name"; } - if (message.dimension != null && message.hasOwnProperty("dimension")) { - object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + object.dimensionFilter = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.dimensionFilter, options); if (options.oneofs) - object.oneOrderBy = "dimension"; + object.oneComparison = "dimensionFilter"; + } + if (message.comparison != null && message.hasOwnProperty("comparison")) { + object.comparison = message.comparison; + if (options.oneofs) + object.oneComparison = "comparison"; } - if (message.desc != null && message.hasOwnProperty("desc")) - object.desc = message.desc; return object; }; /** - * Converts this OrderBy to JSON. + * Converts this Comparison to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @instance * @returns {Object.} JSON object */ - OrderBy.prototype.toJSON = function toJSON() { + Comparison.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OrderBy + * Gets the default type url for Comparison * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy + * @memberof google.analytics.data.v1alpha.Comparison * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Comparison"; }; - OrderBy.MetricOrderBy = (function() { + return Comparison; + })(); - /** - * Properties of a MetricOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @interface IMetricOrderBy - * @property {string|null} [metricName] MetricOrderBy metricName - */ + v1alpha.FilterExpression = (function() { - /** - * Constructs a new MetricOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @classdesc Represents a MetricOrderBy. - * @implements IMetricOrderBy - * @constructor - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set - */ - function MetricOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a FilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface IFilterExpression + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [andGroup] FilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFilterExpressionList|null} [orGroup] FilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFilterExpression|null} [notExpression] FilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFilter|null} [filter] FilterExpression filter + */ - /** - * MetricOrderBy metricName. - * @member {string} metricName - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @instance - */ - MetricOrderBy.prototype.metricName = ""; + /** + * Constructs a new FilterExpression. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FilterExpression. + * @implements IFilterExpression + * @constructor + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + */ + function FilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new MetricOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance - */ - MetricOrderBy.create = function create(properties) { - return new MetricOrderBy(properties); - }; + /** + * FilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.andGroup = null; - /** - * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - return writer; - }; - - /** - * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricOrderBy message. - * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricName != null && message.hasOwnProperty("metricName")) - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - return null; - }; - - /** - * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy - */ - MetricOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) - return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); - if (object.metricName != null) - message.metricName = String(object.metricName); - return message; - }; + /** + * FilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.orGroup = null; - /** - * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metricName = ""; - if (message.metricName != null && message.hasOwnProperty("metricName")) - object.metricName = message.metricName; - return object; - }; + /** + * FilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.notExpression = null; - /** - * Converts this MetricOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @instance - * @returns {Object.} JSON object - */ - MetricOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FilterExpression filter. + * @member {google.analytics.data.v1alpha.IFilter|null|undefined} filter + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + FilterExpression.prototype.filter = null; - /** - * Gets the default type url for MetricOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - return MetricOrderBy; - })(); + /** + * FilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + */ + Object.defineProperty(FilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); - OrderBy.DimensionOrderBy = (function() { + /** + * Creates a new FilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression instance + */ + FilterExpression.create = function create(properties) { + return new FilterExpression(properties); + }; - /** - * Properties of a DimensionOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @interface IDimensionOrderBy - * @property {string|null} [dimensionName] DimensionOrderBy dimensionName - * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType - */ + /** + * Encodes the specified FilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.data.v1alpha.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new DimensionOrderBy. - * @memberof google.analytics.data.v1alpha.OrderBy - * @classdesc Represents a DimensionOrderBy. - * @implements IDimensionOrderBy - * @constructor - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set - */ - function DimensionOrderBy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified FilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.IFilterExpression} message FilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * DimensionOrderBy dimensionName. - * @member {string} dimensionName - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.dimensionName = ""; - - /** - * DimensionOrderBy orderType. - * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - */ - DimensionOrderBy.prototype.orderType = 0; - - /** - * Creates a new DimensionOrderBy instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance - */ - DimensionOrderBy.create = function create(properties) { - return new DimensionOrderBy(properties); - }; - - /** - * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); - if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); - return writer; - }; - - /** - * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes a FilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); break; - switch (tag >>> 3) { - case 1: { - message.dimensionName = reader.string(); - break; - } - case 2: { - message.orderType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.decode(reader, reader.uint32()); break; } - } - return message; - }; - - /** - * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DimensionOrderBy message. - * @function verify - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DimensionOrderBy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - if (!$util.isString(message.dimensionName)) - return "dimensionName: string expected"; - if (message.orderType != null && message.hasOwnProperty("orderType")) - switch (message.orderType) { - default: - return "orderType: enum value expected"; - case 0: - case 1: - case 2: - case 3: + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32()); break; } - return null; - }; - - /** - * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy - */ - DimensionOrderBy.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) - return object; - var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); - if (object.dimensionName != null) - message.dimensionName = String(object.dimensionName); - switch (object.orderType) { - default: - if (typeof object.orderType === "number") { - message.orderType = object.orderType; + case 4: { + message.filter = $root.google.analytics.data.v1alpha.Filter.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); break; - case "ORDER_TYPE_UNSPECIFIED": - case 0: - message.orderType = 0; - break; - case "ALPHANUMERIC": - case 1: - message.orderType = 1; - break; - case "CASE_INSENSITIVE_ALPHANUMERIC": - case 2: - message.orderType = 2; - break; - case "NUMERIC": - case 3: - message.orderType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DimensionOrderBy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimensionName = ""; - object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; } - if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) - object.dimensionName = message.dimensionName; - if (message.orderType != null && message.hasOwnProperty("orderType")) - object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; - return object; - }; + } + return message; + }; - /** - * Converts this DimensionOrderBy to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @instance - * @returns {Object.} JSON object - */ - DimensionOrderBy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a FilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for DimensionOrderBy - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a FilterExpression message. + * @function verify + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; - }; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; - /** - * OrderType enum. - * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType - * @enum {number} - * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value - * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value - * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value - * @property {number} NUMERIC=3 NUMERIC value - */ - DimensionOrderBy.OrderType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALPHANUMERIC"] = 1; - values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; - values[valuesById[3] = "NUMERIC"] = 3; - return values; - })(); + /** + * Creates a FilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.FilterExpression} FilterExpression + */ + FilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpression) + return object; + var message = new $root.google.analytics.data.v1alpha.FilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpression.filter: object expected"); + message.filter = $root.google.analytics.data.v1alpha.Filter.fromObject(object.filter); + } + return message; + }; - return DimensionOrderBy; - })(); + /** + * Creates a plain object from a FilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {google.analytics.data.v1alpha.FilterExpression} message FilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.data.v1alpha.Filter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; - return OrderBy; + /** + * Converts this FilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.FilterExpression + * @instance + * @returns {Object.} JSON object + */ + FilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterExpression + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.FilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpression"; + }; + + return FilterExpression; })(); - v1alpha.BetweenFilter = (function() { + v1alpha.FilterExpressionList = (function() { /** - * Properties of a BetweenFilter. + * Properties of a FilterExpressionList. * @memberof google.analytics.data.v1alpha - * @interface IBetweenFilter - * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue - * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue + * @interface IFilterExpressionList + * @property {Array.|null} [expressions] FilterExpressionList expressions */ /** - * Constructs a new BetweenFilter. + * Constructs a new FilterExpressionList. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a BetweenFilter. - * @implements IBetweenFilter + * @classdesc Represents a FilterExpressionList. + * @implements IFilterExpressionList * @constructor - * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set */ - function BetweenFilter(properties) { + function FilterExpressionList(properties) { + this.expressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27501,91 +26914,80 @@ } /** - * BetweenFilter fromValue. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue - * @memberof google.analytics.data.v1alpha.BetweenFilter - * @instance - */ - BetweenFilter.prototype.fromValue = null; - - /** - * BetweenFilter toValue. - * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue - * @memberof google.analytics.data.v1alpha.BetweenFilter + * FilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @instance */ - BetweenFilter.prototype.toValue = null; + FilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Creates a new BetweenFilter instance using the specified properties. + * Creates a new FilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance + * @param {google.analytics.data.v1alpha.IFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList instance */ - BetweenFilter.create = function create(properties) { - return new BetweenFilter(properties); + FilterExpressionList.create = function create(properties) { + return new FilterExpressionList(properties); }; /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * Encodes the specified FilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BetweenFilter.encode = function encode(message, writer) { + FilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) - $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * Encodes the specified FilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFilterExpressionList} message FilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + FilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BetweenFilter message from the specified reader or buffer. + * Decodes a FilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BetweenFilter.decode = function decode(reader, length, error) { + FilterExpressionList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FilterExpression.decode(reader, reader.uint32())); break; } default: @@ -27597,140 +26999,144 @@ }; /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * Decodes a FilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + FilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BetweenFilter message. + * Verifies a FilterExpressionList message. * @function verify - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BetweenFilter.verify = function verify(message) { + FilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fromValue != null && message.hasOwnProperty("fromValue")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); - if (error) - return "fromValue." + error; - } - if (message.toValue != null && message.hasOwnProperty("toValue")) { - var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); - if (error) - return "toValue." + error; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } } return null; }; /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @returns {google.analytics.data.v1alpha.FilterExpressionList} FilterExpressionList */ - BetweenFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) + FilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FilterExpressionList) return object; - var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); - if (object.fromValue != null) { - if (typeof object.fromValue !== "object") - throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); - message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); - } - if (object.toValue != null) { - if (typeof object.toValue !== "object") - throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); - message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); + var message = new $root.google.analytics.data.v1alpha.FilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FilterExpression.fromObject(object.expressions[i]); + } } return message; }; /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * Creates a plain object from a FilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static - * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter + * @param {google.analytics.data.v1alpha.FilterExpressionList} message FilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BetweenFilter.toObject = function toObject(message, options) { + FilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fromValue = null; - object.toValue = null; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FilterExpression.toObject(message.expressions[j], options); } - if (message.fromValue != null && message.hasOwnProperty("fromValue")) - object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); - if (message.toValue != null && message.hasOwnProperty("toValue")) - object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); return object; }; /** - * Converts this BetweenFilter to JSON. + * Converts this FilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @instance * @returns {Object.} JSON object */ - BetweenFilter.prototype.toJSON = function toJSON() { + FilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BetweenFilter + * Gets the default type url for FilterExpressionList * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.BetweenFilter + * @memberof google.analytics.data.v1alpha.FilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FilterExpressionList"; }; - return BetweenFilter; + return FilterExpressionList; })(); - v1alpha.EmptyFilter = (function() { + v1alpha.Filter = (function() { /** - * Properties of an EmptyFilter. + * Properties of a Filter. * @memberof google.analytics.data.v1alpha - * @interface IEmptyFilter + * @interface IFilter + * @property {string|null} [fieldName] Filter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] Filter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] Filter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] Filter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] Filter betweenFilter + * @property {google.analytics.data.v1alpha.IEmptyFilter|null} [emptyFilter] Filter emptyFilter */ /** - * Constructs a new EmptyFilter. + * Constructs a new Filter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EmptyFilter. - * @implements IEmptyFilter + * @classdesc Represents a Filter. + * @implements IFilter * @constructor - * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set */ - function EmptyFilter(properties) { + function Filter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27738,178 +27144,389 @@ } /** - * Creates a new EmptyFilter instance using the specified properties. + * Filter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.fieldName = ""; + + /** + * Filter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.stringFilter = null; + + /** + * Filter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.inListFilter = null; + + /** + * Filter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.numericFilter = null; + + /** + * Filter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.betweenFilter = null; + + /** + * Filter emptyFilter. + * @member {google.analytics.data.v1alpha.IEmptyFilter|null|undefined} emptyFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Filter.prototype.emptyFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Filter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|"emptyFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.Filter + * @instance + */ + Object.defineProperty(Filter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter", "emptyFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Filter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance + * @param {google.analytics.data.v1alpha.IFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Filter} Filter instance */ - EmptyFilter.create = function create(properties) { - return new EmptyFilter(properties); + Filter.create = function create(properties) { + return new Filter(properties); }; /** - * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * Encodes the specified Filter message. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmptyFilter.encode = function encode(message, writer) { + Filter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.emptyFilter != null && Object.hasOwnProperty.call(message, "emptyFilter")) + $root.google.analytics.data.v1alpha.EmptyFilter.encode(message.emptyFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Filter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static - * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFilter} message Filter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + Filter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EmptyFilter message from the specified reader or buffer. + * Decodes a Filter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @returns {google.analytics.data.v1alpha.Filter} Filter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EmptyFilter.decode = function decode(reader, length, error) { + Filter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Filter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EmptyFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmptyFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EmptyFilter message. + * Verifies a Filter message. * @function verify - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EmptyFilter.verify = function verify(message) { + Filter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.EmptyFilter.verify(message.emptyFilter); + if (error) + return "emptyFilter." + error; + } + } return null; }; /** - * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Filter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @returns {google.analytics.data.v1alpha.Filter} Filter */ - EmptyFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Filter) return object; - return new $root.google.analytics.data.v1alpha.EmptyFilter(); + var message = new $root.google.analytics.data.v1alpha.Filter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.emptyFilter != null) { + if (typeof object.emptyFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.Filter.emptyFilter: object expected"); + message.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.fromObject(object.emptyFilter); + } + return message; }; /** - * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * Creates a plain object from a Filter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static - * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter + * @param {google.analytics.data.v1alpha.Filter} message Filter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EmptyFilter.toObject = function toObject() { - return {}; + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.emptyFilter != null && message.hasOwnProperty("emptyFilter")) { + object.emptyFilter = $root.google.analytics.data.v1alpha.EmptyFilter.toObject(message.emptyFilter, options); + if (options.oneofs) + object.oneFilter = "emptyFilter"; + } + return object; }; /** - * Converts this EmptyFilter to JSON. + * Converts this Filter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @instance * @returns {Object.} JSON object */ - EmptyFilter.prototype.toJSON = function toJSON() { + Filter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EmptyFilter + * Gets the default type url for Filter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EmptyFilter + * @memberof google.analytics.data.v1alpha.Filter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Filter"; }; - return EmptyFilter; + return Filter; })(); - v1alpha.NumericValue = (function() { + v1alpha.StringFilter = (function() { /** - * Properties of a NumericValue. + * Properties of a StringFilter. * @memberof google.analytics.data.v1alpha - * @interface INumericValue - * @property {number|Long|null} [int64Value] NumericValue int64Value - * @property {number|null} [doubleValue] NumericValue doubleValue + * @interface IStringFilter + * @property {google.analytics.data.v1alpha.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive */ /** - * Constructs a new NumericValue. + * Constructs a new StringFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a NumericValue. - * @implements INumericValue + * @classdesc Represents a StringFilter. + * @implements IStringFilter * @constructor - * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set */ - function NumericValue(properties) { + function StringFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27917,105 +27534,105 @@ } /** - * NumericValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.analytics.data.v1alpha.NumericValue + * StringFilter matchType. + * @member {google.analytics.data.v1alpha.StringFilter.MatchType} matchType + * @memberof google.analytics.data.v1alpha.StringFilter * @instance */ - NumericValue.prototype.int64Value = null; + StringFilter.prototype.matchType = 0; /** - * NumericValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.analytics.data.v1alpha.NumericValue + * StringFilter value. + * @member {string} value + * @memberof google.analytics.data.v1alpha.StringFilter * @instance */ - NumericValue.prototype.doubleValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + StringFilter.prototype.value = ""; /** - * NumericValue oneValue. - * @member {"int64Value"|"doubleValue"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.NumericValue + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.StringFilter * @instance */ - Object.defineProperty(NumericValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + StringFilter.prototype.caseSensitive = false; /** - * Creates a new NumericValue instance using the specified properties. + * Creates a new StringFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static - * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance + * @param {google.analytics.data.v1alpha.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter instance */ - NumericValue.create = function create(properties) { - return new NumericValue(properties); + StringFilter.create = function create(properties) { + return new StringFilter(properties); }; /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static - * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericValue.encode = function encode(message, writer) { + StringFilter.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); + 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 NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.StringFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static - * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IStringFilter} message StringFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NumericValue message from the specified reader or buffer. + * Decodes a StringFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericValue.decode = function decode(reader, length, error) { + StringFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.StringFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.int64Value = reader.int64(); + message.matchType = reader.int32(); break; } case 2: { - message.doubleValue = reader.double(); + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); break; } default: @@ -28027,153 +27644,209 @@ }; /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * Decodes a StringFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericValue.decodeDelimited = function decodeDelimited(reader) { + StringFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NumericValue message. + * Verifies a StringFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NumericValue.verify = function verify(message) { + StringFilter.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"; - } + 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 NumericValue message from a plain object. Also converts values to their respective internal types. + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @returns {google.analytics.data.v1alpha.StringFilter} StringFilter */ - NumericValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.StringFilter) return object; - var message = new $root.google.analytics.data.v1alpha.NumericValue(); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); + var message = new $root.google.analytics.data.v1alpha.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); return message; }; /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static - * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue + * @param {google.analytics.data.v1alpha.StringFilter} message StringFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NumericValue.toObject = function toObject(message, options) { + StringFilter.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"; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.data.v1alpha.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; return object; }; /** - * Converts this NumericValue to JSON. + * Converts this StringFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @instance * @returns {Object.} JSON object */ - NumericValue.prototype.toJSON = function toJSON() { + StringFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NumericValue + * Gets the default type url for StringFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.NumericValue + * @memberof google.analytics.data.v1alpha.StringFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.StringFilter"; }; - return NumericValue; + /** + * MatchType enum. + * @name google.analytics.data.v1alpha.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; })(); - v1alpha.CohortSpec = (function() { + v1alpha.InListFilter = (function() { /** - * Properties of a CohortSpec. + * Properties of an InListFilter. * @memberof google.analytics.data.v1alpha - * @interface ICohortSpec - * @property {Array.|null} [cohorts] CohortSpec cohorts - * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange - * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive */ /** - * Constructs a new CohortSpec. + * Constructs a new InListFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortSpec. - * @implements ICohortSpec + * @classdesc Represents an InListFilter. + * @implements IInListFilter * @constructor - * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set */ - function CohortSpec(properties) { - this.cohorts = []; + function InListFilter(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28181,108 +27854,94 @@ } /** - * CohortSpec cohorts. - * @member {Array.} cohorts - * @memberof google.analytics.data.v1alpha.CohortSpec - * @instance - */ - CohortSpec.prototype.cohorts = $util.emptyArray; - - /** - * CohortSpec cohortsRange. - * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange - * @memberof google.analytics.data.v1alpha.CohortSpec + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.data.v1alpha.InListFilter * @instance */ - CohortSpec.prototype.cohortsRange = null; + InListFilter.prototype.values = $util.emptyArray; /** - * CohortSpec cohortReportSettings. - * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings - * @memberof google.analytics.data.v1alpha.CohortSpec + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.data.v1alpha.InListFilter * @instance */ - CohortSpec.prototype.cohortReportSettings = null; + InListFilter.prototype.caseSensitive = false; /** - * Creates a new CohortSpec instance using the specified properties. + * Creates a new InListFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static - * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance + * @param {google.analytics.data.v1alpha.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter instance */ - CohortSpec.create = function create(properties) { - return new CohortSpec(properties); + InListFilter.create = function create(properties) { + return new InListFilter(properties); }; /** - * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static - * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortSpec.encode = function encode(message, writer) { + InListFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cohorts != null && message.cohorts.length) - for (var i = 0; i < message.cohorts.length; ++i) - $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) - $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) - $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.InListFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static - * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {google.analytics.data.v1alpha.IInListFilter} message InListFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CohortSpec message from the specified reader or buffer. + * Decodes an InListFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortSpec.decode = function decode(reader, length, error) { + InListFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.InListFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.cohorts && message.cohorts.length)) - message.cohorts = []; - message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); break; } case 2: { - message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); + message.caseSensitive = reader.bool(); break; } default: @@ -28294,169 +27953,144 @@ }; /** - * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * Decodes an InListFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortSpec.decodeDelimited = function decodeDelimited(reader) { + InListFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CohortSpec message. + * Verifies an InListFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CohortSpec.verify = function verify(message) { + InListFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cohorts != null && message.hasOwnProperty("cohorts")) { - if (!Array.isArray(message.cohorts)) - return "cohorts: array expected"; - for (var i = 0; i < message.cohorts.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); - if (error) - return "cohorts." + error; - } - } - if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { - var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); - if (error) - return "cohortsRange." + error; - } - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { - var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); - if (error) - return "cohortReportSettings." + error; + 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 a CohortSpec message from a plain object. Also converts values to their respective internal types. + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @returns {google.analytics.data.v1alpha.InListFilter} InListFilter */ - CohortSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.InListFilter) return object; - var message = new $root.google.analytics.data.v1alpha.CohortSpec(); - if (object.cohorts) { - if (!Array.isArray(object.cohorts)) - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); - message.cohorts = []; - for (var i = 0; i < object.cohorts.length; ++i) { - if (typeof object.cohorts[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); - message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); - } - } - if (object.cohortsRange != null) { - if (typeof object.cohortsRange !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); - message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); - } - if (object.cohortReportSettings != null) { - if (typeof object.cohortReportSettings !== "object") - throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); - message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); + var message = new $root.google.analytics.data.v1alpha.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.data.v1alpha.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); return message; }; /** - * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static - * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec + * @param {google.analytics.data.v1alpha.InListFilter} message InListFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CohortSpec.toObject = function toObject(message, options) { + InListFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.cohorts = []; - if (options.defaults) { - object.cohortsRange = null; - object.cohortReportSettings = null; - } - if (message.cohorts && message.cohorts.length) { - object.cohorts = []; - for (var j = 0; j < message.cohorts.length; ++j) - object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); + 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.cohortsRange != null && message.hasOwnProperty("cohortsRange")) - object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); - if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) - object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; return object; }; /** - * Converts this CohortSpec to JSON. + * Converts this InListFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @instance * @returns {Object.} JSON object */ - CohortSpec.prototype.toJSON = function toJSON() { + InListFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CohortSpec + * Gets the default type url for InListFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortSpec + * @memberof google.analytics.data.v1alpha.InListFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.InListFilter"; }; - return CohortSpec; + return InListFilter; })(); - v1alpha.Cohort = (function() { + v1alpha.NumericFilter = (function() { /** - * Properties of a Cohort. + * Properties of a NumericFilter. * @memberof google.analytics.data.v1alpha - * @interface ICohort - * @property {string|null} [name] Cohort name - * @property {string|null} [dimension] Cohort dimension - * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange + * @interface INumericFilter + * @property {google.analytics.data.v1alpha.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.data.v1alpha.INumericValue|null} [value] NumericFilter value */ /** - * Constructs a new Cohort. + * Constructs a new NumericFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Cohort. - * @implements ICohort + * @classdesc Represents a NumericFilter. + * @implements INumericFilter * @constructor - * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set */ - function Cohort(properties) { + function NumericFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28464,105 +28098,91 @@ } /** - * Cohort name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - */ - Cohort.prototype.name = ""; - - /** - * Cohort dimension. - * @member {string} dimension - * @memberof google.analytics.data.v1alpha.Cohort + * NumericFilter operation. + * @member {google.analytics.data.v1alpha.NumericFilter.Operation} operation + * @memberof google.analytics.data.v1alpha.NumericFilter * @instance */ - Cohort.prototype.dimension = ""; + NumericFilter.prototype.operation = 0; /** - * Cohort dateRange. - * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange - * @memberof google.analytics.data.v1alpha.Cohort + * NumericFilter value. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} value + * @memberof google.analytics.data.v1alpha.NumericFilter * @instance */ - Cohort.prototype.dateRange = null; + NumericFilter.prototype.value = null; /** - * Creates a new Cohort instance using the specified properties. + * Creates a new NumericFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static - * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance + * @param {google.analytics.data.v1alpha.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter instance */ - Cohort.create = function create(properties) { - return new Cohort(properties); + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); }; /** - * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static - * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cohort.encode = function encode(message, writer) { + NumericFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); - if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) - $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static - * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {google.analytics.data.v1alpha.INumericFilter} message NumericFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cohort.encodeDelimited = function encodeDelimited(message, writer) { + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cohort message from the specified reader or buffer. + * Decodes a NumericFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cohort.decode = function decode(reader, length, error) { + NumericFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.operation = reader.int32(); break; } case 2: { - message.dimension = reader.string(); - break; - } - case 3: { - message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); + message.value = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); break; } default: @@ -28574,146 +28194,3694 @@ }; /** - * Decodes a Cohort message from the specified reader or buffer, length delimited. + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cohort.decodeDelimited = function decodeDelimited(reader) { + NumericFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Cohort message. + * Verifies a NumericFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Cohort.verify = function verify(message) { + NumericFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - if (!$util.isString(message.dimension)) - return "dimension: string expected"; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) { - var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.value); if (error) - return "dateRange." + error; + return "value." + error; } return null; }; /** - * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @returns {google.analytics.data.v1alpha.NumericFilter} NumericFilter */ - Cohort.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Cohort) + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericFilter) return object; - var message = new $root.google.analytics.data.v1alpha.Cohort(); - if (object.name != null) - message.name = String(object.name); - if (object.dimension != null) - message.dimension = String(object.dimension); - if (object.dateRange != null) { - if (typeof object.dateRange !== "object") - throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); - message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); + var message = new $root.google.analytics.data.v1alpha.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.data.v1alpha.NumericFilter.value: object expected"); + message.value = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.value); } return message; }; /** - * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Cohort + * @memberof google.analytics.data.v1alpha.NumericFilter * @static - * @param {google.analytics.data.v1alpha.Cohort} message Cohort + * @param {google.analytics.data.v1alpha.NumericFilter} message NumericFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cohort.toObject = function toObject(message, options) { + NumericFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.dimension = ""; - object.dateRange = null; + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = message.dimension; - if (message.dateRange != null && message.hasOwnProperty("dateRange")) - object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.data.v1alpha.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.value, options); return object; }; - /** - * Converts this Cohort to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.Cohort - * @instance - * @returns {Object.} JSON object - */ - Cohort.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.data.v1alpha.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + v1alpha.OrderBy = (function() { + + /** + * Properties of an OrderBy. + * @memberof google.analytics.data.v1alpha + * @interface IOrderBy + * @property {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null} [metric] OrderBy metric + * @property {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null} [dimension] OrderBy dimension + * @property {boolean|null} [desc] OrderBy desc + */ + + /** + * Constructs a new OrderBy. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an OrderBy. + * @implements IOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + */ + function OrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrderBy metric. + * @member {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.metric = null; + + /** + * OrderBy dimension. + * @member {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.dimension = null; + + /** + * OrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + OrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + */ + Object.defineProperty(OrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy instance + */ + OrderBy.create = function create(properties) { + return new OrderBy(properties); + }; + + /** + * Encodes the specified OrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified OrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.IOrderBy} message OrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an OrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy} OrderBy + */ + OrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.metric: object expected"); + message.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.OrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an OrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy} message OrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this OrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy + * @instance + * @returns {Object.} JSON object + */ + OrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy"; + }; + + OrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + OrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.data.v1alpha.OrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {google.analytics.data.v1alpha.OrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.OrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.OrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.data.v1alpha.OrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return OrderBy; + })(); + + v1alpha.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @interface IBetweenFilter + * @property {google.analytics.data.v1alpha.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.data.v1alpha.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} fromValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.data.v1alpha.INumericValue|null|undefined} toValue + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.data.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.data.v1alpha.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.BetweenFilter) + return object; + var message = new $root.google.analytics.data.v1alpha.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.data.v1alpha.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.data.v1alpha.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {google.analytics.data.v1alpha.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.data.v1alpha.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + v1alpha.EmptyFilter = (function() { + + /** + * Properties of an EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @interface IEmptyFilter + */ + + /** + * Constructs a new EmptyFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents an EmptyFilter. + * @implements IEmptyFilter + * @constructor + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + */ + function EmptyFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new EmptyFilter instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter instance + */ + EmptyFilter.create = function create(properties) { + return new EmptyFilter(properties); + }; + + /** + * Encodes the specified EmptyFilter message. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EmptyFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EmptyFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.IEmptyFilter} message EmptyFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmptyFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EmptyFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmptyFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmptyFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmptyFilter message. + * @function verify + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmptyFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EmptyFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.EmptyFilter} EmptyFilter + */ + EmptyFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EmptyFilter) + return object; + return new $root.google.analytics.data.v1alpha.EmptyFilter(); + }; + + /** + * Creates a plain object from an EmptyFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {google.analytics.data.v1alpha.EmptyFilter} message EmptyFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmptyFilter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EmptyFilter to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @instance + * @returns {Object.} JSON object + */ + EmptyFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmptyFilter + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.EmptyFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmptyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.EmptyFilter"; + }; + + return EmptyFilter; + })(); + + v1alpha.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.data.v1alpha + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.NumericValue) + return object; + var message = new $root.google.analytics.data.v1alpha.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {google.analytics.data.v1alpha.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.NumericValue"; + }; + + return NumericValue; + })(); + + v1alpha.CohortSpec = (function() { + + /** + * Properties of a CohortSpec. + * @memberof google.analytics.data.v1alpha + * @interface ICohortSpec + * @property {Array.|null} [cohorts] CohortSpec cohorts + * @property {google.analytics.data.v1alpha.ICohortsRange|null} [cohortsRange] CohortSpec cohortsRange + * @property {google.analytics.data.v1alpha.ICohortReportSettings|null} [cohortReportSettings] CohortSpec cohortReportSettings + */ + + /** + * Constructs a new CohortSpec. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortSpec. + * @implements ICohortSpec + * @constructor + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + */ + function CohortSpec(properties) { + this.cohorts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortSpec cohorts. + * @member {Array.} cohorts + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohorts = $util.emptyArray; + + /** + * CohortSpec cohortsRange. + * @member {google.analytics.data.v1alpha.ICohortsRange|null|undefined} cohortsRange + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortsRange = null; + + /** + * CohortSpec cohortReportSettings. + * @member {google.analytics.data.v1alpha.ICohortReportSettings|null|undefined} cohortReportSettings + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + */ + CohortSpec.prototype.cohortReportSettings = null; + + /** + * Creates a new CohortSpec instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec instance + */ + CohortSpec.create = function create(properties) { + return new CohortSpec(properties); + }; + + /** + * Encodes the specified CohortSpec message. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cohorts != null && message.cohorts.length) + for (var i = 0; i < message.cohorts.length; ++i) + $root.google.analytics.data.v1alpha.Cohort.encode(message.cohorts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cohortsRange != null && Object.hasOwnProperty.call(message, "cohortsRange")) + $root.google.analytics.data.v1alpha.CohortsRange.encode(message.cohortsRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cohortReportSettings != null && Object.hasOwnProperty.call(message, "cohortReportSettings")) + $root.google.analytics.data.v1alpha.CohortReportSettings.encode(message.cohortReportSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CohortSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.ICohortSpec} message CohortSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cohorts && message.cohorts.length)) + message.cohorts = []; + message.cohorts.push($root.google.analytics.data.v1alpha.Cohort.decode(reader, reader.uint32())); + break; + } + case 2: { + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortSpec message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cohorts != null && message.hasOwnProperty("cohorts")) { + if (!Array.isArray(message.cohorts)) + return "cohorts: array expected"; + for (var i = 0; i < message.cohorts.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Cohort.verify(message.cohorts[i]); + if (error) + return "cohorts." + error; + } + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) { + var error = $root.google.analytics.data.v1alpha.CohortsRange.verify(message.cohortsRange); + if (error) + return "cohortsRange." + error; + } + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) { + var error = $root.google.analytics.data.v1alpha.CohortReportSettings.verify(message.cohortReportSettings); + if (error) + return "cohortReportSettings." + error; + } + return null; + }; + + /** + * Creates a CohortSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortSpec} CohortSpec + */ + CohortSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortSpec(); + if (object.cohorts) { + if (!Array.isArray(object.cohorts)) + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: array expected"); + message.cohorts = []; + for (var i = 0; i < object.cohorts.length; ++i) { + if (typeof object.cohorts[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohorts: object expected"); + message.cohorts[i] = $root.google.analytics.data.v1alpha.Cohort.fromObject(object.cohorts[i]); + } + } + if (object.cohortsRange != null) { + if (typeof object.cohortsRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortsRange: object expected"); + message.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.fromObject(object.cohortsRange); + } + if (object.cohortReportSettings != null) { + if (typeof object.cohortReportSettings !== "object") + throw TypeError(".google.analytics.data.v1alpha.CohortSpec.cohortReportSettings: object expected"); + message.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.fromObject(object.cohortReportSettings); + } + return message; + }; + + /** + * Creates a plain object from a CohortSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {google.analytics.data.v1alpha.CohortSpec} message CohortSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cohorts = []; + if (options.defaults) { + object.cohortsRange = null; + object.cohortReportSettings = null; + } + if (message.cohorts && message.cohorts.length) { + object.cohorts = []; + for (var j = 0; j < message.cohorts.length; ++j) + object.cohorts[j] = $root.google.analytics.data.v1alpha.Cohort.toObject(message.cohorts[j], options); + } + if (message.cohortsRange != null && message.hasOwnProperty("cohortsRange")) + object.cohortsRange = $root.google.analytics.data.v1alpha.CohortsRange.toObject(message.cohortsRange, options); + if (message.cohortReportSettings != null && message.hasOwnProperty("cohortReportSettings")) + object.cohortReportSettings = $root.google.analytics.data.v1alpha.CohortReportSettings.toObject(message.cohortReportSettings, options); + return object; + }; + + /** + * Converts this CohortSpec to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortSpec + * @instance + * @returns {Object.} JSON object + */ + CohortSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortSpec + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortSpec"; + }; + + return CohortSpec; + })(); + + v1alpha.Cohort = (function() { + + /** + * Properties of a Cohort. + * @memberof google.analytics.data.v1alpha + * @interface ICohort + * @property {string|null} [name] Cohort name + * @property {string|null} [dimension] Cohort dimension + * @property {google.analytics.data.v1alpha.IDateRange|null} [dateRange] Cohort dateRange + */ + + /** + * Constructs a new Cohort. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a Cohort. + * @implements ICohort + * @constructor + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + */ + function Cohort(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cohort name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.name = ""; + + /** + * Cohort dimension. + * @member {string} dimension + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dimension = ""; + + /** + * Cohort dateRange. + * @member {google.analytics.data.v1alpha.IDateRange|null|undefined} dateRange + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + */ + Cohort.prototype.dateRange = null; + + /** + * Creates a new Cohort instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Cohort} Cohort instance + */ + Cohort.create = function create(properties) { + return new Cohort(properties); + }; + + /** + * Encodes the specified Cohort message. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dimension); + if (message.dateRange != null && Object.hasOwnProperty.call(message, "dateRange")) + $root.google.analytics.data.v1alpha.DateRange.encode(message.dateRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cohort message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Cohort.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.ICohort} message Cohort message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cohort.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cohort message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Cohort(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dimension = reader.string(); + break; + } + case 3: { + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cohort message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cohort.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cohort message. + * @function verify + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cohort.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) { + var error = $root.google.analytics.data.v1alpha.DateRange.verify(message.dateRange); + if (error) + return "dateRange." + error; + } + return null; + }; + + /** + * Creates a Cohort message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.Cohort} Cohort + */ + Cohort.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Cohort) + return object; + var message = new $root.google.analytics.data.v1alpha.Cohort(); + if (object.name != null) + message.name = String(object.name); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.dateRange != null) { + if (typeof object.dateRange !== "object") + throw TypeError(".google.analytics.data.v1alpha.Cohort.dateRange: object expected"); + message.dateRange = $root.google.analytics.data.v1alpha.DateRange.fromObject(object.dateRange); + } + return message; + }; + + /** + * Creates a plain object from a Cohort message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {google.analytics.data.v1alpha.Cohort} message Cohort + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cohort.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.dimension = ""; + object.dateRange = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.dateRange != null && message.hasOwnProperty("dateRange")) + object.dateRange = $root.google.analytics.data.v1alpha.DateRange.toObject(message.dateRange, options); + return object; + }; + + /** + * Converts this Cohort to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.Cohort + * @instance + * @returns {Object.} JSON object + */ + Cohort.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cohort + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.Cohort + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; + }; + + return Cohort; + })(); + + v1alpha.CohortsRange = (function() { + + /** + * Properties of a CohortsRange. + * @memberof google.analytics.data.v1alpha + * @interface ICohortsRange + * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity + * @property {number|null} [startOffset] CohortsRange startOffset + * @property {number|null} [endOffset] CohortsRange endOffset + */ + + /** + * Constructs a new CohortsRange. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortsRange. + * @implements ICohortsRange + * @constructor + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + */ + function CohortsRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortsRange granularity. + * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.granularity = 0; + + /** + * CohortsRange startOffset. + * @member {number} startOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.startOffset = 0; + + /** + * CohortsRange endOffset. + * @member {number} endOffset + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + */ + CohortsRange.prototype.endOffset = 0; + + /** + * Creates a new CohortsRange instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance + */ + CohortsRange.create = function create(properties) { + return new CohortsRange(properties); + }; + + /** + * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.granularity = reader.int32(); + break; + } + case 2: { + message.startOffset = reader.int32(); + break; + } + case 3: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortsRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortsRange message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortsRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + */ + CohortsRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortsRange(); + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "DAILY": + case 1: + message.granularity = 1; + break; + case "WEEKLY": + case 2: + message.granularity = 2; + break; + case "MONTHLY": + case 3: + message.granularity = 3; + break; + } + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortsRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; + object.startOffset = 0; + object.endOffset = 0; + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this CohortsRange to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortsRange + * @instance + * @returns {Object.} JSON object + */ + CohortsRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortsRange + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortsRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; + }; + + /** + * Granularity enum. + * @name google.analytics.data.v1alpha.CohortsRange.Granularity + * @enum {number} + * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + * @property {number} MONTHLY=3 MONTHLY value + */ + CohortsRange.Granularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + values[valuesById[3] = "MONTHLY"] = 3; + return values; + })(); + + return CohortsRange; + })(); + + v1alpha.CohortReportSettings = (function() { + + /** + * Properties of a CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @interface ICohortReportSettings + * @property {boolean|null} [accumulate] CohortReportSettings accumulate + */ + + /** + * Constructs a new CohortReportSettings. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a CohortReportSettings. + * @implements ICohortReportSettings + * @constructor + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + */ + function CohortReportSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CohortReportSettings accumulate. + * @member {boolean} accumulate + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + */ + CohortReportSettings.prototype.accumulate = false; + + /** + * Creates a new CohortReportSettings instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance + */ + CohortReportSettings.create = function create(properties) { + return new CohortReportSettings(properties); + }; + + /** + * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + return writer; + }; + + /** + * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accumulate = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CohortReportSettings message. + * @function verify + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CohortReportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + if (typeof message.accumulate !== "boolean") + return "accumulate: boolean expected"; + return null; + }; + + /** + * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + */ + CohortReportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) + return object; + var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + if (object.accumulate != null) + message.accumulate = Boolean(object.accumulate); + return message; + }; + + /** + * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CohortReportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accumulate = false; + if (message.accumulate != null && message.hasOwnProperty("accumulate")) + object.accumulate = message.accumulate; + return object; + }; + + /** + * Converts this CohortReportSettings to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @instance + * @returns {Object.} JSON object + */ + CohortReportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CohortReportSettings + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; + }; + + return CohortReportSettings; + })(); + + /** + * Section enum. + * @name google.analytics.data.v1alpha.Section + * @enum {number} + * @property {number} SECTION_UNSPECIFIED=0 SECTION_UNSPECIFIED value + * @property {number} SECTION_REPORT=1 SECTION_REPORT value + * @property {number} SECTION_ADVERTISING=2 SECTION_ADVERTISING value + */ + v1alpha.Section = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SECTION_REPORT"] = 1; + values[valuesById[2] = "SECTION_ADVERTISING"] = 2; + return values; + })(); + + v1alpha.ResponseMetaData = (function() { + + /** + * Properties of a ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @interface IResponseMetaData + * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow + * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse + * @property {string|null} [currencyCode] ResponseMetaData currencyCode + * @property {string|null} [timeZone] ResponseMetaData timeZone + * @property {string|null} [emptyReason] ResponseMetaData emptyReason + * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding + * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + * @property {google.analytics.data.v1alpha.Section|null} [section] ResponseMetaData section + */ + + /** + * Constructs a new ResponseMetaData. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a ResponseMetaData. + * @implements IResponseMetaData + * @constructor + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + */ + function ResponseMetaData(properties) { + this.samplingMetadatas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMetaData dataLossFromOtherRow. + * @member {boolean} dataLossFromOtherRow + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.dataLossFromOtherRow = false; + + /** + * ResponseMetaData schemaRestrictionResponse. + * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.schemaRestrictionResponse = null; + + /** + * ResponseMetaData currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.currencyCode = null; + + /** + * ResponseMetaData timeZone. + * @member {string|null|undefined} timeZone + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.timeZone = null; + + /** + * ResponseMetaData emptyReason. + * @member {string|null|undefined} emptyReason + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.emptyReason = null; + + /** + * ResponseMetaData subjectToThresholding. + * @member {boolean|null|undefined} subjectToThresholding + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.subjectToThresholding = null; + + /** + * ResponseMetaData samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; + + /** + * ResponseMetaData section. + * @member {google.analytics.data.v1alpha.Section} section + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + */ + ResponseMetaData.prototype.section = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { + get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { + get: $util.oneOfGetter($oneOfFields = ["timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { + get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { + get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMetaData instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance + */ + ResponseMetaData.create = function create(properties) { + return new ResponseMetaData(properties); + }; + + /** + * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); + if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); + if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); + if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.section != null && Object.hasOwnProperty.call(message, "section")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.section); + return writer; + }; + + /** + * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.dataLossFromOtherRow = reader.bool(); + break; + } + case 4: { + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.currencyCode = reader.string(); + break; + } + case 6: { + message.timeZone = reader.string(); + break; + } + case 7: { + message.emptyReason = reader.string(); + break; + } + case 8: { + message.subjectToThresholding = reader.bool(); + break; + } + case 9: { + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + break; + } + case 10: { + message.section = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetaData message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + if (typeof message.dataLossFromOtherRow !== "boolean") + return "dataLossFromOtherRow: boolean expected"; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + properties._schemaRestrictionResponse = 1; + { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (error) + return "schemaRestrictionResponse." + error; + } + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + properties._timeZone = 1; + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + properties._emptyReason = 1; + if (!$util.isString(message.emptyReason)) + return "emptyReason: string expected"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + properties._subjectToThresholding = 1; + if (typeof message.subjectToThresholding !== "boolean") + return "subjectToThresholding: boolean expected"; + } + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (error) + return "samplingMetadatas." + error; + } + } + if (message.section != null && message.hasOwnProperty("section")) + switch (message.section) { + default: + return "section: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + */ + ResponseMetaData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + if (object.dataLossFromOtherRow != null) + message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); + if (object.schemaRestrictionResponse != null) { + if (typeof object.schemaRestrictionResponse !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); + message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + } + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.emptyReason != null) + message.emptyReason = String(object.emptyReason); + if (object.subjectToThresholding != null) + message.subjectToThresholding = Boolean(object.subjectToThresholding); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } + } + switch (object.section) { + default: + if (typeof object.section === "number") { + message.section = object.section; + break; + } + break; + case "SECTION_UNSPECIFIED": + case 0: + message.section = 0; + break; + case "SECTION_REPORT": + case 1: + message.section = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.section = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (options.defaults) { + object.dataLossFromOtherRow = false; + object.section = options.enums === String ? "SECTION_UNSPECIFIED" : 0; + } + if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) + object.dataLossFromOtherRow = message.dataLossFromOtherRow; + if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { + object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); + if (options.oneofs) + object._schemaRestrictionResponse = "schemaRestrictionResponse"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = message.timeZone; + if (options.oneofs) + object._timeZone = "timeZone"; + } + if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { + object.emptyReason = message.emptyReason; + if (options.oneofs) + object._emptyReason = "emptyReason"; + } + if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { + object.subjectToThresholding = message.subjectToThresholding; + if (options.oneofs) + object._subjectToThresholding = "subjectToThresholding"; + } + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + } + if (message.section != null && message.hasOwnProperty("section")) + object.section = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.section] === undefined ? message.section : $root.google.analytics.data.v1alpha.Section[message.section] : message.section; + return object; + }; + + /** + * Converts this ResponseMetaData to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @instance + * @returns {Object.} JSON object + */ + ResponseMetaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetaData + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; + }; + + ResponseMetaData.SchemaRestrictionResponse = (function() { + + /** + * Properties of a SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @interface ISchemaRestrictionResponse + * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions + */ + + /** + * Constructs a new SchemaRestrictionResponse. + * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @classdesc Represents a SchemaRestrictionResponse. + * @implements ISchemaRestrictionResponse + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + */ + function SchemaRestrictionResponse(properties) { + this.activeMetricRestrictions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRestrictionResponse activeMetricRestrictions. + * @member {Array.} activeMetricRestrictions + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + */ + SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + + /** + * Creates a new SchemaRestrictionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance + */ + SchemaRestrictionResponse.create = function create(properties) { + return new SchemaRestrictionResponse(properties); + }; + + /** + * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) + $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) + message.activeMetricRestrictions = []; + message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRestrictionResponse message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRestrictionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { + if (!Array.isArray(message.activeMetricRestrictions)) + return "activeMetricRestrictions: array expected"; + for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); + if (error) + return "activeMetricRestrictions." + error; + } + } + return null; + }; + + /** + * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse + */ + SchemaRestrictionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); + if (object.activeMetricRestrictions) { + if (!Array.isArray(object.activeMetricRestrictions)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); + message.activeMetricRestrictions = []; + for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { + if (typeof object.activeMetricRestrictions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); + message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRestrictionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activeMetricRestrictions = []; + if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { + object.activeMetricRestrictions = []; + for (var j = 0; j < message.activeMetricRestrictions.length; ++j) + object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); + } + return object; + }; + + /** + * Converts this SchemaRestrictionResponse to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @instance + * @returns {Object.} JSON object + */ + SchemaRestrictionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRestrictionResponse + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; + }; + + SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + + /** + * Properties of an ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @interface IActiveMetricRestriction + * @property {string|null} [metricName] ActiveMetricRestriction metricName + * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes + */ + + /** + * Constructs a new ActiveMetricRestriction. + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse + * @classdesc Represents an ActiveMetricRestriction. + * @implements IActiveMetricRestriction + * @constructor + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + */ + function ActiveMetricRestriction(properties) { + this.restrictedMetricTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActiveMetricRestriction metricName. + * @member {string|null|undefined} metricName + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.metricName = null; + + /** + * ActiveMetricRestriction restrictedMetricTypes. + * @member {Array.} restrictedMetricTypes + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + */ + ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { + get: $util.oneOfGetter($oneOfFields = ["metricName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActiveMetricRestriction instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance + */ + ActiveMetricRestriction.create = function create(properties) { + return new ActiveMetricRestriction(properties); + }; + + /** + * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + writer.int32(message.restrictedMetricTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + case 2: { + if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) + message.restrictedMetricTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricTypes.push(reader.int32()); + } else + message.restrictedMetricTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveMetricRestriction message. + * @function verify + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveMetricRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + properties._metricName = 1; + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + } + if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { + if (!Array.isArray(message.restrictedMetricTypes)) + return "restrictedMetricTypes: array expected"; + for (var i = 0; i < message.restrictedMetricTypes.length; ++i) + switch (message.restrictedMetricTypes[i]) { + default: + return "restrictedMetricTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction + */ + ActiveMetricRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) + return object; + var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); + if (object.metricName != null) + message.metricName = String(object.metricName); + if (object.restrictedMetricTypes) { + if (!Array.isArray(object.restrictedMetricTypes)) + throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); + message.restrictedMetricTypes = []; + for (var i = 0; i < object.restrictedMetricTypes.length; ++i) + switch (object.restrictedMetricTypes[i]) { + default: + if (typeof object.restrictedMetricTypes[i] === "number") { + message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricTypes[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricTypes[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricTypes[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveMetricRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricTypes = []; + if (message.metricName != null && message.hasOwnProperty("metricName")) { + object.metricName = message.metricName; + if (options.oneofs) + object._metricName = "metricName"; + } + if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { + object.restrictedMetricTypes = []; + for (var j = 0; j < message.restrictedMetricTypes.length; ++j) + object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; + } + return object; + }; + + /** + * Converts this ActiveMetricRestriction to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @instance + * @returns {Object.} JSON object + */ + ActiveMetricRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Cohort - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Cohort - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Cohort.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Cohort"; - }; + /** + * Gets the default type url for ActiveMetricRestriction + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; + }; - return Cohort; + return ActiveMetricRestriction; + })(); + + return SchemaRestrictionResponse; + })(); + + return ResponseMetaData; })(); - v1alpha.CohortsRange = (function() { + v1alpha.DimensionHeader = (function() { /** - * Properties of a CohortsRange. + * Properties of a DimensionHeader. * @memberof google.analytics.data.v1alpha - * @interface ICohortsRange - * @property {google.analytics.data.v1alpha.CohortsRange.Granularity|null} [granularity] CohortsRange granularity - * @property {number|null} [startOffset] CohortsRange startOffset - * @property {number|null} [endOffset] CohortsRange endOffset + * @interface IDimensionHeader + * @property {string|null} [name] DimensionHeader name */ /** - * Constructs a new CohortsRange. + * Constructs a new DimensionHeader. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortsRange. - * @implements ICohortsRange + * @classdesc Represents a DimensionHeader. + * @implements IDimensionHeader * @constructor - * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set */ - function CohortsRange(properties) { + function DimensionHeader(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28721,105 +31889,77 @@ } /** - * CohortsRange granularity. - * @member {google.analytics.data.v1alpha.CohortsRange.Granularity} granularity - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - */ - CohortsRange.prototype.granularity = 0; - - /** - * CohortsRange startOffset. - * @member {number} startOffset - * @memberof google.analytics.data.v1alpha.CohortsRange - * @instance - */ - CohortsRange.prototype.startOffset = 0; - - /** - * CohortsRange endOffset. - * @member {number} endOffset - * @memberof google.analytics.data.v1alpha.CohortsRange + * DimensionHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.DimensionHeader * @instance */ - CohortsRange.prototype.endOffset = 0; + DimensionHeader.prototype.name = ""; /** - * Creates a new CohortsRange instance using the specified properties. + * Creates a new DimensionHeader instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static - * @param {google.analytics.data.v1alpha.ICohortsRange=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange instance + * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance */ - CohortsRange.create = function create(properties) { - return new CohortsRange(properties); + DimensionHeader.create = function create(properties) { + return new DimensionHeader(properties); }; /** - * Encodes the specified CohortsRange message. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static - * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortsRange.encode = function encode(message, writer) { + DimensionHeader.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.granularity); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.startOffset); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.endOffset); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CohortsRange message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortsRange.verify|verify} messages. + * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static - * @param {google.analytics.data.v1alpha.ICohortsRange} message CohortsRange message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortsRange.encodeDelimited = function encodeDelimited(message, writer) { + DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CohortsRange message from the specified reader or buffer. + * Decodes a DimensionHeader message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortsRange.decode = function decode(reader, length, error) { + DimensionHeader.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortsRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.granularity = reader.int32(); - break; - } - case 2: { - message.startOffset = reader.int32(); - break; - } - case 3: { - message.endOffset = reader.int32(); + message.name = reader.string(); break; } default: @@ -28831,186 +31971,123 @@ }; /** - * Decodes a CohortsRange message from the specified reader or buffer, length delimited. + * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortsRange.decodeDelimited = function decodeDelimited(reader) { + DimensionHeader.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CohortsRange message. + * Verifies a DimensionHeader message. * @function verify - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CohortsRange.verify = function verify(message) { + DimensionHeader.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.granularity != null && message.hasOwnProperty("granularity")) - switch (message.granularity) { - default: - return "granularity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset)) - return "startOffset: integer expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset)) - return "endOffset: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CohortsRange message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortsRange} CohortsRange + * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader */ - CohortsRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortsRange) + DimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) return object; - var message = new $root.google.analytics.data.v1alpha.CohortsRange(); - switch (object.granularity) { - default: - if (typeof object.granularity === "number") { - message.granularity = object.granularity; - break; - } - break; - case "GRANULARITY_UNSPECIFIED": - case 0: - message.granularity = 0; - break; - case "DAILY": - case 1: - message.granularity = 1; - break; - case "WEEKLY": - case 2: - message.granularity = 2; - break; - case "MONTHLY": - case 3: - message.granularity = 3; - break; - } - if (object.startOffset != null) - message.startOffset = object.startOffset | 0; - if (object.endOffset != null) - message.endOffset = object.endOffset | 0; + var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CohortsRange message. Also converts values to other types if specified. + * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static - * @param {google.analytics.data.v1alpha.CohortsRange} message CohortsRange + * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CohortsRange.toObject = function toObject(message, options) { + DimensionHeader.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.granularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0; - object.startOffset = 0; - object.endOffset = 0; - } - if (message.granularity != null && message.hasOwnProperty("granularity")) - object.granularity = options.enums === String ? $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] === undefined ? message.granularity : $root.google.analytics.data.v1alpha.CohortsRange.Granularity[message.granularity] : message.granularity; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = message.endOffset; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CohortsRange to JSON. + * Converts this DimensionHeader to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @instance * @returns {Object.} JSON object */ - CohortsRange.prototype.toJSON = function toJSON() { + DimensionHeader.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CohortsRange + * Gets the default type url for DimensionHeader * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortsRange + * @memberof google.analytics.data.v1alpha.DimensionHeader * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CohortsRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortsRange"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; }; - /** - * Granularity enum. - * @name google.analytics.data.v1alpha.CohortsRange.Granularity - * @enum {number} - * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value - * @property {number} DAILY=1 DAILY value - * @property {number} WEEKLY=2 WEEKLY value - * @property {number} MONTHLY=3 MONTHLY value - */ - CohortsRange.Granularity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DAILY"] = 1; - values[valuesById[2] = "WEEKLY"] = 2; - values[valuesById[3] = "MONTHLY"] = 3; - return values; - })(); - - return CohortsRange; + return DimensionHeader; })(); - v1alpha.CohortReportSettings = (function() { + v1alpha.MetricHeader = (function() { /** - * Properties of a CohortReportSettings. + * Properties of a MetricHeader. * @memberof google.analytics.data.v1alpha - * @interface ICohortReportSettings - * @property {boolean|null} [accumulate] CohortReportSettings accumulate + * @interface IMetricHeader + * @property {string|null} [name] MetricHeader name + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type */ /** - * Constructs a new CohortReportSettings. + * Constructs a new MetricHeader. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a CohortReportSettings. - * @implements ICohortReportSettings + * @classdesc Represents a MetricHeader. + * @implements IMetricHeader * @constructor - * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set */ - function CohortReportSettings(properties) { + function MetricHeader(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29018,77 +32095,91 @@ } /** - * CohortReportSettings accumulate. - * @member {boolean} accumulate - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * MetricHeader name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.MetricHeader * @instance */ - CohortReportSettings.prototype.accumulate = false; + MetricHeader.prototype.name = ""; /** - * Creates a new CohortReportSettings instance using the specified properties. + * MetricHeader type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricHeader + * @instance + */ + MetricHeader.prototype.type = 0; + + /** + * Creates a new MetricHeader instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings instance + * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance */ - CohortReportSettings.create = function create(properties) { - return new CohortReportSettings(properties); + MetricHeader.create = function create(properties) { + return new MetricHeader(properties); }; /** - * Encodes the specified CohortReportSettings message. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortReportSettings.encode = function encode(message, writer) { + MetricHeader.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.accumulate != null && Object.hasOwnProperty.call(message, "accumulate")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accumulate); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); return writer; }; /** - * Encodes the specified CohortReportSettings message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.CohortReportSettings.verify|verify} messages. + * Encodes the specified MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static - * @param {google.analytics.data.v1alpha.ICohortReportSettings} message CohortReportSettings message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CohortReportSettings.encodeDelimited = function encodeDelimited(message, writer) { + MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CohortReportSettings message from the specified reader or buffer. + * Decodes a MetricHeader message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortReportSettings.decode = function decode(reader, length, error) { + MetricHeader.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.accumulate = reader.bool(); + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); break; } default: @@ -29100,129 +32191,208 @@ }; /** - * Decodes a CohortReportSettings message from the specified reader or buffer, length delimited. + * Decodes a MetricHeader message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CohortReportSettings.decodeDelimited = function decodeDelimited(reader) { + MetricHeader.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CohortReportSettings message. + * Verifies a MetricHeader message. * @function verify - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CohortReportSettings.verify = function verify(message) { + MetricHeader.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - if (typeof message.accumulate !== "boolean") - return "accumulate: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } return null; }; /** - * Creates a CohortReportSettings message from a plain object. Also converts values to their respective internal types. + * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.CohortReportSettings} CohortReportSettings + * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader */ - CohortReportSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.CohortReportSettings) + MetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) return object; - var message = new $root.google.analytics.data.v1alpha.CohortReportSettings(); - if (object.accumulate != null) - message.accumulate = Boolean(object.accumulate); + var message = new $root.google.analytics.data.v1alpha.MetricHeader(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; + } return message; }; /** - * Creates a plain object from a CohortReportSettings message. Also converts values to other types if specified. + * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static - * @param {google.analytics.data.v1alpha.CohortReportSettings} message CohortReportSettings + * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CohortReportSettings.toObject = function toObject(message, options) { + MetricHeader.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.accumulate = false; - if (message.accumulate != null && message.hasOwnProperty("accumulate")) - object.accumulate = message.accumulate; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; return object; }; /** - * Converts this CohortReportSettings to JSON. + * Converts this MetricHeader to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @instance * @returns {Object.} JSON object */ - CohortReportSettings.prototype.toJSON = function toJSON() { + MetricHeader.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CohortReportSettings + * Gets the default type url for MetricHeader * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.CohortReportSettings + * @memberof google.analytics.data.v1alpha.MetricHeader * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CohortReportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.CohortReportSettings"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; }; - return CohortReportSettings; + return MetricHeader; })(); - v1alpha.ResponseMetaData = (function() { + v1alpha.Row = (function() { /** - * Properties of a ResponseMetaData. + * Properties of a Row. * @memberof google.analytics.data.v1alpha - * @interface IResponseMetaData - * @property {boolean|null} [dataLossFromOtherRow] ResponseMetaData dataLossFromOtherRow - * @property {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null} [schemaRestrictionResponse] ResponseMetaData schemaRestrictionResponse - * @property {string|null} [currencyCode] ResponseMetaData currencyCode - * @property {string|null} [timeZone] ResponseMetaData timeZone - * @property {string|null} [emptyReason] ResponseMetaData emptyReason - * @property {boolean|null} [subjectToThresholding] ResponseMetaData subjectToThresholding - * @property {Array.|null} [samplingMetadatas] ResponseMetaData samplingMetadatas + * @interface IRow + * @property {Array.|null} [dimensionValues] Row dimensionValues + * @property {Array.|null} [metricValues] Row metricValues */ /** - * Constructs a new ResponseMetaData. + * Constructs a new Row. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a ResponseMetaData. - * @implements IResponseMetaData + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set */ - function ResponseMetaData(properties) { - this.samplingMetadatas = []; + function Row(properties) { + this.dimensionValues = []; + this.metricValues = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29230,197 +32400,97 @@ } /** - * ResponseMetaData dataLossFromOtherRow. - * @member {boolean} dataLossFromOtherRow - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.dataLossFromOtherRow = false; - - /** - * ResponseMetaData schemaRestrictionResponse. - * @member {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse|null|undefined} schemaRestrictionResponse - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.schemaRestrictionResponse = null; - - /** - * ResponseMetaData currencyCode. - * @member {string|null|undefined} currencyCode - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.currencyCode = null; - - /** - * ResponseMetaData timeZone. - * @member {string|null|undefined} timeZone - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.timeZone = null; - - /** - * ResponseMetaData emptyReason. - * @member {string|null|undefined} emptyReason - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @instance - */ - ResponseMetaData.prototype.emptyReason = null; - - /** - * ResponseMetaData subjectToThresholding. - * @member {boolean|null|undefined} subjectToThresholding - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * Row dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.data.v1alpha.Row * @instance */ - ResponseMetaData.prototype.subjectToThresholding = null; + Row.prototype.dimensionValues = $util.emptyArray; /** - * ResponseMetaData samplingMetadatas. - * @member {Array.} samplingMetadatas - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * Row metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.data.v1alpha.Row * @instance */ - ResponseMetaData.prototype.samplingMetadatas = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_schemaRestrictionResponse", { - get: $util.oneOfGetter($oneOfFields = ["schemaRestrictionResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_currencyCode", { - get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_timeZone", { - get: $util.oneOfGetter($oneOfFields = ["timeZone"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_emptyReason", { - get: $util.oneOfGetter($oneOfFields = ["emptyReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ResponseMetaData.prototype, "_subjectToThresholding", { - get: $util.oneOfGetter($oneOfFields = ["subjectToThresholding"]), - set: $util.oneOfSetter($oneOfFields) - }); + Row.prototype.metricValues = $util.emptyArray; /** - * Creates a new ResponseMetaData instance using the specified properties. + * Creates a new Row instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData instance + * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Row} Row instance */ - ResponseMetaData.create = function create(properties) { - return new ResponseMetaData(properties); + Row.create = function create(properties) { + return new Row(properties); }; /** - * Encodes the specified ResponseMetaData message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMetaData.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataLossFromOtherRow != null && Object.hasOwnProperty.call(message, "dataLossFromOtherRow")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dataLossFromOtherRow); - if (message.schemaRestrictionResponse != null && Object.hasOwnProperty.call(message, "schemaRestrictionResponse")) - $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.encode(message.schemaRestrictionResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.timeZone); - if (message.emptyReason != null && Object.hasOwnProperty.call(message, "emptyReason")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.emptyReason); - if (message.subjectToThresholding != null && Object.hasOwnProperty.call(message, "subjectToThresholding")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.subjectToThresholding); - if (message.samplingMetadatas != null && message.samplingMetadatas.length) - for (var i = 0; i < message.samplingMetadatas.length; ++i) - $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResponseMetaData message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static - * @param {google.analytics.data.v1alpha.IResponseMetaData} message ResponseMetaData message or plain object to encode + * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMetaData.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMetaData message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @returns {google.analytics.data.v1alpha.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMetaData.decode = function decode(reader, length, error) { + Row.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.dataLossFromOtherRow = reader.bool(); - break; - } - case 4: { - message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.decode(reader, reader.uint32()); - break; - } - case 5: { - message.currencyCode = reader.string(); - break; - } - case 6: { - message.timeZone = reader.string(); - break; - } - case 7: { - message.emptyReason = reader.string(); - break; - } - case 8: { - message.subjectToThresholding = reader.bool(); + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); break; } - case 9: { - if (!(message.samplingMetadatas && message.samplingMetadatas.length)) - message.samplingMetadatas = []; - message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); break; } default: @@ -29432,731 +32502,616 @@ }; /** - * Decodes a ResponseMetaData message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @returns {google.analytics.data.v1alpha.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMetaData.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMetaData message. + * Verifies a Row message. * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMetaData.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - if (typeof message.dataLossFromOtherRow !== "boolean") - return "dataLossFromOtherRow: boolean expected"; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - properties._schemaRestrictionResponse = 1; - { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify(message.schemaRestrictionResponse); + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); if (error) - return "schemaRestrictionResponse." + error; + return "dimensionValues." + error; } } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - properties._currencyCode = 1; - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - properties._timeZone = 1; - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - properties._emptyReason = 1; - if (!$util.isString(message.emptyReason)) - return "emptyReason: string expected"; - } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - properties._subjectToThresholding = 1; - if (typeof message.subjectToThresholding !== "boolean") - return "subjectToThresholding: boolean expected"; - } - if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { - if (!Array.isArray(message.samplingMetadatas)) - return "samplingMetadatas: array expected"; - for (var i = 0; i < message.samplingMetadatas.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); if (error) - return "samplingMetadatas." + error; + return "metricValues." + error; } } return null; }; /** - * Creates a ResponseMetaData message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData} ResponseMetaData + * @returns {google.analytics.data.v1alpha.Row} Row */ - ResponseMetaData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Row) return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData(); - if (object.dataLossFromOtherRow != null) - message.dataLossFromOtherRow = Boolean(object.dataLossFromOtherRow); - if (object.schemaRestrictionResponse != null) { - if (typeof object.schemaRestrictionResponse !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.schemaRestrictionResponse: object expected"); - message.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.fromObject(object.schemaRestrictionResponse); + var message = new $root.google.analytics.data.v1alpha.Row(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); + } } - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.emptyReason != null) - message.emptyReason = String(object.emptyReason); - if (object.subjectToThresholding != null) - message.subjectToThresholding = Boolean(object.subjectToThresholding); - if (object.samplingMetadatas) { - if (!Array.isArray(object.samplingMetadatas)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: array expected"); - message.samplingMetadatas = []; - for (var i = 0; i < object.samplingMetadatas.length; ++i) { - if (typeof object.samplingMetadatas[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.samplingMetadatas: object expected"); - message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); } } return message; }; /** - * Creates a plain object from a ResponseMetaData message. Also converts values to other types if specified. + * Creates a plain object from a Row message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData} message ResponseMetaData + * @param {google.analytics.data.v1alpha.Row} message Row * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMetaData.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.samplingMetadatas = []; - if (options.defaults) - object.dataLossFromOtherRow = false; - if (message.dataLossFromOtherRow != null && message.hasOwnProperty("dataLossFromOtherRow")) - object.dataLossFromOtherRow = message.dataLossFromOtherRow; - if (message.schemaRestrictionResponse != null && message.hasOwnProperty("schemaRestrictionResponse")) { - object.schemaRestrictionResponse = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.toObject(message.schemaRestrictionResponse, options); - if (options.oneofs) - object._schemaRestrictionResponse = "schemaRestrictionResponse"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - object.currencyCode = message.currencyCode; - if (options.oneofs) - object._currencyCode = "currencyCode"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = message.timeZone; - if (options.oneofs) - object._timeZone = "timeZone"; - } - if (message.emptyReason != null && message.hasOwnProperty("emptyReason")) { - object.emptyReason = message.emptyReason; - if (options.oneofs) - object._emptyReason = "emptyReason"; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; } - if (message.subjectToThresholding != null && message.hasOwnProperty("subjectToThresholding")) { - object.subjectToThresholding = message.subjectToThresholding; - if (options.oneofs) - object._subjectToThresholding = "subjectToThresholding"; + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); } - if (message.samplingMetadatas && message.samplingMetadatas.length) { - object.samplingMetadatas = []; - for (var j = 0; j < message.samplingMetadatas.length; ++j) - object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); } return object; }; /** - * Converts this ResponseMetaData to JSON. + * Converts this Row to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @instance * @returns {Object.} JSON object */ - ResponseMetaData.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResponseMetaData + * Gets the default type url for Row * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData + * @memberof google.analytics.data.v1alpha.Row * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResponseMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; }; - ResponseMetaData.SchemaRestrictionResponse = (function() { + return Row; + })(); - /** - * Properties of a SchemaRestrictionResponse. - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @interface ISchemaRestrictionResponse - * @property {Array.|null} [activeMetricRestrictions] SchemaRestrictionResponse activeMetricRestrictions - */ + v1alpha.DimensionValue = (function() { - /** - * Constructs a new SchemaRestrictionResponse. - * @memberof google.analytics.data.v1alpha.ResponseMetaData - * @classdesc Represents a SchemaRestrictionResponse. - * @implements ISchemaRestrictionResponse - * @constructor - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - */ - function SchemaRestrictionResponse(properties) { - this.activeMetricRestrictions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DimensionValue. + * @memberof google.analytics.data.v1alpha + * @interface IDimensionValue + * @property {string|null} [value] DimensionValue value + */ - /** - * SchemaRestrictionResponse activeMetricRestrictions. - * @member {Array.} activeMetricRestrictions - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @instance - */ - SchemaRestrictionResponse.prototype.activeMetricRestrictions = $util.emptyArray; + /** + * Constructs a new DimensionValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a DimensionValue. + * @implements IDimensionValue + * @constructor + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + */ + function DimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new SchemaRestrictionResponse instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse instance - */ - SchemaRestrictionResponse.create = function create(properties) { - return new SchemaRestrictionResponse(properties); - }; + /** + * DimensionValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + DimensionValue.prototype.value = null; - /** - * Encodes the specified SchemaRestrictionResponse message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activeMetricRestrictions != null && message.activeMetricRestrictions.length) - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) - $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.encode(message.activeMetricRestrictions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified SchemaRestrictionResponse message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.ISchemaRestrictionResponse} message SchemaRestrictionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRestrictionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DimensionValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + */ + Object.defineProperty(DimensionValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.activeMetricRestrictions && message.activeMetricRestrictions.length)) - message.activeMetricRestrictions = []; - message.activeMetricRestrictions.push($root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new DimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance + */ + DimensionValue.create = function create(properties) { + return new DimensionValue(properties); + }; - /** - * Decodes a SchemaRestrictionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaRestrictionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; - /** - * Verifies a SchemaRestrictionResponse message. - * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaRestrictionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.activeMetricRestrictions != null && message.hasOwnProperty("activeMetricRestrictions")) { - if (!Array.isArray(message.activeMetricRestrictions)) - return "activeMetricRestrictions: array expected"; - for (var i = 0; i < message.activeMetricRestrictions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify(message.activeMetricRestrictions[i]); - if (error) - return "activeMetricRestrictions." + error; - } - } - return null; - }; + /** + * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a SchemaRestrictionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} SchemaRestrictionResponse - */ - SchemaRestrictionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse) - return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse(); - if (object.activeMetricRestrictions) { - if (!Array.isArray(object.activeMetricRestrictions)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: array expected"); - message.activeMetricRestrictions = []; - for (var i = 0; i < object.activeMetricRestrictions.length; ++i) { - if (typeof object.activeMetricRestrictions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.activeMetricRestrictions: object expected"); - message.activeMetricRestrictions[i] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.fromObject(object.activeMetricRestrictions[i]); + /** + * Decodes a DimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a SchemaRestrictionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse} message SchemaRestrictionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaRestrictionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.activeMetricRestrictions = []; - if (message.activeMetricRestrictions && message.activeMetricRestrictions.length) { - object.activeMetricRestrictions = []; - for (var j = 0; j < message.activeMetricRestrictions.length; ++j) - object.activeMetricRestrictions[j] = $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.toObject(message.activeMetricRestrictions[j], options); - } - return object; - }; + /** + * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this SchemaRestrictionResponse to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @instance - * @returns {Object.} JSON object - */ - SchemaRestrictionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a DimensionValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; - /** - * Gets the default type url for SchemaRestrictionResponse - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaRestrictionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse"; - }; + /** + * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + */ + DimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) + return object; + var message = new $root.google.analytics.data.v1alpha.DimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; - SchemaRestrictionResponse.ActiveMetricRestriction = (function() { + /** + * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; - /** - * Properties of an ActiveMetricRestriction. - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @interface IActiveMetricRestriction - * @property {string|null} [metricName] ActiveMetricRestriction metricName - * @property {Array.|null} [restrictedMetricTypes] ActiveMetricRestriction restrictedMetricTypes - */ + /** + * Converts this DimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.DimensionValue + * @instance + * @returns {Object.} JSON object + */ + DimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ActiveMetricRestriction. - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse - * @classdesc Represents an ActiveMetricRestriction. - * @implements IActiveMetricRestriction - * @constructor - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - */ - function ActiveMetricRestriction(properties) { - this.restrictedMetricTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Gets the default type url for DimensionValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.DimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; + }; - /** - * ActiveMetricRestriction metricName. - * @member {string|null|undefined} metricName - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.metricName = null; + return DimensionValue; + })(); - /** - * ActiveMetricRestriction restrictedMetricTypes. - * @member {Array.} restrictedMetricTypes - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - */ - ActiveMetricRestriction.prototype.restrictedMetricTypes = $util.emptyArray; + v1alpha.MetricValue = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a MetricValue. + * @memberof google.analytics.data.v1alpha + * @interface IMetricValue + * @property {string|null} [value] MetricValue value + */ - // Virtual OneOf for proto3 optional field - Object.defineProperty(ActiveMetricRestriction.prototype, "_metricName", { - get: $util.oneOfGetter($oneOfFields = ["metricName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new MetricValue. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a MetricValue. + * @implements IMetricValue + * @constructor + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + */ + function MetricValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ActiveMetricRestriction instance using the specified properties. - * @function create - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction instance - */ - ActiveMetricRestriction.create = function create(properties) { - return new ActiveMetricRestriction(properties); - }; + /** + * MetricValue value. + * @member {string|null|undefined} value + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + MetricValue.prototype.value = null; - /** - * Encodes the specified ActiveMetricRestriction message. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); - if (message.restrictedMetricTypes != null && message.restrictedMetricTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - writer.int32(message.restrictedMetricTypes[i]); - writer.ldelim(); - } - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified ActiveMetricRestriction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.IActiveMetricRestriction} message ActiveMetricRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveMetricRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MetricValue oneValue. + * @member {"value"|undefined} oneValue + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + */ + Object.defineProperty(MetricValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metricName = reader.string(); - break; - } - case 2: { - if (!(message.restrictedMetricTypes && message.restrictedMetricTypes.length)) - message.restrictedMetricTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedMetricTypes.push(reader.int32()); - } else - message.restrictedMetricTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new MetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance + */ + MetricValue.create = function create(properties) { + return new MetricValue(properties); + }; - /** - * Decodes an ActiveMetricRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveMetricRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + return writer; + }; - /** - * Verifies an ActiveMetricRestriction message. - * @function verify - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveMetricRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - properties._metricName = 1; - if (!$util.isString(message.metricName)) - return "metricName: string expected"; - } - if (message.restrictedMetricTypes != null && message.hasOwnProperty("restrictedMetricTypes")) { - if (!Array.isArray(message.restrictedMetricTypes)) - return "restrictedMetricTypes: array expected"; - for (var i = 0; i < message.restrictedMetricTypes.length; ++i) - switch (message.restrictedMetricTypes[i]) { - default: - return "restrictedMetricTypes: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; + /** + * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an ActiveMetricRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} ActiveMetricRestriction - */ - ActiveMetricRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction) - return object; - var message = new $root.google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction(); - if (object.metricName != null) - message.metricName = String(object.metricName); - if (object.restrictedMetricTypes) { - if (!Array.isArray(object.restrictedMetricTypes)) - throw TypeError(".google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction.restrictedMetricTypes: array expected"); - message.restrictedMetricTypes = []; - for (var i = 0; i < object.restrictedMetricTypes.length; ++i) - switch (object.restrictedMetricTypes[i]) { - default: - if (typeof object.restrictedMetricTypes[i] === "number") { - message.restrictedMetricTypes[i] = object.restrictedMetricTypes[i]; - break; - } - case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": - case 0: - message.restrictedMetricTypes[i] = 0; - break; - case "COST_DATA": - case 1: - message.restrictedMetricTypes[i] = 1; - break; - case "REVENUE_DATA": - case 2: - message.restrictedMetricTypes[i] = 2; - break; - } + /** + * Decodes a MetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.value = reader.string(); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from an ActiveMetricRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction} message ActiveMetricRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveMetricRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.restrictedMetricTypes = []; - if (message.metricName != null && message.hasOwnProperty("metricName")) { - object.metricName = message.metricName; - if (options.oneofs) - object._metricName = "metricName"; - } - if (message.restrictedMetricTypes && message.restrictedMetricTypes.length) { - object.restrictedMetricTypes = []; - for (var j = 0; j < message.restrictedMetricTypes.length; ++j) - object.restrictedMetricTypes[j] = options.enums === String ? $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] === undefined ? message.restrictedMetricTypes[j] : $root.google.analytics.data.v1alpha.RestrictedMetricType[message.restrictedMetricTypes[j]] : message.restrictedMetricTypes[j]; - } - return object; - }; + /** + * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ActiveMetricRestriction to JSON. - * @function toJSON - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @instance - * @returns {Object.} JSON object - */ - ActiveMetricRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a MetricValue message. + * @function verify + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.oneValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; - /** - * Gets the default type url for ActiveMetricRestriction - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActiveMetricRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction"; - }; + /** + * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + */ + MetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) + return object; + var message = new $root.google.analytics.data.v1alpha.MetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; - return ActiveMetricRestriction; - })(); + /** + * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.oneValue = "value"; + } + return object; + }; - return SchemaRestrictionResponse; - })(); + /** + * Converts this MetricValue to JSON. + * @function toJSON + * @memberof google.analytics.data.v1alpha.MetricValue + * @instance + * @returns {Object.} JSON object + */ + MetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ResponseMetaData; + /** + * Gets the default type url for MetricValue + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.MetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; + }; + + return MetricValue; })(); - v1alpha.DimensionHeader = (function() { + v1alpha.PropertyQuota = (function() { /** - * Properties of a DimensionHeader. + * Properties of a PropertyQuota. * @memberof google.analytics.data.v1alpha - * @interface IDimensionHeader - * @property {string|null} [name] DimensionHeader name + * @interface IPropertyQuota + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour + * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour */ /** - * Constructs a new DimensionHeader. + * Constructs a new PropertyQuota. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionHeader. - * @implements IDimensionHeader + * @classdesc Represents a PropertyQuota. + * @implements IPropertyQuota * @constructor - * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set */ - function DimensionHeader(properties) { + function PropertyQuota(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30164,77 +33119,147 @@ } /** - * DimensionHeader name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.DimensionHeader + * PropertyQuota tokensPerDay. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.data.v1alpha.PropertyQuota * @instance */ - DimensionHeader.prototype.name = ""; + PropertyQuota.prototype.tokensPerDay = null; /** - * Creates a new DimensionHeader instance using the specified properties. + * PropertyQuota tokensPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerHour = null; + + /** + * PropertyQuota concurrentRequests. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.concurrentRequests = null; + + /** + * PropertyQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * PropertyQuota potentiallyThresholdedRequestsPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + + /** + * PropertyQuota tokensPerProjectPerHour. + * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.data.v1alpha.PropertyQuota + * @instance + */ + PropertyQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new PropertyQuota instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader instance + * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance */ - DimensionHeader.create = function create(properties) { - return new DimensionHeader(properties); + PropertyQuota.create = function create(properties) { + return new PropertyQuota(properties); }; /** - * Encodes the specified DimensionHeader message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionHeader.encode = function encode(message, writer) { + PropertyQuota.encode = function encode(message, writer) { 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.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified DimensionHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionHeader.verify|verify} messages. + * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static - * @param {google.analytics.data.v1alpha.IDimensionHeader} message DimensionHeader message or plain object to encode + * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DimensionHeader message from the specified reader or buffer. + * Decodes a PropertyQuota message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionHeader.decode = function decode(reader, length, error) { + PropertyQuota.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionHeader(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); break; } default: @@ -30246,123 +33271,194 @@ }; /** - * Decodes a DimensionHeader message from the specified reader or buffer, length delimited. + * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionHeader.decodeDelimited = function decodeDelimited(reader) { + PropertyQuota.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DimensionHeader message. + * Verifies a PropertyQuota message. * @function verify - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DimensionHeader.verify = function verify(message) { + PropertyQuota.verify = function verify(message) { if (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.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); + if (error) + return "potentiallyThresholdedRequestsPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } return null; }; /** - * Creates a DimensionHeader message from a plain object. Also converts values to their respective internal types. + * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionHeader} DimensionHeader + * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota */ - DimensionHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionHeader) + PropertyQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) return object; - var message = new $root.google.analytics.data.v1alpha.DimensionHeader(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.potentiallyThresholdedRequestsPerHour != null) { + if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); + message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + } return message; }; /** - * Creates a plain object from a DimensionHeader message. Also converts values to other types if specified. + * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static - * @param {google.analytics.data.v1alpha.DimensionHeader} message DimensionHeader + * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DimensionHeader.toObject = function toObject(message, options) { + PropertyQuota.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.potentiallyThresholdedRequestsPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) + object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); return object; }; /** - * Converts this DimensionHeader to JSON. + * Converts this PropertyQuota to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @instance * @returns {Object.} JSON object */ - DimensionHeader.prototype.toJSON = function toJSON() { + PropertyQuota.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DimensionHeader + * Gets the default type url for PropertyQuota * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionHeader + * @memberof google.analytics.data.v1alpha.PropertyQuota * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionHeader"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; }; - return DimensionHeader; + return PropertyQuota; })(); - v1alpha.MetricHeader = (function() { + v1alpha.QuotaStatus = (function() { /** - * Properties of a MetricHeader. + * Properties of a QuotaStatus. * @memberof google.analytics.data.v1alpha - * @interface IMetricHeader - * @property {string|null} [name] MetricHeader name - * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricHeader type + * @interface IQuotaStatus + * @property {number|null} [consumed] QuotaStatus consumed + * @property {number|null} [remaining] QuotaStatus remaining */ /** - * Constructs a new MetricHeader. + * Constructs a new QuotaStatus. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a MetricHeader. - * @implements IMetricHeader + * @classdesc Represents a QuotaStatus. + * @implements IQuotaStatus * @constructor - * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set */ - function MetricHeader(properties) { + function QuotaStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30370,91 +33466,91 @@ } /** - * MetricHeader name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.MetricHeader + * QuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.data.v1alpha.QuotaStatus * @instance */ - MetricHeader.prototype.name = ""; + QuotaStatus.prototype.consumed = 0; /** - * MetricHeader type. - * @member {google.analytics.data.v1alpha.MetricType} type - * @memberof google.analytics.data.v1alpha.MetricHeader + * QuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.data.v1alpha.QuotaStatus * @instance */ - MetricHeader.prototype.type = 0; + QuotaStatus.prototype.remaining = 0; /** - * Creates a new MetricHeader instance using the specified properties. + * Creates a new QuotaStatus instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static - * @param {google.analytics.data.v1alpha.IMetricHeader=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader instance + * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance */ - MetricHeader.create = function create(properties) { - return new MetricHeader(properties); + QuotaStatus.create = function create(properties) { + return new QuotaStatus(properties); }; /** - * Encodes the specified MetricHeader message. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static - * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricHeader.encode = function encode(message, writer) { + QuotaStatus.encode = function encode(message, writer) { 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.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 MetricHeader message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricHeader.verify|verify} messages. + * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static - * @param {google.analytics.data.v1alpha.IMetricHeader} message MetricHeader message or plain object to encode + * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricHeader message from the specified reader or buffer. + * Decodes a QuotaStatus message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricHeader.decode = function decode(reader, length, error) { + QuotaStatus.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricHeader(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.consumed = reader.int32(); break; } case 2: { - message.type = reader.int32(); + message.remaining = reader.int32(); break; } default: @@ -30466,208 +33562,132 @@ }; /** - * Decodes a MetricHeader message from the specified reader or buffer, length delimited. + * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricHeader.decodeDelimited = function decodeDelimited(reader) { + QuotaStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricHeader message. + * Verifies a QuotaStatus message. * @function verify - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricHeader.verify = function verify(message) { + QuotaStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; return null; }; /** - * Creates a MetricHeader message from a plain object. Also converts values to their respective internal types. + * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.MetricHeader} MetricHeader + * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus */ - MetricHeader.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.MetricHeader) + QuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) return object; - var message = new $root.google.analytics.data.v1alpha.MetricHeader(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_INTEGER": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_SECONDS": - case 4: - message.type = 4; - break; - case "TYPE_MILLISECONDS": - case 5: - message.type = 5; - break; - case "TYPE_MINUTES": - case 6: - message.type = 6; - break; - case "TYPE_HOURS": - case 7: - message.type = 7; - break; - case "TYPE_STANDARD": - case 8: - message.type = 8; - break; - case "TYPE_CURRENCY": - case 9: - message.type = 9; - break; - case "TYPE_FEET": - case 10: - message.type = 10; - break; - case "TYPE_MILES": - case 11: - message.type = 11; - break; - case "TYPE_METERS": - case 12: - message.type = 12; - break; - case "TYPE_KILOMETERS": - case 13: - message.type = 13; - break; - } + var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; return message; }; /** - * Creates a plain object from a MetricHeader message. Also converts values to other types if specified. + * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static - * @param {google.analytics.data.v1alpha.MetricHeader} message MetricHeader + * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricHeader.toObject = function toObject(message, options) { + QuotaStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + object.consumed = 0; + object.remaining = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + 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 MetricHeader to JSON. + * Converts this QuotaStatus to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @instance * @returns {Object.} JSON object */ - MetricHeader.prototype.toJSON = function toJSON() { + QuotaStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetricHeader + * Gets the default type url for QuotaStatus * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.MetricHeader + * @memberof google.analytics.data.v1alpha.QuotaStatus * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricHeader"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; }; - return MetricHeader; + return QuotaStatus; })(); - v1alpha.Row = (function() { + v1alpha.FunnelBreakdown = (function() { /** - * Properties of a Row. + * Properties of a FunnelBreakdown. * @memberof google.analytics.data.v1alpha - * @interface IRow - * @property {Array.|null} [dimensionValues] Row dimensionValues - * @property {Array.|null} [metricValues] Row metricValues + * @interface IFunnelBreakdown + * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension + * @property {number|Long|null} [limit] FunnelBreakdown limit */ /** - * Constructs a new Row. + * Constructs a new FunnelBreakdown. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Row. - * @implements IRow + * @classdesc Represents a FunnelBreakdown. + * @implements IFunnelBreakdown * @constructor - * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set */ - function Row(properties) { - this.dimensionValues = []; - this.metricValues = []; + function FunnelBreakdown(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30675,97 +33695,100 @@ } /** - * Row dimensionValues. - * @member {Array.} dimensionValues - * @memberof google.analytics.data.v1alpha.Row + * FunnelBreakdown breakdownDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @instance */ - Row.prototype.dimensionValues = $util.emptyArray; + FunnelBreakdown.prototype.breakdownDimension = null; /** - * Row metricValues. - * @member {Array.} metricValues - * @memberof google.analytics.data.v1alpha.Row + * FunnelBreakdown limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @instance */ - Row.prototype.metricValues = $util.emptyArray; + FunnelBreakdown.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelBreakdown.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Row instance using the specified properties. + * Creates a new FunnelBreakdown instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static - * @param {google.analytics.data.v1alpha.IRow=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Row} Row instance + * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance */ - Row.create = function create(properties) { - return new Row(properties); + FunnelBreakdown.create = function create(properties) { + return new FunnelBreakdown(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static - * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + FunnelBreakdown.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dimensionValues != null && message.dimensionValues.length) - for (var i = 0; i < message.dimensionValues.length; ++i) - $root.google.analytics.data.v1alpha.DimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricValues != null && message.metricValues.length) - for (var i = 0; i < message.metricValues.length; ++i) - $root.google.analytics.data.v1alpha.MetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Row.verify|verify} messages. + * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static - * @param {google.analytics.data.v1alpha.IRow} message Row message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a FunnelBreakdown message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Row} Row + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decode = function decode(reader, length, error) { + FunnelBreakdown.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dimensionValues && message.dimensionValues.length)) - message.dimensionValues = []; - message.dimensionValues.push($root.google.analytics.data.v1alpha.DimensionValue.decode(reader, reader.uint32())); + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.metricValues && message.metricValues.length)) - message.metricValues = []; - message.metricValues.push($root.google.analytics.data.v1alpha.MetricValue.decode(reader, reader.uint32())); + message.limit = reader.int64(); break; } default: @@ -30777,165 +33800,151 @@ }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Row} Row + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decodeDelimited = function decodeDelimited(reader) { + FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a FunnelBreakdown message. * @function verify - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Row.verify = function verify(message) { + FunnelBreakdown.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { - if (!Array.isArray(message.dimensionValues)) - return "dimensionValues: array expected"; - for (var i = 0; i < message.dimensionValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionValue.verify(message.dimensionValues[i]); - if (error) - return "dimensionValues." + error; - } + var properties = {}; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); + if (error) + return "breakdownDimension." + error; } - if (message.metricValues != null && message.hasOwnProperty("metricValues")) { - if (!Array.isArray(message.metricValues)) - return "metricValues: array expected"; - for (var i = 0; i < message.metricValues.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricValue.verify(message.metricValues[i]); - if (error) - return "metricValues." + error; - } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; } return null; }; /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Row} Row + * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Row) + FunnelBreakdown.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) return object; - var message = new $root.google.analytics.data.v1alpha.Row(); - if (object.dimensionValues) { - if (!Array.isArray(object.dimensionValues)) - throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: array expected"); - message.dimensionValues = []; - for (var i = 0; i < object.dimensionValues.length; ++i) { - if (typeof object.dimensionValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Row.dimensionValues: object expected"); - message.dimensionValues[i] = $root.google.analytics.data.v1alpha.DimensionValue.fromObject(object.dimensionValues[i]); - } - } - if (object.metricValues) { - if (!Array.isArray(object.metricValues)) - throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: array expected"); - message.metricValues = []; - for (var i = 0; i < object.metricValues.length; ++i) { - if (typeof object.metricValues[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Row.metricValues: object expected"); - message.metricValues[i] = $root.google.analytics.data.v1alpha.MetricValue.fromObject(object.metricValues[i]); - } + var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + if (object.breakdownDimension != null) { + if (typeof object.breakdownDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); + message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. + * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static - * @param {google.analytics.data.v1alpha.Row} message Row + * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + FunnelBreakdown.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dimensionValues = []; - object.metricValues = []; - } - if (message.dimensionValues && message.dimensionValues.length) { - object.dimensionValues = []; - for (var j = 0; j < message.dimensionValues.length; ++j) - object.dimensionValues[j] = $root.google.analytics.data.v1alpha.DimensionValue.toObject(message.dimensionValues[j], options); - } - if (message.metricValues && message.metricValues.length) { - object.metricValues = []; - for (var j = 0; j < message.metricValues.length; ++j) - object.metricValues[j] = $root.google.analytics.data.v1alpha.MetricValue.toObject(message.metricValues[j], options); + if (options.defaults) + object.breakdownDimension = null; + if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) + object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (options.oneofs) + object._limit = "limit"; } return object; }; /** - * Converts this Row to JSON. + * Converts this FunnelBreakdown to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @instance * @returns {Object.} JSON object */ - Row.prototype.toJSON = function toJSON() { + FunnelBreakdown.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Row + * Gets the default type url for FunnelBreakdown * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Row + * @memberof google.analytics.data.v1alpha.FunnelBreakdown * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Row"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; }; - return Row; + return FunnelBreakdown; })(); - v1alpha.DimensionValue = (function() { + v1alpha.FunnelNextAction = (function() { /** - * Properties of a DimensionValue. + * Properties of a FunnelNextAction. * @memberof google.analytics.data.v1alpha - * @interface IDimensionValue - * @property {string|null} [value] DimensionValue value + * @interface IFunnelNextAction + * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension + * @property {number|Long|null} [limit] FunnelNextAction limit */ /** - * Constructs a new DimensionValue. + * Constructs a new FunnelNextAction. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a DimensionValue. - * @implements IDimensionValue + * @classdesc Represents a FunnelNextAction. + * @implements IFunnelNextAction * @constructor - * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set */ - function DimensionValue(properties) { + function FunnelNextAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30943,91 +33952,100 @@ } /** - * DimensionValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.DimensionValue + * FunnelNextAction nextActionDimension. + * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @instance */ - DimensionValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + FunnelNextAction.prototype.nextActionDimension = null; /** - * DimensionValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.DimensionValue + * FunnelNextAction limit. + * @member {number|Long|null|undefined} limit + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @instance */ - Object.defineProperty(DimensionValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), + FunnelNextAction.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelNextAction.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DimensionValue instance using the specified properties. + * Creates a new FunnelNextAction instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static - * @param {google.analytics.data.v1alpha.IDimensionValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue instance + * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance */ - DimensionValue.create = function create(properties) { - return new DimensionValue(properties); + FunnelNextAction.create = function create(properties) { + return new FunnelNextAction(properties); }; /** - * Encodes the specified DimensionValue message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static - * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionValue.encode = function encode(message, writer) { + FunnelNextAction.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); + if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) + $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); return writer; }; /** - * Encodes the specified DimensionValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionValue.verify|verify} messages. + * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static - * @param {google.analytics.data.v1alpha.IDimensionValue} message DimensionValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DimensionValue message from the specified reader or buffer. + * Decodes a FunnelNextAction message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionValue.decode = function decode(reader, length, error) { + FunnelNextAction.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.value = reader.string(); + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int64(); break; } default: @@ -31039,126 +34057,152 @@ }; /** - * Decodes a DimensionValue message from the specified reader or buffer, length delimited. + * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DimensionValue.decodeDelimited = function decodeDelimited(reader) { + FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DimensionValue message. + * Verifies a FunnelNextAction message. * @function verify - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DimensionValue.verify = function verify(message) { + FunnelNextAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { + var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); + if (error) + return "nextActionDimension." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; } return null; }; /** - * Creates a DimensionValue message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.DimensionValue} DimensionValue + * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction */ - DimensionValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.DimensionValue) + FunnelNextAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) return object; - var message = new $root.google.analytics.data.v1alpha.DimensionValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + if (object.nextActionDimension != null) { + if (typeof object.nextActionDimension !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); + message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); + } + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DimensionValue message. Also converts values to other types if specified. + * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static - * @param {google.analytics.data.v1alpha.DimensionValue} message DimensionValue + * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DimensionValue.toObject = function toObject(message, options) { + FunnelNextAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; + if (options.defaults) + object.nextActionDimension = null; + if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) + object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); + if (message.limit != null && message.hasOwnProperty("limit")) { + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; if (options.oneofs) - object.oneValue = "value"; + object._limit = "limit"; } return object; }; /** - * Converts this DimensionValue to JSON. + * Converts this FunnelNextAction to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @instance * @returns {Object.} JSON object */ - DimensionValue.prototype.toJSON = function toJSON() { + FunnelNextAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DimensionValue + * Gets the default type url for FunnelNextAction * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.DimensionValue + * @memberof google.analytics.data.v1alpha.FunnelNextAction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionValue"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; }; - return DimensionValue; + return FunnelNextAction; })(); - v1alpha.MetricValue = (function() { + v1alpha.Funnel = (function() { /** - * Properties of a MetricValue. + * Properties of a Funnel. * @memberof google.analytics.data.v1alpha - * @interface IMetricValue - * @property {string|null} [value] MetricValue value + * @interface IFunnel + * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel + * @property {Array.|null} [steps] Funnel steps */ /** - * Constructs a new MetricValue. + * Constructs a new Funnel. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a MetricValue. - * @implements IMetricValue + * @classdesc Represents a Funnel. + * @implements IFunnel * @constructor - * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set */ - function MetricValue(properties) { + function Funnel(properties) { + this.steps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31166,91 +34210,94 @@ } /** - * MetricValue value. - * @member {string|null|undefined} value - * @memberof google.analytics.data.v1alpha.MetricValue + * Funnel isOpenFunnel. + * @member {boolean} isOpenFunnel + * @memberof google.analytics.data.v1alpha.Funnel * @instance */ - MetricValue.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Funnel.prototype.isOpenFunnel = false; /** - * MetricValue oneValue. - * @member {"value"|undefined} oneValue - * @memberof google.analytics.data.v1alpha.MetricValue + * Funnel steps. + * @member {Array.} steps + * @memberof google.analytics.data.v1alpha.Funnel * @instance */ - Object.defineProperty(MetricValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); + Funnel.prototype.steps = $util.emptyArray; /** - * Creates a new MetricValue instance using the specified properties. + * Creates a new Funnel instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static - * @param {google.analytics.data.v1alpha.IMetricValue=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue instance + * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance */ - MetricValue.create = function create(properties) { - return new MetricValue(properties); + Funnel.create = function create(properties) { + return new Funnel(properties); }; /** - * Encodes the specified MetricValue message. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static - * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricValue.encode = function encode(message, writer) { + Funnel.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.value); + if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetricValue message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricValue.verify|verify} messages. + * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static - * @param {google.analytics.data.v1alpha.IMetricValue} message MetricValue message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricValue.encodeDelimited = function encodeDelimited(message, writer) { + Funnel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricValue message from the specified reader or buffer. + * Decodes a Funnel message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @returns {google.analytics.data.v1alpha.Funnel} Funnel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricValue.decode = function decode(reader, length, error) { + Funnel.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 4: { - message.value = reader.string(); + case 1: { + message.isOpenFunnel = reader.bool(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); break; } default: @@ -31262,131 +34309,151 @@ }; /** - * Decodes a MetricValue message from the specified reader or buffer, length delimited. + * Decodes a Funnel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @returns {google.analytics.data.v1alpha.Funnel} Funnel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricValue.decodeDelimited = function decodeDelimited(reader) { + Funnel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricValue message. + * Verifies a Funnel message. * @function verify - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricValue.verify = function verify(message) { + Funnel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties.oneValue = 1; - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + if (typeof message.isOpenFunnel !== "boolean") + return "isOpenFunnel: boolean expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } } return null; }; /** - * Creates a MetricValue message from a plain object. Also converts values to their respective internal types. + * Creates a Funnel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.MetricValue} MetricValue + * @returns {google.analytics.data.v1alpha.Funnel} Funnel */ - MetricValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.MetricValue) + Funnel.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Funnel) return object; - var message = new $root.google.analytics.data.v1alpha.MetricValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.analytics.data.v1alpha.Funnel(); + if (object.isOpenFunnel != null) + message.isOpenFunnel = Boolean(object.isOpenFunnel); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); + message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); + } + } return message; }; /** - * Creates a plain object from a MetricValue message. Also converts values to other types if specified. + * Creates a plain object from a Funnel message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static - * @param {google.analytics.data.v1alpha.MetricValue} message MetricValue + * @param {google.analytics.data.v1alpha.Funnel} message Funnel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricValue.toObject = function toObject(message, options) { + Funnel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object.oneValue = "value"; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.isOpenFunnel = false; + if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) + object.isOpenFunnel = message.isOpenFunnel; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); } return object; }; /** - * Converts this MetricValue to JSON. + * Converts this Funnel to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @instance * @returns {Object.} JSON object */ - MetricValue.prototype.toJSON = function toJSON() { + Funnel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MetricValue + * Gets the default type url for Funnel * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.MetricValue + * @memberof google.analytics.data.v1alpha.Funnel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricValue"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; }; - return MetricValue; + return Funnel; })(); - v1alpha.PropertyQuota = (function() { + v1alpha.FunnelStep = (function() { /** - * Properties of a PropertyQuota. + * Properties of a FunnelStep. * @memberof google.analytics.data.v1alpha - * @interface IPropertyQuota - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerDay] PropertyQuota tokensPerDay - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerHour] PropertyQuota tokensPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [concurrentRequests] PropertyQuota concurrentRequests - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [serverErrorsPerProjectPerHour] PropertyQuota serverErrorsPerProjectPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [potentiallyThresholdedRequestsPerHour] PropertyQuota potentiallyThresholdedRequestsPerHour - * @property {google.analytics.data.v1alpha.IQuotaStatus|null} [tokensPerProjectPerHour] PropertyQuota tokensPerProjectPerHour + * @interface IFunnelStep + * @property {string|null} [name] FunnelStep name + * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy + * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression */ /** - * Constructs a new PropertyQuota. + * Constructs a new FunnelStep. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a PropertyQuota. - * @implements IPropertyQuota + * @classdesc Represents a FunnelStep. + * @implements IFunnelStep * @constructor - * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set */ - function PropertyQuota(properties) { + function FunnelStep(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31394,147 +34461,128 @@ } /** - * PropertyQuota tokensPerDay. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerDay - * @memberof google.analytics.data.v1alpha.PropertyQuota + * FunnelStep name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.FunnelStep * @instance */ - PropertyQuota.prototype.tokensPerDay = null; + FunnelStep.prototype.name = ""; /** - * PropertyQuota tokensPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota + * FunnelStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.FunnelStep * @instance */ - PropertyQuota.prototype.tokensPerHour = null; + FunnelStep.prototype.isDirectlyFollowedBy = false; /** - * PropertyQuota concurrentRequests. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} concurrentRequests - * @memberof google.analytics.data.v1alpha.PropertyQuota + * FunnelStep withinDurationFromPriorStep. + * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep + * @memberof google.analytics.data.v1alpha.FunnelStep * @instance */ - PropertyQuota.prototype.concurrentRequests = null; + FunnelStep.prototype.withinDurationFromPriorStep = null; /** - * PropertyQuota serverErrorsPerProjectPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} serverErrorsPerProjectPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota + * FunnelStep filterExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.data.v1alpha.FunnelStep * @instance */ - PropertyQuota.prototype.serverErrorsPerProjectPerHour = null; + FunnelStep.prototype.filterExpression = null; - /** - * PropertyQuota potentiallyThresholdedRequestsPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} potentiallyThresholdedRequestsPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.potentiallyThresholdedRequestsPerHour = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * PropertyQuota tokensPerProjectPerHour. - * @member {google.analytics.data.v1alpha.IQuotaStatus|null|undefined} tokensPerProjectPerHour - * @memberof google.analytics.data.v1alpha.PropertyQuota - * @instance - */ - PropertyQuota.prototype.tokensPerProjectPerHour = null; + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { + get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PropertyQuota instance using the specified properties. + * Creates a new FunnelStep instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota instance + * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance */ - PropertyQuota.create = function create(properties) { - return new PropertyQuota(properties); + FunnelStep.create = function create(properties) { + return new FunnelStep(properties); }; /** - * Encodes the specified PropertyQuota message. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PropertyQuota.encode = function encode(message, writer) { + FunnelStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.potentiallyThresholdedRequestsPerHour != null && Object.hasOwnProperty.call(message, "potentiallyThresholdedRequestsPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.potentiallyThresholdedRequestsPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) - $root.google.analytics.data.v1alpha.QuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); + if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) + $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified PropertyQuota message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.PropertyQuota.verify|verify} messages. + * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static - * @param {google.analytics.data.v1alpha.IPropertyQuota} message PropertyQuota message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PropertyQuota.encodeDelimited = function encodeDelimited(message, writer) { + FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PropertyQuota message from the specified reader or buffer. + * Decodes a FunnelStep message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PropertyQuota.decode = function decode(reader, length, error) { + FunnelStep.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.PropertyQuota(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + message.isDirectlyFollowedBy = reader.bool(); break; } case 3: { - message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 4: { - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 5: { - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); - break; - } - case 6: { - message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.decode(reader, reader.uint32()); + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -31546,194 +34594,169 @@ }; /** - * Decodes a PropertyQuota message from the specified reader or buffer, length delimited. + * Decodes a FunnelStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PropertyQuota.decodeDelimited = function decodeDelimited(reader) { + FunnelStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PropertyQuota message. + * Verifies a FunnelStep message. * @function verify - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PropertyQuota.verify = function verify(message) { + FunnelStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerDay); - if (error) - return "tokensPerDay." + error; - } - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerHour); - if (error) - return "tokensPerHour." + error; - } - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.concurrentRequests); - if (error) - return "concurrentRequests." + error; - } - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.serverErrorsPerProjectPerHour); - if (error) - return "serverErrorsPerProjectPerHour." + error; - } - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.potentiallyThresholdedRequestsPerHour); - if (error) - return "potentiallyThresholdedRequestsPerHour." + error; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + properties._withinDurationFromPriorStep = 1; + { + var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); + if (error) + return "withinDurationFromPriorStep." + error; + } } - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { - var error = $root.google.analytics.data.v1alpha.QuotaStatus.verify(message.tokensPerProjectPerHour); + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); if (error) - return "tokensPerProjectPerHour." + error; + return "filterExpression." + error; } return null; }; /** - * Creates a PropertyQuota message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.PropertyQuota} PropertyQuota + * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep */ - PropertyQuota.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.PropertyQuota) + FunnelStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) return object; - var message = new $root.google.analytics.data.v1alpha.PropertyQuota(); - if (object.tokensPerDay != null) { - if (typeof object.tokensPerDay !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerDay: object expected"); - message.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerDay); - } - if (object.tokensPerHour != null) { - if (typeof object.tokensPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerHour: object expected"); - message.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerHour); - } - if (object.concurrentRequests != null) { - if (typeof object.concurrentRequests !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.concurrentRequests: object expected"); - message.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.concurrentRequests); - } - if (object.serverErrorsPerProjectPerHour != null) { - if (typeof object.serverErrorsPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.serverErrorsPerProjectPerHour: object expected"); - message.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); - } - if (object.potentiallyThresholdedRequestsPerHour != null) { - if (typeof object.potentiallyThresholdedRequestsPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.potentiallyThresholdedRequestsPerHour: object expected"); - message.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.potentiallyThresholdedRequestsPerHour); + var message = new $root.google.analytics.data.v1alpha.FunnelStep(); + if (object.name != null) + message.name = String(object.name); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + if (object.withinDurationFromPriorStep != null) { + if (typeof object.withinDurationFromPriorStep !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); + message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); } - if (object.tokensPerProjectPerHour != null) { - if (typeof object.tokensPerProjectPerHour !== "object") - throw TypeError(".google.analytics.data.v1alpha.PropertyQuota.tokensPerProjectPerHour: object expected"); - message.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.fromObject(object.tokensPerProjectPerHour); + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); } return message; }; /** - * Creates a plain object from a PropertyQuota message. Also converts values to other types if specified. + * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static - * @param {google.analytics.data.v1alpha.PropertyQuota} message PropertyQuota + * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PropertyQuota.toObject = function toObject(message, options) { + FunnelStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tokensPerDay = null; - object.tokensPerHour = null; - object.concurrentRequests = null; - object.serverErrorsPerProjectPerHour = null; - object.potentiallyThresholdedRequestsPerHour = null; - object.tokensPerProjectPerHour = null; + object.name = ""; + object.isDirectlyFollowedBy = false; + object.filterExpression = null; } - if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) - object.tokensPerDay = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerDay, options); - if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) - object.tokensPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerHour, options); - if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) - object.concurrentRequests = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.concurrentRequests, options); - if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) - object.serverErrorsPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); - if (message.potentiallyThresholdedRequestsPerHour != null && message.hasOwnProperty("potentiallyThresholdedRequestsPerHour")) - object.potentiallyThresholdedRequestsPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.potentiallyThresholdedRequestsPerHour, options); - if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) - object.tokensPerProjectPerHour = $root.google.analytics.data.v1alpha.QuotaStatus.toObject(message.tokensPerProjectPerHour, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { + object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); + if (options.oneofs) + object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); return object; }; /** - * Converts this PropertyQuota to JSON. + * Converts this FunnelStep to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @instance * @returns {Object.} JSON object */ - PropertyQuota.prototype.toJSON = function toJSON() { + FunnelStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PropertyQuota + * Gets the default type url for FunnelStep * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.PropertyQuota + * @memberof google.analytics.data.v1alpha.FunnelStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PropertyQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.PropertyQuota"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; }; - return PropertyQuota; + return FunnelStep; })(); - v1alpha.QuotaStatus = (function() { + v1alpha.FunnelSubReport = (function() { /** - * Properties of a QuotaStatus. + * Properties of a FunnelSubReport. * @memberof google.analytics.data.v1alpha - * @interface IQuotaStatus - * @property {number|null} [consumed] QuotaStatus consumed - * @property {number|null} [remaining] QuotaStatus remaining + * @interface IFunnelSubReport + * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders + * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders + * @property {Array.|null} [rows] FunnelSubReport rows + * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata */ /** - * Constructs a new QuotaStatus. + * Constructs a new FunnelSubReport. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a QuotaStatus. - * @implements IQuotaStatus + * @classdesc Represents a FunnelSubReport. + * @implements IFunnelSubReport * @constructor - * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set */ - function QuotaStatus(properties) { + function FunnelSubReport(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31741,91 +34764,128 @@ } /** - * QuotaStatus consumed. - * @member {number} consumed - * @memberof google.analytics.data.v1alpha.QuotaStatus + * FunnelSubReport dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @instance */ - QuotaStatus.prototype.consumed = 0; + FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; /** - * QuotaStatus remaining. - * @member {number} remaining - * @memberof google.analytics.data.v1alpha.QuotaStatus + * FunnelSubReport metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @instance */ - QuotaStatus.prototype.remaining = 0; + FunnelSubReport.prototype.metricHeaders = $util.emptyArray; /** - * Creates a new QuotaStatus instance using the specified properties. + * FunnelSubReport rows. + * @member {Array.} rows + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.rows = $util.emptyArray; + + /** + * FunnelSubReport metadata. + * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata + * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @instance + */ + FunnelSubReport.prototype.metadata = null; + + /** + * Creates a new FunnelSubReport instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus instance + * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance */ - QuotaStatus.create = function create(properties) { - return new QuotaStatus(properties); + FunnelSubReport.create = function create(properties) { + return new FunnelSubReport(properties); }; /** - * Encodes the specified QuotaStatus message. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaStatus.encode = function encode(message, writer) { + FunnelSubReport.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); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified QuotaStatus message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.QuotaStatus.verify|verify} messages. + * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static - * @param {google.analytics.data.v1alpha.IQuotaStatus} message QuotaStatus message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuotaStatus message from the specified reader or buffer. + * Decodes a FunnelSubReport message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaStatus.decode = function decode(reader, length, error) { + FunnelSubReport.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.QuotaStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.consumed = reader.int32(); + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); break; } case 2: { - message.remaining = reader.int32(); + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); + break; + } + case 4: { + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); break; } default: @@ -31837,132 +34897,205 @@ }; /** - * Decodes a QuotaStatus message from the specified reader or buffer, length delimited. + * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaStatus.decodeDelimited = function decodeDelimited(reader) { + FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuotaStatus message. + * Verifies a FunnelSubReport message. * @function verify - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuotaStatus.verify = function verify(message) { + FunnelSubReport.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"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; /** - * Creates a QuotaStatus message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.QuotaStatus} QuotaStatus + * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport */ - QuotaStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.QuotaStatus) + FunnelSubReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) return object; - var message = new $root.google.analytics.data.v1alpha.QuotaStatus(); - if (object.consumed != null) - message.consumed = object.consumed | 0; - if (object.remaining != null) - message.remaining = object.remaining | 0; + var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); + message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); + message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); + } return message; }; /** - * Creates a plain object from a QuotaStatus message. Also converts values to other types if specified. + * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static - * @param {google.analytics.data.v1alpha.QuotaStatus} message QuotaStatus + * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuotaStatus.toObject = function toObject(message, options) { + FunnelSubReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.consumed = 0; - object.remaining = 0; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; } - if (message.consumed != null && message.hasOwnProperty("consumed")) - object.consumed = message.consumed; - if (message.remaining != null && message.hasOwnProperty("remaining")) - object.remaining = message.remaining; + if (options.defaults) + object.metadata = null; + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); return object; }; /** - * Converts this QuotaStatus to JSON. + * Converts this FunnelSubReport to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @instance * @returns {Object.} JSON object */ - QuotaStatus.prototype.toJSON = function toJSON() { + FunnelSubReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QuotaStatus + * Gets the default type url for FunnelSubReport * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.QuotaStatus + * @memberof google.analytics.data.v1alpha.FunnelSubReport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.QuotaStatus"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; }; - return QuotaStatus; + return FunnelSubReport; })(); - v1alpha.FunnelBreakdown = (function() { + v1alpha.UserSegment = (function() { /** - * Properties of a FunnelBreakdown. + * Properties of a UserSegment. * @memberof google.analytics.data.v1alpha - * @interface IFunnelBreakdown - * @property {google.analytics.data.v1alpha.IDimension|null} [breakdownDimension] FunnelBreakdown breakdownDimension - * @property {number|Long|null} [limit] FunnelBreakdown limit + * @interface IUserSegment + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria + * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion */ /** - * Constructs a new FunnelBreakdown. + * Constructs a new UserSegment. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelBreakdown. - * @implements IFunnelBreakdown + * @classdesc Represents a UserSegment. + * @implements IUserSegment * @constructor - * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set */ - function FunnelBreakdown(properties) { + function UserSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31970,100 +35103,91 @@ } /** - * FunnelBreakdown breakdownDimension. - * @member {google.analytics.data.v1alpha.IDimension|null|undefined} breakdownDimension - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * UserSegment userInclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegment * @instance */ - FunnelBreakdown.prototype.breakdownDimension = null; + UserSegment.prototype.userInclusionCriteria = null; - /** - * FunnelBreakdown limit. - * @member {number|Long|null|undefined} limit - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + /** + * UserSegment exclusion. + * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.UserSegment * @instance */ - FunnelBreakdown.prototype.limit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelBreakdown.prototype, "_limit", { - get: $util.oneOfGetter($oneOfFields = ["limit"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserSegment.prototype.exclusion = null; /** - * Creates a new FunnelBreakdown instance using the specified properties. + * Creates a new UserSegment instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown instance + * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance */ - FunnelBreakdown.create = function create(properties) { - return new FunnelBreakdown(properties); + UserSegment.create = function create(properties) { + return new UserSegment(properties); }; /** - * Encodes the specified FunnelBreakdown message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelBreakdown.encode = function encode(message, writer) { + UserSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.breakdownDimension != null && Object.hasOwnProperty.call(message, "breakdownDimension")) - $root.google.analytics.data.v1alpha.Dimension.encode(message.breakdownDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelBreakdown message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelBreakdown.verify|verify} messages. + * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static - * @param {google.analytics.data.v1alpha.IFunnelBreakdown} message FunnelBreakdown message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelBreakdown.encodeDelimited = function encodeDelimited(message, writer) { + UserSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelBreakdown message from the specified reader or buffer. + * Decodes a UserSegment message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelBreakdown.decode = function decode(reader, length, error) { + UserSegment.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); break; } case 2: { - message.limit = reader.int64(); + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); break; } default: @@ -32075,151 +35199,144 @@ }; /** - * Decodes a FunnelBreakdown message from the specified reader or buffer, length delimited. + * Decodes a UserSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelBreakdown.decodeDelimited = function decodeDelimited(reader) { + UserSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelBreakdown message. + * Verifies a UserSegment message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelBreakdown.verify = function verify(message) { + UserSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.breakdownDimension); + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); if (error) - return "breakdownDimension." + error; + return "userInclusionCriteria." + error; } - if (message.limit != null && message.hasOwnProperty("limit")) { - properties._limit = 1; - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; } return null; }; /** - * Creates a FunnelBreakdown message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelBreakdown} FunnelBreakdown + * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment */ - FunnelBreakdown.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelBreakdown) + UserSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelBreakdown(); - if (object.breakdownDimension != null) { - if (typeof object.breakdownDimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelBreakdown.breakdownDimension: object expected"); - message.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.breakdownDimension); + var message = new $root.google.analytics.data.v1alpha.UserSegment(); + if (object.userInclusionCriteria != null) { + if (typeof object.userInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); + message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); + } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FunnelBreakdown message. Also converts values to other types if specified. + * Creates a plain object from a UserSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static - * @param {google.analytics.data.v1alpha.FunnelBreakdown} message FunnelBreakdown + * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelBreakdown.toObject = function toObject(message, options) { + UserSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.breakdownDimension = null; - if (message.breakdownDimension != null && message.hasOwnProperty("breakdownDimension")) - object.breakdownDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.breakdownDimension, options); - if (message.limit != null && message.hasOwnProperty("limit")) { - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (options.oneofs) - object._limit = "limit"; + if (options.defaults) { + object.userInclusionCriteria = null; + object.exclusion = null; } + if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) + object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this FunnelBreakdown to JSON. + * Converts this UserSegment to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @instance * @returns {Object.} JSON object */ - FunnelBreakdown.prototype.toJSON = function toJSON() { + UserSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelBreakdown + * Gets the default type url for UserSegment * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelBreakdown + * @memberof google.analytics.data.v1alpha.UserSegment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelBreakdown.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelBreakdown"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; }; - return FunnelBreakdown; + return UserSegment; })(); - v1alpha.FunnelNextAction = (function() { + v1alpha.UserSegmentCriteria = (function() { /** - * Properties of a FunnelNextAction. + * Properties of a UserSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @interface IFunnelNextAction - * @property {google.analytics.data.v1alpha.IDimension|null} [nextActionDimension] FunnelNextAction nextActionDimension - * @property {number|Long|null} [limit] FunnelNextAction limit + * @interface IUserSegmentCriteria + * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups + * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups */ /** - * Constructs a new FunnelNextAction. + * Constructs a new UserSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelNextAction. - * @implements IFunnelNextAction + * @classdesc Represents a UserSegmentCriteria. + * @implements IUserSegmentCriteria * @constructor - * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set */ - function FunnelNextAction(properties) { + function UserSegmentCriteria(properties) { + this.andConditionGroups = []; + this.andSequenceGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32227,100 +35344,97 @@ } /** - * FunnelNextAction nextActionDimension. - * @member {google.analytics.data.v1alpha.IDimension|null|undefined} nextActionDimension - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * UserSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @instance */ - FunnelNextAction.prototype.nextActionDimension = null; + UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; /** - * FunnelNextAction limit. - * @member {number|Long|null|undefined} limit - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * UserSegmentCriteria andSequenceGroups. + * @member {Array.} andSequenceGroups + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @instance */ - FunnelNextAction.prototype.limit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelNextAction.prototype, "_limit", { - get: $util.oneOfGetter($oneOfFields = ["limit"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; /** - * Creates a new FunnelNextAction instance using the specified properties. + * Creates a new UserSegmentCriteria instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction instance + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance */ - FunnelNextAction.create = function create(properties) { - return new FunnelNextAction(properties); + UserSegmentCriteria.create = function create(properties) { + return new UserSegmentCriteria(properties); }; /** - * Encodes the specified FunnelNextAction message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelNextAction.encode = function encode(message, writer) { + UserSegmentCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextActionDimension != null && Object.hasOwnProperty.call(message, "nextActionDimension")) - $root.google.analytics.data.v1alpha.Dimension.encode(message.nextActionDimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.limit); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.andSequenceGroups != null && message.andSequenceGroups.length) + for (var i = 0; i < message.andSequenceGroups.length; ++i) + $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelNextAction message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelNextAction.verify|verify} messages. + * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IFunnelNextAction} message FunnelNextAction message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelNextAction.encodeDelimited = function encodeDelimited(message, writer) { + UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelNextAction message from the specified reader or buffer. + * Decodes a UserSegmentCriteria message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelNextAction.decode = function decode(reader, length, error) { + UserSegmentCriteria.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.decode(reader, reader.uint32()); + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); break; } case 2: { - message.limit = reader.int64(); + if (!(message.andSequenceGroups && message.andSequenceGroups.length)) + message.andSequenceGroups = []; + message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); break; } default: @@ -32332,152 +35446,184 @@ }; /** - * Decodes a FunnelNextAction message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelNextAction.decodeDelimited = function decodeDelimited(reader) { + UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelNextAction message. + * Verifies a UserSegmentCriteria message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelNextAction.verify = function verify(message) { + UserSegmentCriteria.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) { - var error = $root.google.analytics.data.v1alpha.Dimension.verify(message.nextActionDimension); - if (error) - return "nextActionDimension." + error; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } } - if (message.limit != null && message.hasOwnProperty("limit")) { - properties._limit = 1; - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; + if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { + if (!Array.isArray(message.andSequenceGroups)) + return "andSequenceGroups: array expected"; + for (var i = 0; i < message.andSequenceGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); + if (error) + return "andSequenceGroups." + error; + } } return null; }; /** - * Creates a FunnelNextAction message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelNextAction} FunnelNextAction + * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria */ - FunnelNextAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelNextAction) + UserSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelNextAction(); - if (object.nextActionDimension != null) { - if (typeof object.nextActionDimension !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelNextAction.nextActionDimension: object expected"); - message.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.fromObject(object.nextActionDimension); + var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } + } + if (object.andSequenceGroups) { + if (!Array.isArray(object.andSequenceGroups)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); + message.andSequenceGroups = []; + for (var i = 0; i < object.andSequenceGroups.length; ++i) { + if (typeof object.andSequenceGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); + message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); + } } - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FunnelNextAction message. Also converts values to other types if specified. + * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.FunnelNextAction} message FunnelNextAction + * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelNextAction.toObject = function toObject(message, options) { + UserSegmentCriteria.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.nextActionDimension = null; - if (message.nextActionDimension != null && message.hasOwnProperty("nextActionDimension")) - object.nextActionDimension = $root.google.analytics.data.v1alpha.Dimension.toObject(message.nextActionDimension, options); - if (message.limit != null && message.hasOwnProperty("limit")) { - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; - if (options.oneofs) - object._limit = "limit"; + if (options.arrays || options.defaults) { + object.andConditionGroups = []; + object.andSequenceGroups = []; + } + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + } + if (message.andSequenceGroups && message.andSequenceGroups.length) { + object.andSequenceGroups = []; + for (var j = 0; j < message.andSequenceGroups.length; ++j) + object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); } return object; }; /** - * Converts this FunnelNextAction to JSON. + * Converts this UserSegmentCriteria to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @instance * @returns {Object.} JSON object */ - FunnelNextAction.prototype.toJSON = function toJSON() { + UserSegmentCriteria.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelNextAction + * Gets the default type url for UserSegmentCriteria * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelNextAction + * @memberof google.analytics.data.v1alpha.UserSegmentCriteria * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelNextAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelNextAction"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; }; - return FunnelNextAction; + return UserSegmentCriteria; })(); - v1alpha.Funnel = (function() { + /** + * UserCriteriaScoping enum. + * @name google.analytics.data.v1alpha.UserCriteriaScoping + * @enum {number} + * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value + * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value + */ + v1alpha.UserCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.UserSegmentConditionGroup = (function() { /** - * Properties of a Funnel. + * Properties of a UserSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @interface IFunnel - * @property {boolean|null} [isOpenFunnel] Funnel isOpenFunnel - * @property {Array.|null} [steps] Funnel steps + * @interface IUserSegmentConditionGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression */ /** - * Constructs a new Funnel. + * Constructs a new UserSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Funnel. - * @implements IFunnel + * @classdesc Represents a UserSegmentConditionGroup. + * @implements IUserSegmentConditionGroup * @constructor - * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set */ - function Funnel(properties) { - this.steps = []; + function UserSegmentConditionGroup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32485,94 +35631,91 @@ } /** - * Funnel isOpenFunnel. - * @member {boolean} isOpenFunnel - * @memberof google.analytics.data.v1alpha.Funnel + * UserSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @instance */ - Funnel.prototype.isOpenFunnel = false; + UserSegmentConditionGroup.prototype.conditionScoping = 0; /** - * Funnel steps. - * @member {Array.} steps - * @memberof google.analytics.data.v1alpha.Funnel + * UserSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @instance */ - Funnel.prototype.steps = $util.emptyArray; + UserSegmentConditionGroup.prototype.segmentFilterExpression = null; /** - * Creates a new Funnel instance using the specified properties. + * Creates a new UserSegmentConditionGroup instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IFunnel=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Funnel} Funnel instance + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance */ - Funnel.create = function create(properties) { - return new Funnel(properties); + UserSegmentConditionGroup.create = function create(properties) { + return new UserSegmentConditionGroup(properties); }; /** - * Encodes the specified Funnel message. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Funnel.encode = function encode(message, writer) { + UserSegmentConditionGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.isOpenFunnel != null && Object.hasOwnProperty.call(message, "isOpenFunnel")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isOpenFunnel); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.analytics.data.v1alpha.FunnelStep.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Funnel message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Funnel.verify|verify} messages. + * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IFunnel} message Funnel message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Funnel.encodeDelimited = function encodeDelimited(message, writer) { + UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Funnel message from the specified reader or buffer. + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Funnel.decode = function decode(reader, length, error) { + UserSegmentConditionGroup.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Funnel(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.isOpenFunnel = reader.bool(); + message.conditionScoping = reader.int32(); break; } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.analytics.data.v1alpha.FunnelStep.decode(reader, reader.uint32())); + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -32584,151 +35727,168 @@ }; /** - * Decodes a Funnel message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Funnel.decodeDelimited = function decodeDelimited(reader) { + UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Funnel message. + * Verifies a UserSegmentConditionGroup message. * @function verify - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Funnel.verify = function verify(message) { + UserSegmentConditionGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) - if (typeof message.isOpenFunnel !== "boolean") - return "isOpenFunnel: boolean expected"; - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelStep.verify(message.steps[i]); - if (error) - return "steps." + error; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; } return null; }; /** - * Creates a Funnel message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Funnel} Funnel + * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup */ - Funnel.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Funnel) + UserSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) return object; - var message = new $root.google.analytics.data.v1alpha.Funnel(); - if (object.isOpenFunnel != null) - message.isOpenFunnel = Boolean(object.isOpenFunnel); - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.Funnel.steps: object expected"); - message.steps[i] = $root.google.analytics.data.v1alpha.FunnelStep.fromObject(object.steps[i]); + var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.conditionScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.conditionScoping = 3; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); } return message; }; /** - * Creates a plain object from a Funnel message. Also converts values to other types if specified. + * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.Funnel} message Funnel + * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Funnel.toObject = function toObject(message, options) { + UserSegmentConditionGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) - object.isOpenFunnel = false; - if (message.isOpenFunnel != null && message.hasOwnProperty("isOpenFunnel")) - object.isOpenFunnel = message.isOpenFunnel; - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.analytics.data.v1alpha.FunnelStep.toObject(message.steps[j], options); + if (options.defaults) { + object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); return object; }; /** - * Converts this Funnel to JSON. + * Converts this UserSegmentConditionGroup to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @instance * @returns {Object.} JSON object */ - Funnel.prototype.toJSON = function toJSON() { + UserSegmentConditionGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Funnel + * Gets the default type url for UserSegmentConditionGroup * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Funnel + * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Funnel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Funnel"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; }; - return Funnel; + return UserSegmentConditionGroup; })(); - v1alpha.FunnelStep = (function() { + v1alpha.UserSegmentSequenceGroup = (function() { /** - * Properties of a FunnelStep. + * Properties of a UserSegmentSequenceGroup. * @memberof google.analytics.data.v1alpha - * @interface IFunnelStep - * @property {string|null} [name] FunnelStep name - * @property {boolean|null} [isDirectlyFollowedBy] FunnelStep isDirectlyFollowedBy - * @property {google.protobuf.IDuration|null} [withinDurationFromPriorStep] FunnelStep withinDurationFromPriorStep - * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [filterExpression] FunnelStep filterExpression + * @interface IUserSegmentSequenceGroup + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration + * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps */ /** - * Constructs a new FunnelStep. + * Constructs a new UserSegmentSequenceGroup. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelStep. - * @implements IFunnelStep + * @classdesc Represents a UserSegmentSequenceGroup. + * @implements IUserSegmentSequenceGroup * @constructor - * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set */ - function FunnelStep(properties) { + function UserSegmentSequenceGroup(properties) { + this.userSequenceSteps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32736,128 +35896,108 @@ } /** - * FunnelStep name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.FunnelStep - * @instance - */ - FunnelStep.prototype.name = ""; - - /** - * FunnelStep isDirectlyFollowedBy. - * @member {boolean} isDirectlyFollowedBy - * @memberof google.analytics.data.v1alpha.FunnelStep + * UserSegmentSequenceGroup sequenceScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @instance */ - FunnelStep.prototype.isDirectlyFollowedBy = false; + UserSegmentSequenceGroup.prototype.sequenceScoping = 0; /** - * FunnelStep withinDurationFromPriorStep. - * @member {google.protobuf.IDuration|null|undefined} withinDurationFromPriorStep - * @memberof google.analytics.data.v1alpha.FunnelStep + * UserSegmentSequenceGroup sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @instance */ - FunnelStep.prototype.withinDurationFromPriorStep = null; + UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; /** - * FunnelStep filterExpression. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.data.v1alpha.FunnelStep + * UserSegmentSequenceGroup userSequenceSteps. + * @member {Array.} userSequenceSteps + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @instance */ - FunnelStep.prototype.filterExpression = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelStep.prototype, "_withinDurationFromPriorStep", { - get: $util.oneOfGetter($oneOfFields = ["withinDurationFromPriorStep"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; /** - * Creates a new FunnelStep instance using the specified properties. + * Creates a new UserSegmentSequenceGroup instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static - * @param {google.analytics.data.v1alpha.IFunnelStep=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep instance + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance */ - FunnelStep.create = function create(properties) { - return new FunnelStep(properties); + UserSegmentSequenceGroup.create = function create(properties) { + return new UserSegmentSequenceGroup(properties); }; /** - * Encodes the specified FunnelStep message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static - * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelStep.encode = function encode(message, writer) { + UserSegmentSequenceGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDirectlyFollowedBy); - if (message.withinDurationFromPriorStep != null && Object.hasOwnProperty.call(message, "withinDurationFromPriorStep")) - $root.google.protobuf.Duration.encode(message.withinDurationFromPriorStep, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userSequenceSteps != null && message.userSequenceSteps.length) + for (var i = 0; i < message.userSequenceSteps.length; ++i) + $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelStep.verify|verify} messages. + * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static - * @param {google.analytics.data.v1alpha.IFunnelStep} message FunnelStep message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelStep.encodeDelimited = function encodeDelimited(message, writer) { + UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelStep message from the specified reader or buffer. + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelStep.decode = function decode(reader, length, error) { + UserSegmentSequenceGroup.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelStep(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.sequenceScoping = reader.int32(); break; } case 2: { - message.isDirectlyFollowedBy = reader.bool(); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 3: { - message.withinDurationFromPriorStep = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + if (!(message.userSequenceSteps && message.userSequenceSteps.length)) + message.userSequenceSteps = []; + message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); break; } default: @@ -32869,169 +36009,193 @@ }; /** - * Decodes a FunnelStep message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelStep.decodeDelimited = function decodeDelimited(reader) { + UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelStep message. + * Verifies a UserSegmentSequenceGroup message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelStep.verify = function verify(message) { + UserSegmentSequenceGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - if (typeof message.isDirectlyFollowedBy !== "boolean") - return "isDirectlyFollowedBy: boolean expected"; - if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { - properties._withinDurationFromPriorStep = 1; - { - var error = $root.google.protobuf.Duration.verify(message.withinDurationFromPriorStep); - if (error) - return "withinDurationFromPriorStep." + error; + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + switch (message.sequenceScoping) { + default: + return "sequenceScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.filterExpression); + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); if (error) - return "filterExpression." + error; + return "sequenceMaximumDuration." + error; + } + if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { + if (!Array.isArray(message.userSequenceSteps)) + return "userSequenceSteps: array expected"; + for (var i = 0; i < message.userSequenceSteps.length; ++i) { + var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); + if (error) + return "userSequenceSteps." + error; + } } return null; }; /** - * Creates a FunnelStep message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelStep} FunnelStep + * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup */ - FunnelStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelStep) + UserSegmentSequenceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelStep(); - if (object.name != null) - message.name = String(object.name); - if (object.isDirectlyFollowedBy != null) - message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); - if (object.withinDurationFromPriorStep != null) { - if (typeof object.withinDurationFromPriorStep !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelStep.withinDurationFromPriorStep: object expected"); - message.withinDurationFromPriorStep = $root.google.protobuf.Duration.fromObject(object.withinDurationFromPriorStep); + var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + switch (object.sequenceScoping) { + default: + if (typeof object.sequenceScoping === "number") { + message.sequenceScoping = object.sequenceScoping; + break; + } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.sequenceScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.sequenceScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.sequenceScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.sequenceScoping = 3; + break; } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelStep.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.filterExpression); + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.userSequenceSteps) { + if (!Array.isArray(object.userSequenceSteps)) + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); + message.userSequenceSteps = []; + for (var i = 0; i < object.userSequenceSteps.length; ++i) { + if (typeof object.userSequenceSteps[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); + message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); + } } return message; }; /** - * Creates a plain object from a FunnelStep message. Also converts values to other types if specified. + * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static - * @param {google.analytics.data.v1alpha.FunnelStep} message FunnelStep + * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelStep.toObject = function toObject(message, options) { + UserSegmentSequenceGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.userSequenceSteps = []; if (options.defaults) { - object.name = ""; - object.isDirectlyFollowedBy = false; - object.filterExpression = null; + object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; - if (message.withinDurationFromPriorStep != null && message.hasOwnProperty("withinDurationFromPriorStep")) { - object.withinDurationFromPriorStep = $root.google.protobuf.Duration.toObject(message.withinDurationFromPriorStep, options); - if (options.oneofs) - object._withinDurationFromPriorStep = "withinDurationFromPriorStep"; + if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) + object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.userSequenceSteps && message.userSequenceSteps.length) { + object.userSequenceSteps = []; + for (var j = 0; j < message.userSequenceSteps.length; ++j) + object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.filterExpression, options); return object; }; /** - * Converts this FunnelStep to JSON. + * Converts this UserSegmentSequenceGroup to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @instance * @returns {Object.} JSON object */ - FunnelStep.prototype.toJSON = function toJSON() { + UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelStep + * Gets the default type url for UserSegmentSequenceGroup * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelStep + * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelStep"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; }; - return FunnelStep; + return UserSegmentSequenceGroup; })(); - v1alpha.FunnelSubReport = (function() { + v1alpha.UserSequenceStep = (function() { /** - * Properties of a FunnelSubReport. + * Properties of a UserSequenceStep. * @memberof google.analytics.data.v1alpha - * @interface IFunnelSubReport - * @property {Array.|null} [dimensionHeaders] FunnelSubReport dimensionHeaders - * @property {Array.|null} [metricHeaders] FunnelSubReport metricHeaders - * @property {Array.|null} [rows] FunnelSubReport rows - * @property {google.analytics.data.v1alpha.IFunnelResponseMetadata|null} [metadata] FunnelSubReport metadata + * @interface IUserSequenceStep + * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy + * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression */ /** - * Constructs a new FunnelSubReport. + * Constructs a new UserSequenceStep. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelSubReport. - * @implements IFunnelSubReport + * @classdesc Represents a UserSequenceStep. + * @implements IUserSequenceStep * @constructor - * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set */ - function FunnelSubReport(properties) { - this.dimensionHeaders = []; - this.metricHeaders = []; - this.rows = []; + function UserSequenceStep(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33039,128 +36203,105 @@ } /** - * FunnelSubReport dimensionHeaders. - * @member {Array.} dimensionHeaders - * @memberof google.analytics.data.v1alpha.FunnelSubReport - * @instance - */ - FunnelSubReport.prototype.dimensionHeaders = $util.emptyArray; - - /** - * FunnelSubReport metricHeaders. - * @member {Array.} metricHeaders - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * UserSequenceStep isDirectlyFollowedBy. + * @member {boolean} isDirectlyFollowedBy + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @instance */ - FunnelSubReport.prototype.metricHeaders = $util.emptyArray; + UserSequenceStep.prototype.isDirectlyFollowedBy = false; /** - * FunnelSubReport rows. - * @member {Array.} rows - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * UserSequenceStep stepScoping. + * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @instance */ - FunnelSubReport.prototype.rows = $util.emptyArray; + UserSequenceStep.prototype.stepScoping = 0; /** - * FunnelSubReport metadata. - * @member {google.analytics.data.v1alpha.IFunnelResponseMetadata|null|undefined} metadata - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * UserSequenceStep segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @instance */ - FunnelSubReport.prototype.metadata = null; + UserSequenceStep.prototype.segmentFilterExpression = null; /** - * Creates a new FunnelSubReport instance using the specified properties. + * Creates a new UserSequenceStep instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport instance + * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance */ - FunnelSubReport.create = function create(properties) { - return new FunnelSubReport(properties); + UserSequenceStep.create = function create(properties) { + return new UserSequenceStep(properties); }; /** - * Encodes the specified FunnelSubReport message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer - */ - FunnelSubReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensionHeaders != null && message.dimensionHeaders.length) - for (var i = 0; i < message.dimensionHeaders.length; ++i) - $root.google.analytics.data.v1alpha.DimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.metricHeaders != null && message.metricHeaders.length) - for (var i = 0; i < message.metricHeaders.length; ++i) - $root.google.analytics.data.v1alpha.MetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.analytics.data.v1alpha.Row.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.analytics.data.v1alpha.FunnelResponseMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + */ + UserSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); + if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelSubReport message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelSubReport.verify|verify} messages. + * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static - * @param {google.analytics.data.v1alpha.IFunnelSubReport} message FunnelSubReport message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelSubReport.encodeDelimited = function encodeDelimited(message, writer) { + UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelSubReport message from the specified reader or buffer. + * Decodes a UserSequenceStep message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelSubReport.decode = function decode(reader, length, error) { + UserSequenceStep.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dimensionHeaders && message.dimensionHeaders.length)) - message.dimensionHeaders = []; - message.dimensionHeaders.push($root.google.analytics.data.v1alpha.DimensionHeader.decode(reader, reader.uint32())); + message.isDirectlyFollowedBy = reader.bool(); break; } case 2: { - if (!(message.metricHeaders && message.metricHeaders.length)) - message.metricHeaders = []; - message.metricHeaders.push($root.google.analytics.data.v1alpha.MetricHeader.decode(reader, reader.uint32())); + message.stepScoping = reader.int32(); break; } case 3: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.analytics.data.v1alpha.Row.decode(reader, reader.uint32())); - break; - } - case 4: { - message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.decode(reader, reader.uint32()); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -33172,205 +36313,174 @@ }; /** - * Decodes a FunnelSubReport message from the specified reader or buffer, length delimited. + * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelSubReport.decodeDelimited = function decodeDelimited(reader) { + UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelSubReport message. + * Verifies a UserSequenceStep message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelSubReport.verify = function verify(message) { + UserSequenceStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { - if (!Array.isArray(message.dimensionHeaders)) - return "dimensionHeaders: array expected"; - for (var i = 0; i < message.dimensionHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.DimensionHeader.verify(message.dimensionHeaders[i]); - if (error) - return "dimensionHeaders." + error; - } - } - if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { - if (!Array.isArray(message.metricHeaders)) - return "metricHeaders: array expected"; - for (var i = 0; i < message.metricHeaders.length; ++i) { - var error = $root.google.analytics.data.v1alpha.MetricHeader.verify(message.metricHeaders[i]); - if (error) - return "metricHeaders." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.analytics.data.v1alpha.Row.verify(message.rows[i]); - if (error) - return "rows." + error; + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + if (typeof message.isDirectlyFollowedBy !== "boolean") + return "isDirectlyFollowedBy: boolean expected"; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + switch (message.stepScoping) { + default: + return "stepScoping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.verify(message.metadata); + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); if (error) - return "metadata." + error; + return "segmentFilterExpression." + error; } return null; }; /** - * Creates a FunnelSubReport message from a plain object. Also converts values to their respective internal types. + * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelSubReport} FunnelSubReport + * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep */ - FunnelSubReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelSubReport) + UserSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelSubReport(); - if (object.dimensionHeaders) { - if (!Array.isArray(object.dimensionHeaders)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: array expected"); - message.dimensionHeaders = []; - for (var i = 0; i < object.dimensionHeaders.length; ++i) { - if (typeof object.dimensionHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.dimensionHeaders: object expected"); - message.dimensionHeaders[i] = $root.google.analytics.data.v1alpha.DimensionHeader.fromObject(object.dimensionHeaders[i]); - } - } - if (object.metricHeaders) { - if (!Array.isArray(object.metricHeaders)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: array expected"); - message.metricHeaders = []; - for (var i = 0; i < object.metricHeaders.length; ++i) { - if (typeof object.metricHeaders[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metricHeaders: object expected"); - message.metricHeaders[i] = $root.google.analytics.data.v1alpha.MetricHeader.fromObject(object.metricHeaders[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.rows: object expected"); - message.rows[i] = $root.google.analytics.data.v1alpha.Row.fromObject(object.rows[i]); + var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + if (object.isDirectlyFollowedBy != null) + message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); + switch (object.stepScoping) { + default: + if (typeof object.stepScoping === "number") { + message.stepScoping = object.stepScoping; + break; } + break; + case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.stepScoping = 0; + break; + case "USER_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.stepScoping = 1; + break; + case "USER_CRITERIA_WITHIN_SAME_SESSION": + case 2: + message.stepScoping = 2; + break; + case "USER_CRITERIA_ACROSS_ALL_SESSIONS": + case 3: + message.stepScoping = 3; + break; } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelSubReport.metadata: object expected"); - message.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.fromObject(object.metadata); + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); } return message; }; /** - * Creates a plain object from a FunnelSubReport message. Also converts values to other types if specified. + * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static - * @param {google.analytics.data.v1alpha.FunnelSubReport} message FunnelSubReport + * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelSubReport.toObject = function toObject(message, options) { + UserSequenceStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dimensionHeaders = []; - object.metricHeaders = []; - object.rows = []; - } - if (options.defaults) - object.metadata = null; - if (message.dimensionHeaders && message.dimensionHeaders.length) { - object.dimensionHeaders = []; - for (var j = 0; j < message.dimensionHeaders.length; ++j) - object.dimensionHeaders[j] = $root.google.analytics.data.v1alpha.DimensionHeader.toObject(message.dimensionHeaders[j], options); - } - if (message.metricHeaders && message.metricHeaders.length) { - object.metricHeaders = []; - for (var j = 0; j < message.metricHeaders.length; ++j) - object.metricHeaders[j] = $root.google.analytics.data.v1alpha.MetricHeader.toObject(message.metricHeaders[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.analytics.data.v1alpha.Row.toObject(message.rows[j], options); + if (options.defaults) { + object.isDirectlyFollowedBy = false; + object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.analytics.data.v1alpha.FunnelResponseMetadata.toObject(message.metadata, options); + if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) + object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; + if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) + object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); return object; }; /** - * Converts this FunnelSubReport to JSON. + * Converts this UserSequenceStep to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @instance * @returns {Object.} JSON object */ - FunnelSubReport.prototype.toJSON = function toJSON() { + UserSequenceStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelSubReport + * Gets the default type url for UserSequenceStep * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelSubReport + * @memberof google.analytics.data.v1alpha.UserSequenceStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelSubReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelSubReport"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; }; - return FunnelSubReport; + return UserSequenceStep; })(); - v1alpha.UserSegment = (function() { + v1alpha.UserSegmentExclusion = (function() { /** - * Properties of a UserSegment. + * Properties of a UserSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @interface IUserSegment - * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userInclusionCriteria] UserSegment userInclusionCriteria - * @property {google.analytics.data.v1alpha.IUserSegmentExclusion|null} [exclusion] UserSegment exclusion + * @interface IUserSegmentExclusion + * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration + * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria */ /** - * Constructs a new UserSegment. + * Constructs a new UserSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegment. - * @implements IUserSegment + * @classdesc Represents a UserSegmentExclusion. + * @implements IUserSegmentExclusion * @constructor - * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set */ - function UserSegment(properties) { + function UserSegmentExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33378,91 +36488,91 @@ } /** - * UserSegment userInclusionCriteria. - * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userInclusionCriteria - * @memberof google.analytics.data.v1alpha.UserSegment + * UserSegmentExclusion userExclusionDuration. + * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @instance */ - UserSegment.prototype.userInclusionCriteria = null; + UserSegmentExclusion.prototype.userExclusionDuration = 0; /** - * UserSegment exclusion. - * @member {google.analytics.data.v1alpha.IUserSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.UserSegment + * UserSegmentExclusion userExclusionCriteria. + * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @instance */ - UserSegment.prototype.exclusion = null; + UserSegmentExclusion.prototype.userExclusionCriteria = null; /** - * Creates a new UserSegment instance using the specified properties. + * Creates a new UserSegmentExclusion instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment instance + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance */ - UserSegment.create = function create(properties) { - return new UserSegment(properties); + UserSegmentExclusion.create = function create(properties) { + return new UserSegmentExclusion(properties); }; /** - * Encodes the specified UserSegment message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegment.encode = function encode(message, writer) { + UserSegmentExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userInclusionCriteria != null && Object.hasOwnProperty.call(message, "userInclusionCriteria")) - $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.UserSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); + if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) + $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegment.verify|verify} messages. + * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSegment} message UserSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegment.encodeDelimited = function encodeDelimited(message, writer) { + UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSegment message from the specified reader or buffer. + * Decodes a UserSegmentExclusion message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegment.decode = function decode(reader, length, error) { + UserSegmentExclusion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + message.userExclusionDuration = reader.int32(); break; } case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.decode(reader, reader.uint32()); + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); break; } default: @@ -33474,144 +36584,177 @@ }; /** - * Decodes a UserSegment message from the specified reader or buffer, length delimited. + * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegment.decodeDelimited = function decodeDelimited(reader) { + UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSegment message. + * Verifies a UserSegmentExclusion message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSegment.verify = function verify(message) { + UserSegmentExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userInclusionCriteria); - if (error) - return "userInclusionCriteria." + error; - } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentExclusion.verify(message.exclusion); + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + switch (message.userExclusionDuration) { + default: + return "userExclusionDuration: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); if (error) - return "exclusion." + error; + return "userExclusionCriteria." + error; } return null; }; /** - * Creates a UserSegment message from a plain object. Also converts values to their respective internal types. + * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegment} UserSegment + * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion */ - UserSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegment) + UserSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) return object; - var message = new $root.google.analytics.data.v1alpha.UserSegment(); - if (object.userInclusionCriteria != null) { - if (typeof object.userInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegment.userInclusionCriteria: object expected"); - message.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userInclusionCriteria); + var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + switch (object.userExclusionDuration) { + default: + if (typeof object.userExclusionDuration === "number") { + message.userExclusionDuration = object.userExclusionDuration; + break; + } + break; + case "USER_EXCLUSION_DURATION_UNSPECIFIED": + case 0: + message.userExclusionDuration = 0; + break; + case "USER_EXCLUSION_TEMPORARY": + case 1: + message.userExclusionDuration = 1; + break; + case "USER_EXCLUSION_PERMANENT": + case 2: + message.userExclusionDuration = 2; + break; } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.fromObject(object.exclusion); + if (object.userExclusionCriteria != null) { + if (typeof object.userExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); + message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); } return message; }; /** - * Creates a plain object from a UserSegment message. Also converts values to other types if specified. + * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.UserSegment} message UserSegment + * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSegment.toObject = function toObject(message, options) { + UserSegmentExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userInclusionCriteria = null; - object.exclusion = null; + object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.userExclusionCriteria = null; } - if (message.userInclusionCriteria != null && message.hasOwnProperty("userInclusionCriteria")) - object.userInclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.UserSegmentExclusion.toObject(message.exclusion, options); + if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) + object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; + if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) + object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); return object; }; /** - * Converts this UserSegment to JSON. + * Converts this UserSegmentExclusion to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @instance * @returns {Object.} JSON object */ - UserSegment.prototype.toJSON = function toJSON() { + UserSegmentExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSegment + * Gets the default type url for UserSegmentExclusion * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegment + * @memberof google.analytics.data.v1alpha.UserSegmentExclusion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegment"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; }; - return UserSegment; + return UserSegmentExclusion; })(); - v1alpha.UserSegmentCriteria = (function() { + /** + * UserExclusionDuration enum. + * @name google.analytics.data.v1alpha.UserExclusionDuration + * @enum {number} + * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value + * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value + */ + v1alpha.UserExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.SessionSegment = (function() { /** - * Properties of a UserSegmentCriteria. + * Properties of a SessionSegment. * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentCriteria - * @property {Array.|null} [andConditionGroups] UserSegmentCriteria andConditionGroups - * @property {Array.|null} [andSequenceGroups] UserSegmentCriteria andSequenceGroups + * @interface ISessionSegment + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria + * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion */ /** - * Constructs a new UserSegmentCriteria. + * Constructs a new SessionSegment. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentCriteria. - * @implements IUserSegmentCriteria + * @classdesc Represents a SessionSegment. + * @implements ISessionSegment * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set */ - function UserSegmentCriteria(properties) { - this.andConditionGroups = []; - this.andSequenceGroups = []; + function SessionSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33619,97 +36762,91 @@ } /** - * UserSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * SessionSegment sessionInclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @instance */ - UserSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + SessionSegment.prototype.sessionInclusionCriteria = null; /** - * UserSegmentCriteria andSequenceGroups. - * @member {Array.} andSequenceGroups - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * SessionSegment exclusion. + * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.SessionSegment * @instance */ - UserSegmentCriteria.prototype.andSequenceGroups = $util.emptyArray; + SessionSegment.prototype.exclusion = null; /** - * Creates a new UserSegmentCriteria instance using the specified properties. + * Creates a new SessionSegment instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria instance + * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance */ - UserSegmentCriteria.create = function create(properties) { - return new UserSegmentCriteria(properties); + SessionSegment.create = function create(properties) { + return new SessionSegment(properties); }; /** - * Encodes the specified UserSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentCriteria.encode = function encode(message, writer) { + SessionSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.andSequenceGroups != null && message.andSequenceGroups.length) - for (var i = 0; i < message.andSequenceGroups.length; ++i) - $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.encode(message.andSequenceGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentCriteria.verify|verify} messages. + * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentCriteria} message UserSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer. + * Decodes a SessionSegment message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentCriteria.decode = function decode(reader, length, error) { + SessionSegment.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.UserSegmentConditionGroup.decode(reader, reader.uint32())); + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.andSequenceGroups && message.andSequenceGroups.length)) - message.andSequenceGroups = []; - message.andSequenceGroups.push($root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.decode(reader, reader.uint32())); + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); break; } default: @@ -33721,184 +36858,142 @@ }; /** - * Decodes a UserSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes a SessionSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + SessionSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSegmentCriteria message. + * Verifies a SessionSegment message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSegmentCriteria.verify = function verify(message) { + SessionSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.verify(message.andConditionGroups[i]); - if (error) - return "andConditionGroups." + error; - } + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); + if (error) + return "sessionInclusionCriteria." + error; } - if (message.andSequenceGroups != null && message.hasOwnProperty("andSequenceGroups")) { - if (!Array.isArray(message.andSequenceGroups)) - return "andSequenceGroups: array expected"; - for (var i = 0; i < message.andSequenceGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify(message.andSequenceGroups[i]); - if (error) - return "andSequenceGroups." + error; - } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; } return null; }; /** - * Creates a UserSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentCriteria} UserSegmentCriteria + * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment */ - UserSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentCriteria) + SessionSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.fromObject(object.andConditionGroups[i]); - } + var message = new $root.google.analytics.data.v1alpha.SessionSegment(); + if (object.sessionInclusionCriteria != null) { + if (typeof object.sessionInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); + message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); } - if (object.andSequenceGroups) { - if (!Array.isArray(object.andSequenceGroups)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: array expected"); - message.andSequenceGroups = []; - for (var i = 0; i < object.andSequenceGroups.length; ++i) { - if (typeof object.andSequenceGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentCriteria.andSequenceGroups: object expected"); - message.andSequenceGroups[i] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.fromObject(object.andSequenceGroups[i]); - } + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); } return message; }; /** - * Creates a plain object from a UserSegmentCriteria message. Also converts values to other types if specified. + * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static - * @param {google.analytics.data.v1alpha.UserSegmentCriteria} message UserSegmentCriteria + * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSegmentCriteria.toObject = function toObject(message, options) { + SessionSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.andConditionGroups = []; - object.andSequenceGroups = []; - } - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentConditionGroup.toObject(message.andConditionGroups[j], options); - } - if (message.andSequenceGroups && message.andSequenceGroups.length) { - object.andSequenceGroups = []; - for (var j = 0; j < message.andSequenceGroups.length; ++j) - object.andSequenceGroups[j] = $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup.toObject(message.andSequenceGroups[j], options); + if (options.defaults) { + object.sessionInclusionCriteria = null; + object.exclusion = null; } + if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) + object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this UserSegmentCriteria to JSON. + * Converts this SessionSegment to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @instance * @returns {Object.} JSON object */ - UserSegmentCriteria.prototype.toJSON = function toJSON() { + SessionSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSegmentCriteria + * Gets the default type url for SessionSegment * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentCriteria + * @memberof google.analytics.data.v1alpha.SessionSegment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentCriteria"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; }; - return UserSegmentCriteria; - })(); - - /** - * UserCriteriaScoping enum. - * @name google.analytics.data.v1alpha.UserCriteriaScoping - * @enum {number} - * @property {number} USER_CRITERIA_SCOPING_UNSPECIFIED=0 USER_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} USER_CRITERIA_WITHIN_SAME_EVENT=1 USER_CRITERIA_WITHIN_SAME_EVENT value - * @property {number} USER_CRITERIA_WITHIN_SAME_SESSION=2 USER_CRITERIA_WITHIN_SAME_SESSION value - * @property {number} USER_CRITERIA_ACROSS_ALL_SESSIONS=3 USER_CRITERIA_ACROSS_ALL_SESSIONS value - */ - v1alpha.UserCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_CRITERIA_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "USER_CRITERIA_WITHIN_SAME_SESSION"] = 2; - values[valuesById[3] = "USER_CRITERIA_ACROSS_ALL_SESSIONS"] = 3; - return values; + return SessionSegment; })(); - v1alpha.UserSegmentConditionGroup = (function() { + v1alpha.SessionSegmentCriteria = (function() { /** - * Properties of a UserSegmentConditionGroup. + * Properties of a SessionSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentConditionGroup - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [conditionScoping] UserSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSegmentConditionGroup segmentFilterExpression + * @interface ISessionSegmentCriteria + * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups */ /** - * Constructs a new UserSegmentConditionGroup. + * Constructs a new SessionSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentConditionGroup. - * @implements IUserSegmentConditionGroup + * @classdesc Represents a SessionSegmentCriteria. + * @implements ISessionSegmentCriteria * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set */ - function UserSegmentConditionGroup(properties) { + function SessionSegmentCriteria(properties) { + this.andConditionGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33906,91 +37001,80 @@ } /** - * UserSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup - * @instance - */ - UserSegmentConditionGroup.prototype.conditionScoping = 0; - - /** - * UserSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * SessionSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @instance */ - UserSegmentConditionGroup.prototype.segmentFilterExpression = null; + SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; /** - * Creates a new UserSegmentConditionGroup instance using the specified properties. + * Creates a new SessionSegmentCriteria instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup instance + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance */ - UserSegmentConditionGroup.create = function create(properties) { - return new UserSegmentConditionGroup(properties); + SessionSegmentCriteria.create = function create(properties) { + return new SessionSegmentCriteria(properties); }; /** - * Encodes the specified UserSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentConditionGroup.encode = function encode(message, writer) { + SessionSegmentCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentConditionGroup.verify|verify} messages. + * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.IUserSegmentConditionGroup} message UserSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer. + * Decodes a SessionSegmentCriteria message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentConditionGroup.decode = function decode(reader, length, error) { + SessionSegmentCriteria.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); while (reader.pos < end) { var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.conditionScoping = reader.int32(); - break; - } - case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); break; } default: @@ -34002,168 +37086,156 @@ }; /** - * Decodes a UserSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSegmentConditionGroup message. + * Verifies a SessionSegmentCriteria message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSegmentConditionGroup.verify = function verify(message) { + SessionSegmentCriteria.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { - default: - return "conditionScoping: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); - if (error) - return "segmentFilterExpression." + error; } return null; }; /** - * Creates a UserSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentConditionGroup} UserSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria */ - UserSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentConditionGroup) + SessionSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentConditionGroup(); - switch (object.conditionScoping) { - default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; - break; + var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); } - break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.conditionScoping = 0; - break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.conditionScoping = 1; - break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.conditionScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.conditionScoping = 3; - break; - } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); } return message; }; /** - * Creates a plain object from a UserSegmentConditionGroup message. Also converts values to other types if specified. + * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.UserSegmentConditionGroup} message UserSegmentConditionGroup + * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSegmentConditionGroup.toObject = function toObject(message, options) { + SessionSegmentCriteria.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.conditionScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); return object; }; /** - * Converts this UserSegmentConditionGroup to JSON. + * Converts this SessionSegmentCriteria to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @instance * @returns {Object.} JSON object */ - UserSegmentConditionGroup.prototype.toJSON = function toJSON() { + SessionSegmentCriteria.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSegmentConditionGroup + * Gets the default type url for SessionSegmentCriteria * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentConditionGroup"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; }; - return UserSegmentConditionGroup; + return SessionSegmentCriteria; })(); - v1alpha.UserSegmentSequenceGroup = (function() { + /** + * SessionCriteriaScoping enum. + * @name google.analytics.data.v1alpha.SessionCriteriaScoping + * @enum {number} + * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value + * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value + */ + v1alpha.SessionCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; + return values; + })(); + + v1alpha.SessionSegmentConditionGroup = (function() { /** - * Properties of a UserSegmentSequenceGroup. + * Properties of a SessionSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentSequenceGroup - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [sequenceScoping] UserSegmentSequenceGroup sequenceScoping - * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] UserSegmentSequenceGroup sequenceMaximumDuration - * @property {Array.|null} [userSequenceSteps] UserSegmentSequenceGroup userSequenceSteps + * @interface ISessionSegmentConditionGroup + * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression */ /** - * Constructs a new UserSegmentSequenceGroup. + * Constructs a new SessionSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentSequenceGroup. - * @implements IUserSegmentSequenceGroup + * @classdesc Represents a SessionSegmentConditionGroup. + * @implements ISessionSegmentConditionGroup * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set */ - function UserSegmentSequenceGroup(properties) { - this.userSequenceSteps = []; + function SessionSegmentConditionGroup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34171,108 +37243,91 @@ } /** - * UserSegmentSequenceGroup sequenceScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} sequenceScoping - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup - * @instance - */ - UserSegmentSequenceGroup.prototype.sequenceScoping = 0; - - /** - * UserSegmentSequenceGroup sequenceMaximumDuration. - * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * SessionSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @instance */ - UserSegmentSequenceGroup.prototype.sequenceMaximumDuration = null; + SessionSegmentConditionGroup.prototype.conditionScoping = 0; /** - * UserSegmentSequenceGroup userSequenceSteps. - * @member {Array.} userSequenceSteps - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * SessionSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @instance */ - UserSegmentSequenceGroup.prototype.userSequenceSteps = $util.emptyArray; + SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; /** - * Creates a new UserSegmentSequenceGroup instance using the specified properties. + * Creates a new SessionSegmentConditionGroup instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup instance + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance */ - UserSegmentSequenceGroup.create = function create(properties) { - return new UserSegmentSequenceGroup(properties); + SessionSegmentConditionGroup.create = function create(properties) { + return new SessionSegmentConditionGroup(properties); }; /** - * Encodes the specified UserSegmentSequenceGroup message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentSequenceGroup.encode = function encode(message, writer) { + SessionSegmentConditionGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sequenceScoping != null && Object.hasOwnProperty.call(message, "sequenceScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sequenceScoping); - if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) - $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.userSequenceSteps != null && message.userSequenceSteps.length) - for (var i = 0; i < message.userSequenceSteps.length; ++i) - $root.google.analytics.data.v1alpha.UserSequenceStep.encode(message.userSequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSegmentSequenceGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentSequenceGroup.verify|verify} messages. + * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.IUserSegmentSequenceGroup} message UserSegmentSequenceGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentSequenceGroup.encodeDelimited = function encodeDelimited(message, writer) { + SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer. + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentSequenceGroup.decode = function decode(reader, length, error) { + SessionSegmentConditionGroup.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.sequenceScoping = reader.int32(); + message.conditionScoping = reader.int32(); break; } case 2: { - message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.userSequenceSteps && message.userSequenceSteps.length)) - message.userSequenceSteps = []; - message.userSequenceSteps.push($root.google.analytics.data.v1alpha.UserSequenceStep.decode(reader, reader.uint32())); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -34284,193 +37339,161 @@ }; /** - * Decodes a UserSegmentSequenceGroup message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentSequenceGroup.decodeDelimited = function decodeDelimited(reader) { + SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSegmentSequenceGroup message. + * Verifies a SessionSegmentConditionGroup message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSegmentSequenceGroup.verify = function verify(message) { + SessionSegmentConditionGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) - switch (message.sequenceScoping) { + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { default: - return "sequenceScoping: enum value expected"; + return "conditionScoping: 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 (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); if (error) - return "sequenceMaximumDuration." + error; - } - if (message.userSequenceSteps != null && message.hasOwnProperty("userSequenceSteps")) { - if (!Array.isArray(message.userSequenceSteps)) - return "userSequenceSteps: array expected"; - for (var i = 0; i < message.userSequenceSteps.length; ++i) { - var error = $root.google.analytics.data.v1alpha.UserSequenceStep.verify(message.userSequenceSteps[i]); - if (error) - return "userSequenceSteps." + error; - } + return "segmentFilterExpression." + error; } return null; }; /** - * Creates a UserSegmentSequenceGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentSequenceGroup} UserSegmentSequenceGroup + * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup */ - UserSegmentSequenceGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup) + SessionSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentSequenceGroup(); - switch (object.sequenceScoping) { + var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + switch (object.conditionScoping) { default: - if (typeof object.sequenceScoping === "number") { - message.sequenceScoping = object.sequenceScoping; + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; break; } break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": case 0: - message.sequenceScoping = 0; + message.conditionScoping = 0; break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": + case "SESSION_CRITERIA_WITHIN_SAME_EVENT": case 1: - message.sequenceScoping = 1; + message.conditionScoping = 1; break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": + case "SESSION_CRITERIA_WITHIN_SAME_SESSION": case 2: - message.sequenceScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.sequenceScoping = 3; + message.conditionScoping = 2; break; } - if (object.sequenceMaximumDuration != null) { - if (typeof object.sequenceMaximumDuration !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.sequenceMaximumDuration: object expected"); - message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); - } - if (object.userSequenceSteps) { - if (!Array.isArray(object.userSequenceSteps)) - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: array expected"); - message.userSequenceSteps = []; - for (var i = 0; i < object.userSequenceSteps.length; ++i) { - if (typeof object.userSequenceSteps[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentSequenceGroup.userSequenceSteps: object expected"); - message.userSequenceSteps[i] = $root.google.analytics.data.v1alpha.UserSequenceStep.fromObject(object.userSequenceSteps[i]); - } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); } return message; }; /** - * Creates a plain object from a UserSegmentSequenceGroup message. Also converts values to other types if specified. + * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.UserSegmentSequenceGroup} message UserSegmentSequenceGroup + * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSegmentSequenceGroup.toObject = function toObject(message, options) { + SessionSegmentConditionGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.userSequenceSteps = []; if (options.defaults) { - object.sequenceScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.sequenceMaximumDuration = null; - } - if (message.sequenceScoping != null && message.hasOwnProperty("sequenceScoping")) - object.sequenceScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] === undefined ? message.sequenceScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.sequenceScoping] : message.sequenceScoping; - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) - object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); - if (message.userSequenceSteps && message.userSequenceSteps.length) { - object.userSequenceSteps = []; - for (var j = 0; j < message.userSequenceSteps.length; ++j) - object.userSequenceSteps[j] = $root.google.analytics.data.v1alpha.UserSequenceStep.toObject(message.userSequenceSteps[j], options); + object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); return object; }; /** - * Converts this UserSegmentSequenceGroup to JSON. + * Converts this SessionSegmentConditionGroup to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @instance * @returns {Object.} JSON object */ - UserSegmentSequenceGroup.prototype.toJSON = function toJSON() { + SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSegmentSequenceGroup + * Gets the default type url for SessionSegmentConditionGroup * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentSequenceGroup + * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSegmentSequenceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentSequenceGroup"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; }; - return UserSegmentSequenceGroup; + return SessionSegmentConditionGroup; })(); - v1alpha.UserSequenceStep = (function() { + v1alpha.SessionSegmentExclusion = (function() { /** - * Properties of a UserSequenceStep. + * Properties of a SessionSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @interface IUserSequenceStep - * @property {boolean|null} [isDirectlyFollowedBy] UserSequenceStep isDirectlyFollowedBy - * @property {google.analytics.data.v1alpha.UserCriteriaScoping|null} [stepScoping] UserSequenceStep stepScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] UserSequenceStep segmentFilterExpression + * @interface ISessionSegmentExclusion + * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration + * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria */ /** - * Constructs a new UserSequenceStep. + * Constructs a new SessionSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSequenceStep. - * @implements IUserSequenceStep + * @classdesc Represents a SessionSegmentExclusion. + * @implements ISessionSegmentExclusion * @constructor - * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set */ - function UserSequenceStep(properties) { + function SessionSegmentExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34478,105 +37501,91 @@ } /** - * UserSequenceStep isDirectlyFollowedBy. - * @member {boolean} isDirectlyFollowedBy - * @memberof google.analytics.data.v1alpha.UserSequenceStep - * @instance - */ - UserSequenceStep.prototype.isDirectlyFollowedBy = false; - - /** - * UserSequenceStep stepScoping. - * @member {google.analytics.data.v1alpha.UserCriteriaScoping} stepScoping - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * SessionSegmentExclusion sessionExclusionDuration. + * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @instance */ - UserSequenceStep.prototype.stepScoping = 0; + SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; /** - * UserSequenceStep segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * SessionSegmentExclusion sessionExclusionCriteria. + * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @instance */ - UserSequenceStep.prototype.segmentFilterExpression = null; + SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; /** - * Creates a new UserSequenceStep instance using the specified properties. + * Creates a new SessionSegmentExclusion instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep instance + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance */ - UserSequenceStep.create = function create(properties) { - return new UserSequenceStep(properties); + SessionSegmentExclusion.create = function create(properties) { + return new SessionSegmentExclusion(properties); }; /** - * Encodes the specified UserSequenceStep message. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSequenceStep.encode = function encode(message, writer) { + SessionSegmentExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.isDirectlyFollowedBy != null && Object.hasOwnProperty.call(message, "isDirectlyFollowedBy")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDirectlyFollowedBy); - if (message.stepScoping != null && Object.hasOwnProperty.call(message, "stepScoping")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stepScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); + if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) + $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSequenceStep message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSequenceStep.verify|verify} messages. + * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.IUserSequenceStep} message UserSequenceStep message or plain object to encode + * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSequenceStep message from the specified reader or buffer. + * Decodes a SessionSegmentExclusion message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSequenceStep.decode = function decode(reader, length, error) { + SessionSegmentExclusion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.isDirectlyFollowedBy = reader.bool(); + message.sessionExclusionDuration = reader.int32(); break; } case 2: { - message.stepScoping = reader.int32(); - break; - } - case 3: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); break; } default: @@ -34588,174 +37597,177 @@ }; /** - * Decodes a UserSequenceStep message from the specified reader or buffer, length delimited. + * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSequenceStep.decodeDelimited = function decodeDelimited(reader) { + SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSequenceStep message. + * Verifies a SessionSegmentExclusion message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSequenceStep.verify = function verify(message) { + SessionSegmentExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - if (typeof message.isDirectlyFollowedBy !== "boolean") - return "isDirectlyFollowedBy: boolean expected"; - if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) - switch (message.stepScoping) { + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + switch (message.sessionExclusionDuration) { default: - return "stepScoping: enum value expected"; + return "sessionExclusionDuration: enum value expected"; case 0: case 1: case 2: - case 3: break; } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); if (error) - return "segmentFilterExpression." + error; + return "sessionExclusionCriteria." + error; } return null; }; /** - * Creates a UserSequenceStep message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSequenceStep} UserSequenceStep + * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion */ - UserSequenceStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSequenceStep) + SessionSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) return object; - var message = new $root.google.analytics.data.v1alpha.UserSequenceStep(); - if (object.isDirectlyFollowedBy != null) - message.isDirectlyFollowedBy = Boolean(object.isDirectlyFollowedBy); - switch (object.stepScoping) { + var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + switch (object.sessionExclusionDuration) { default: - if (typeof object.stepScoping === "number") { - message.stepScoping = object.stepScoping; + if (typeof object.sessionExclusionDuration === "number") { + message.sessionExclusionDuration = object.sessionExclusionDuration; break; } break; - case "USER_CRITERIA_SCOPING_UNSPECIFIED": + case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": case 0: - message.stepScoping = 0; + message.sessionExclusionDuration = 0; break; - case "USER_CRITERIA_WITHIN_SAME_EVENT": + case "SESSION_EXCLUSION_TEMPORARY": case 1: - message.stepScoping = 1; + message.sessionExclusionDuration = 1; break; - case "USER_CRITERIA_WITHIN_SAME_SESSION": + case "SESSION_EXCLUSION_PERMANENT": case 2: - message.stepScoping = 2; - break; - case "USER_CRITERIA_ACROSS_ALL_SESSIONS": - case 3: - message.stepScoping = 3; + message.sessionExclusionDuration = 2; break; } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSequenceStep.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + if (object.sessionExclusionCriteria != null) { + if (typeof object.sessionExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); + message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); } return message; }; /** - * Creates a plain object from a UserSequenceStep message. Also converts values to other types if specified. + * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.UserSequenceStep} message UserSequenceStep + * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSequenceStep.toObject = function toObject(message, options) { + SessionSegmentExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.isDirectlyFollowedBy = false; - object.stepScoping = options.enums === String ? "USER_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; + object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.sessionExclusionCriteria = null; } - if (message.isDirectlyFollowedBy != null && message.hasOwnProperty("isDirectlyFollowedBy")) - object.isDirectlyFollowedBy = message.isDirectlyFollowedBy; - if (message.stepScoping != null && message.hasOwnProperty("stepScoping")) - object.stepScoping = options.enums === String ? $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] === undefined ? message.stepScoping : $root.google.analytics.data.v1alpha.UserCriteriaScoping[message.stepScoping] : message.stepScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) + object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; + if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) + object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); return object; }; /** - * Converts this UserSequenceStep to JSON. + * Converts this SessionSegmentExclusion to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @instance * @returns {Object.} JSON object */ - UserSequenceStep.prototype.toJSON = function toJSON() { + SessionSegmentExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSequenceStep + * Gets the default type url for SessionSegmentExclusion * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSequenceStep + * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSequenceStep"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; }; - return UserSequenceStep; + return SessionSegmentExclusion; })(); - v1alpha.UserSegmentExclusion = (function() { + /** + * SessionExclusionDuration enum. + * @name google.analytics.data.v1alpha.SessionExclusionDuration + * @enum {number} + * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value + * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value + */ + v1alpha.SessionExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; + values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; + return values; + })(); + + v1alpha.EventSegment = (function() { /** - * Properties of a UserSegmentExclusion. + * Properties of an EventSegment. * @memberof google.analytics.data.v1alpha - * @interface IUserSegmentExclusion - * @property {google.analytics.data.v1alpha.UserExclusionDuration|null} [userExclusionDuration] UserSegmentExclusion userExclusionDuration - * @property {google.analytics.data.v1alpha.IUserSegmentCriteria|null} [userExclusionCriteria] UserSegmentExclusion userExclusionCriteria + * @interface IEventSegment + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria + * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion */ /** - * Constructs a new UserSegmentExclusion. + * Constructs a new EventSegment. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a UserSegmentExclusion. - * @implements IUserSegmentExclusion + * @classdesc Represents an EventSegment. + * @implements IEventSegment * @constructor - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set */ - function UserSegmentExclusion(properties) { + function EventSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34763,91 +37775,91 @@ } /** - * UserSegmentExclusion userExclusionDuration. - * @member {google.analytics.data.v1alpha.UserExclusionDuration} userExclusionDuration - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * EventSegment eventInclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegment * @instance */ - UserSegmentExclusion.prototype.userExclusionDuration = 0; + EventSegment.prototype.eventInclusionCriteria = null; /** - * UserSegmentExclusion userExclusionCriteria. - * @member {google.analytics.data.v1alpha.IUserSegmentCriteria|null|undefined} userExclusionCriteria - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * EventSegment exclusion. + * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @instance */ - UserSegmentExclusion.prototype.userExclusionCriteria = null; + EventSegment.prototype.exclusion = null; /** - * Creates a new UserSegmentExclusion instance using the specified properties. + * Creates a new EventSegment instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion instance + * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance */ - UserSegmentExclusion.create = function create(properties) { - return new UserSegmentExclusion(properties); + EventSegment.create = function create(properties) { + return new EventSegment(properties); }; /** - * Encodes the specified UserSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentExclusion.encode = function encode(message, writer) { + EventSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userExclusionDuration != null && Object.hasOwnProperty.call(message, "userExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userExclusionDuration); - if (message.userExclusionCriteria != null && Object.hasOwnProperty.call(message, "userExclusionCriteria")) - $root.google.analytics.data.v1alpha.UserSegmentCriteria.encode(message.userExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) + $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UserSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.UserSegmentExclusion.verify|verify} messages. + * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static - * @param {google.analytics.data.v1alpha.IUserSegmentExclusion} message UserSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + EventSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer. + * Decodes an EventSegment message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentExclusion.decode = function decode(reader, length, error) { + EventSegment.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.userExclusionDuration = reader.int32(); + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); break; } case 2: { - message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.decode(reader, reader.uint32()); + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); break; } default: @@ -34859,177 +37871,142 @@ }; /** - * Decodes a UserSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes an EventSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + EventSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserSegmentExclusion message. + * Verifies an EventSegment message. * @function verify - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserSegmentExclusion.verify = function verify(message) { + EventSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) - switch (message.userExclusionDuration) { - default: - return "userExclusionDuration: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.UserSegmentCriteria.verify(message.userExclusionCriteria); + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); if (error) - return "userExclusionCriteria." + error; + return "eventInclusionCriteria." + error; + } + if (message.exclusion != null && message.hasOwnProperty("exclusion")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); + if (error) + return "exclusion." + error; } return null; }; /** - * Creates a UserSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.UserSegmentExclusion} UserSegmentExclusion + * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment */ - UserSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.UserSegmentExclusion) + EventSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) return object; - var message = new $root.google.analytics.data.v1alpha.UserSegmentExclusion(); - switch (object.userExclusionDuration) { - default: - if (typeof object.userExclusionDuration === "number") { - message.userExclusionDuration = object.userExclusionDuration; - break; - } - break; - case "USER_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.userExclusionDuration = 0; - break; - case "USER_EXCLUSION_TEMPORARY": - case 1: - message.userExclusionDuration = 1; - break; - case "USER_EXCLUSION_PERMANENT": - case 2: - message.userExclusionDuration = 2; - break; + var message = new $root.google.analytics.data.v1alpha.EventSegment(); + if (object.eventInclusionCriteria != null) { + if (typeof object.eventInclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); + message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); } - if (object.userExclusionCriteria != null) { - if (typeof object.userExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.UserSegmentExclusion.userExclusionCriteria: object expected"); - message.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.fromObject(object.userExclusionCriteria); + if (object.exclusion != null) { + if (typeof object.exclusion !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); + message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); } return message; }; /** - * Creates a plain object from a UserSegmentExclusion message. Also converts values to other types if specified. + * Creates a plain object from an EventSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static - * @param {google.analytics.data.v1alpha.UserSegmentExclusion} message UserSegmentExclusion + * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserSegmentExclusion.toObject = function toObject(message, options) { + EventSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userExclusionDuration = options.enums === String ? "USER_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.userExclusionCriteria = null; + object.eventInclusionCriteria = null; + object.exclusion = null; } - if (message.userExclusionDuration != null && message.hasOwnProperty("userExclusionDuration")) - object.userExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] === undefined ? message.userExclusionDuration : $root.google.analytics.data.v1alpha.UserExclusionDuration[message.userExclusionDuration] : message.userExclusionDuration; - if (message.userExclusionCriteria != null && message.hasOwnProperty("userExclusionCriteria")) - object.userExclusionCriteria = $root.google.analytics.data.v1alpha.UserSegmentCriteria.toObject(message.userExclusionCriteria, options); + if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) + object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); + if (message.exclusion != null && message.hasOwnProperty("exclusion")) + object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this UserSegmentExclusion to JSON. + * Converts this EventSegment to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @instance * @returns {Object.} JSON object */ - UserSegmentExclusion.prototype.toJSON = function toJSON() { + EventSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserSegmentExclusion + * Gets the default type url for EventSegment * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.UserSegmentExclusion + * @memberof google.analytics.data.v1alpha.EventSegment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.UserSegmentExclusion"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; }; - return UserSegmentExclusion; - })(); - - /** - * UserExclusionDuration enum. - * @name google.analytics.data.v1alpha.UserExclusionDuration - * @enum {number} - * @property {number} USER_EXCLUSION_DURATION_UNSPECIFIED=0 USER_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} USER_EXCLUSION_TEMPORARY=1 USER_EXCLUSION_TEMPORARY value - * @property {number} USER_EXCLUSION_PERMANENT=2 USER_EXCLUSION_PERMANENT value - */ - v1alpha.UserExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_EXCLUSION_TEMPORARY"] = 1; - values[valuesById[2] = "USER_EXCLUSION_PERMANENT"] = 2; - return values; + return EventSegment; })(); - v1alpha.SessionSegment = (function() { + v1alpha.EventSegmentCriteria = (function() { /** - * Properties of a SessionSegment. + * Properties of an EventSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @interface ISessionSegment - * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionInclusionCriteria] SessionSegment sessionInclusionCriteria - * @property {google.analytics.data.v1alpha.ISessionSegmentExclusion|null} [exclusion] SessionSegment exclusion + * @interface IEventSegmentCriteria + * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups */ /** - * Constructs a new SessionSegment. + * Constructs a new EventSegmentCriteria. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegment. - * @implements ISessionSegment + * @classdesc Represents an EventSegmentCriteria. + * @implements IEventSegmentCriteria * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set */ - function SessionSegment(properties) { + function EventSegmentCriteria(properties) { + this.andConditionGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35037,91 +38014,80 @@ } /** - * SessionSegment sessionInclusionCriteria. - * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionInclusionCriteria - * @memberof google.analytics.data.v1alpha.SessionSegment - * @instance - */ - SessionSegment.prototype.sessionInclusionCriteria = null; - - /** - * SessionSegment exclusion. - * @member {google.analytics.data.v1alpha.ISessionSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.SessionSegment + * EventSegmentCriteria andConditionGroups. + * @member {Array.} andConditionGroups + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @instance */ - SessionSegment.prototype.exclusion = null; + EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; /** - * Creates a new SessionSegment instance using the specified properties. + * Creates a new EventSegmentCriteria instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.ISessionSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment instance + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance */ - SessionSegment.create = function create(properties) { - return new SessionSegment(properties); + EventSegmentCriteria.create = function create(properties) { + return new EventSegmentCriteria(properties); }; /** - * Encodes the specified SessionSegment message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegment.encode = function encode(message, writer) { + EventSegmentCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionInclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionInclusionCriteria")) - $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.SessionSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.andConditionGroups != null && message.andConditionGroups.length) + for (var i = 0; i < message.andConditionGroups.length; ++i) + $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegment.verify|verify} messages. + * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.ISessionSegment} message SessionSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegment.encodeDelimited = function encodeDelimited(message, writer) { + EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionSegment message from the specified reader or buffer. + * Decodes an EventSegmentCriteria message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegment.decode = function decode(reader, length, error) { + EventSegmentCriteria.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); - break; - } - case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.decode(reader, reader.uint32()); + if (!(message.andConditionGroups && message.andConditionGroups.length)) + message.andConditionGroups = []; + message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); break; } default: @@ -35133,142 +38099,154 @@ }; /** - * Decodes a SessionSegment message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegment.decodeDelimited = function decodeDelimited(reader) { + EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionSegment message. + * Verifies an EventSegmentCriteria message. * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionSegment.verify = function verify(message) { + EventSegmentCriteria.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionInclusionCriteria); - if (error) - return "sessionInclusionCriteria." + error; - } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; + if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { + if (!Array.isArray(message.andConditionGroups)) + return "andConditionGroups: array expected"; + for (var i = 0; i < message.andConditionGroups.length; ++i) { + var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (error) + return "andConditionGroups." + error; + } } return null; }; /** - * Creates a SessionSegment message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegment} SessionSegment + * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria */ - SessionSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegment) + EventSegmentCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegment(); - if (object.sessionInclusionCriteria != null) { - if (typeof object.sessionInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegment.sessionInclusionCriteria: object expected"); - message.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionInclusionCriteria); - } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.fromObject(object.exclusion); + var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + if (object.andConditionGroups) { + if (!Array.isArray(object.andConditionGroups)) + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); + message.andConditionGroups = []; + for (var i = 0; i < object.andConditionGroups.length; ++i) { + if (typeof object.andConditionGroups[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); + message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + } } return message; }; /** - * Creates a plain object from a SessionSegment message. Also converts values to other types if specified. + * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static - * @param {google.analytics.data.v1alpha.SessionSegment} message SessionSegment + * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionSegment.toObject = function toObject(message, options) { + EventSegmentCriteria.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sessionInclusionCriteria = null; - object.exclusion = null; + if (options.arrays || options.defaults) + object.andConditionGroups = []; + if (message.andConditionGroups && message.andConditionGroups.length) { + object.andConditionGroups = []; + for (var j = 0; j < message.andConditionGroups.length; ++j) + object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); } - if (message.sessionInclusionCriteria != null && message.hasOwnProperty("sessionInclusionCriteria")) - object.sessionInclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.SessionSegmentExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this SessionSegment to JSON. + * Converts this EventSegmentCriteria to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @instance * @returns {Object.} JSON object */ - SessionSegment.prototype.toJSON = function toJSON() { + EventSegmentCriteria.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionSegment + * Gets the default type url for EventSegmentCriteria * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegment + * @memberof google.analytics.data.v1alpha.EventSegmentCriteria * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegment"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; }; - return SessionSegment; + return EventSegmentCriteria; })(); - v1alpha.SessionSegmentCriteria = (function() { + /** + * EventCriteriaScoping enum. + * @name google.analytics.data.v1alpha.EventCriteriaScoping + * @enum {number} + * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value + * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value + */ + v1alpha.EventCriteriaScoping = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; + return values; + })(); + + v1alpha.EventSegmentConditionGroup = (function() { /** - * Properties of a SessionSegmentCriteria. + * Properties of an EventSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentCriteria - * @property {Array.|null} [andConditionGroups] SessionSegmentCriteria andConditionGroups + * @interface IEventSegmentConditionGroup + * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression */ /** - * Constructs a new SessionSegmentCriteria. + * Constructs a new EventSegmentConditionGroup. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentCriteria. - * @implements ISessionSegmentCriteria + * @classdesc Represents an EventSegmentConditionGroup. + * @implements IEventSegmentConditionGroup * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set */ - function SessionSegmentCriteria(properties) { - this.andConditionGroups = []; + function EventSegmentConditionGroup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35276,80 +38254,91 @@ } /** - * SessionSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * EventSegmentConditionGroup conditionScoping. + * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @instance */ - SessionSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + EventSegmentConditionGroup.prototype.conditionScoping = 0; /** - * Creates a new SessionSegmentCriteria instance using the specified properties. + * EventSegmentConditionGroup segmentFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @instance + */ + EventSegmentConditionGroup.prototype.segmentFilterExpression = null; + + /** + * Creates a new EventSegmentConditionGroup instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria instance + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance */ - SessionSegmentCriteria.create = function create(properties) { - return new SessionSegmentCriteria(properties); + EventSegmentConditionGroup.create = function create(properties) { + return new EventSegmentConditionGroup(properties); }; /** - * Encodes the specified SessionSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentCriteria.encode = function encode(message, writer) { + EventSegmentConditionGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); + if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentCriteria.verify|verify} messages. + * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentCriteria} message SessionSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer. + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentCriteria.decode = function decode(reader, length, error) { + EventSegmentConditionGroup.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.decode(reader, reader.uint32())); + message.conditionScoping = reader.int32(); + break; + } + case 2: { + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -35361,156 +38350,156 @@ }; /** - * Decodes a SessionSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionSegmentCriteria message. + * Verifies an EventSegmentConditionGroup message. * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionSegmentCriteria.verify = function verify(message) { + EventSegmentConditionGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify(message.andConditionGroups[i]); - if (error) - return "andConditionGroups." + error; + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + switch (message.conditionScoping) { + default: + return "conditionScoping: enum value expected"; + case 0: + case 1: + break; } + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (error) + return "segmentFilterExpression." + error; } return null; }; /** - * Creates a SessionSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentCriteria} SessionSegmentCriteria + * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup */ - SessionSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentCriteria) + EventSegmentConditionGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + switch (object.conditionScoping) { + default: + if (typeof object.conditionScoping === "number") { + message.conditionScoping = object.conditionScoping; + break; } + break; + case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": + case 0: + message.conditionScoping = 0; + break; + case "EVENT_CRITERIA_WITHIN_SAME_EVENT": + case 1: + message.conditionScoping = 1; + break; + } + if (object.segmentFilterExpression != null) { + if (typeof object.segmentFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); + message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); } return message; }; /** - * Creates a plain object from a SessionSegmentCriteria message. Also converts values to other types if specified. + * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static - * @param {google.analytics.data.v1alpha.SessionSegmentCriteria} message SessionSegmentCriteria + * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionSegmentCriteria.toObject = function toObject(message, options) { + EventSegmentConditionGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.andConditionGroups = []; - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + if (options.defaults) { + object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; + object.segmentFilterExpression = null; } + if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) + object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; + if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) + object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); return object; }; /** - * Converts this SessionSegmentCriteria to JSON. + * Converts this EventSegmentConditionGroup to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @instance * @returns {Object.} JSON object */ - SessionSegmentCriteria.prototype.toJSON = function toJSON() { + EventSegmentConditionGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionSegmentCriteria + * Gets the default type url for EventSegmentConditionGroup * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentCriteria"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; }; - return SessionSegmentCriteria; - })(); - - /** - * SessionCriteriaScoping enum. - * @name google.analytics.data.v1alpha.SessionCriteriaScoping - * @enum {number} - * @property {number} SESSION_CRITERIA_SCOPING_UNSPECIFIED=0 SESSION_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} SESSION_CRITERIA_WITHIN_SAME_EVENT=1 SESSION_CRITERIA_WITHIN_SAME_EVENT value - * @property {number} SESSION_CRITERIA_WITHIN_SAME_SESSION=2 SESSION_CRITERIA_WITHIN_SAME_SESSION value - */ - v1alpha.SessionCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SESSION_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "SESSION_CRITERIA_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "SESSION_CRITERIA_WITHIN_SAME_SESSION"] = 2; - return values; + return EventSegmentConditionGroup; })(); - v1alpha.SessionSegmentConditionGroup = (function() { + v1alpha.EventSegmentExclusion = (function() { /** - * Properties of a SessionSegmentConditionGroup. + * Properties of an EventSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentConditionGroup - * @property {google.analytics.data.v1alpha.SessionCriteriaScoping|null} [conditionScoping] SessionSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] SessionSegmentConditionGroup segmentFilterExpression + * @interface IEventSegmentExclusion + * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration + * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria */ /** - * Constructs a new SessionSegmentConditionGroup. + * Constructs a new EventSegmentExclusion. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentConditionGroup. - * @implements ISessionSegmentConditionGroup + * @classdesc Represents an EventSegmentExclusion. + * @implements IEventSegmentExclusion * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set */ - function SessionSegmentConditionGroup(properties) { + function EventSegmentExclusion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35518,91 +38507,91 @@ } /** - * SessionSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.SessionCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * EventSegmentExclusion eventExclusionDuration. + * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @instance */ - SessionSegmentConditionGroup.prototype.conditionScoping = 0; + EventSegmentExclusion.prototype.eventExclusionDuration = 0; /** - * SessionSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * EventSegmentExclusion eventExclusionCriteria. + * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @instance */ - SessionSegmentConditionGroup.prototype.segmentFilterExpression = null; + EventSegmentExclusion.prototype.eventExclusionCriteria = null; /** - * Creates a new SessionSegmentConditionGroup instance using the specified properties. + * Creates a new EventSegmentExclusion instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup instance + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance */ - SessionSegmentConditionGroup.create = function create(properties) { - return new SessionSegmentConditionGroup(properties); + EventSegmentExclusion.create = function create(properties) { + return new EventSegmentExclusion(properties); }; /** - * Encodes the specified SessionSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentConditionGroup.encode = function encode(message, writer) { + EventSegmentExclusion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); + if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) + $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentConditionGroup.verify|verify} messages. + * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentConditionGroup} message SessionSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer. + * Decodes an EventSegmentExclusion message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentConditionGroup.decode = function decode(reader, length, error) { + EventSegmentExclusion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.conditionScoping = reader.int32(); + message.eventExclusionDuration = reader.int32(); break; } case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); break; } default: @@ -35614,161 +38603,172 @@ }; /** - * Decodes a SessionSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionSegmentConditionGroup message. + * Verifies an EventSegmentExclusion message. * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionSegmentConditionGroup.verify = function verify(message) { + EventSegmentExclusion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + switch (message.eventExclusionDuration) { default: - return "conditionScoping: enum value expected"; + return "eventExclusionDuration: enum value expected"; case 0: case 1: - case 2: break; } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { + var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); if (error) - return "segmentFilterExpression." + error; + return "eventExclusionCriteria." + error; } return null; }; /** - * Creates a SessionSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentConditionGroup} SessionSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion */ - SessionSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup) + EventSegmentExclusion.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentConditionGroup(); - switch (object.conditionScoping) { + var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + switch (object.eventExclusionDuration) { default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; + if (typeof object.eventExclusionDuration === "number") { + message.eventExclusionDuration = object.eventExclusionDuration; break; } break; - case "SESSION_CRITERIA_SCOPING_UNSPECIFIED": + case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": case 0: - message.conditionScoping = 0; + message.eventExclusionDuration = 0; break; - case "SESSION_CRITERIA_WITHIN_SAME_EVENT": + case "EVENT_EXCLUSION_PERMANENT": case 1: - message.conditionScoping = 1; - break; - case "SESSION_CRITERIA_WITHIN_SAME_SESSION": - case 2: - message.conditionScoping = 2; + message.eventExclusionDuration = 1; break; } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + if (object.eventExclusionCriteria != null) { + if (typeof object.eventExclusionCriteria !== "object") + throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); + message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); } return message; }; /** - * Creates a plain object from a SessionSegmentConditionGroup message. Also converts values to other types if specified. + * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static - * @param {google.analytics.data.v1alpha.SessionSegmentConditionGroup} message SessionSegmentConditionGroup + * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionSegmentConditionGroup.toObject = function toObject(message, options) { + EventSegmentExclusion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conditionScoping = options.enums === String ? "SESSION_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; + object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; + object.eventExclusionCriteria = null; } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.SessionCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) + object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; + if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) + object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); return object; }; /** - * Converts this SessionSegmentConditionGroup to JSON. + * Converts this EventSegmentExclusion to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @instance * @returns {Object.} JSON object */ - SessionSegmentConditionGroup.prototype.toJSON = function toJSON() { + EventSegmentExclusion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionSegmentConditionGroup + * Gets the default type url for EventSegmentExclusion * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.EventSegmentExclusion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentConditionGroup"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; }; - return SessionSegmentConditionGroup; + return EventSegmentExclusion; })(); - v1alpha.SessionSegmentExclusion = (function() { + /** + * EventExclusionDuration enum. + * @name google.analytics.data.v1alpha.EventExclusionDuration + * @enum {number} + * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value + * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value + */ + v1alpha.EventExclusionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; + return values; + })(); + + v1alpha.Segment = (function() { /** - * Properties of a SessionSegmentExclusion. + * Properties of a Segment. * @memberof google.analytics.data.v1alpha - * @interface ISessionSegmentExclusion - * @property {google.analytics.data.v1alpha.SessionExclusionDuration|null} [sessionExclusionDuration] SessionSegmentExclusion sessionExclusionDuration - * @property {google.analytics.data.v1alpha.ISessionSegmentCriteria|null} [sessionExclusionCriteria] SessionSegmentExclusion sessionExclusionCriteria + * @interface ISegment + * @property {string|null} [name] Segment name + * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment + * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment + * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment */ /** - * Constructs a new SessionSegmentExclusion. + * Constructs a new Segment. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SessionSegmentExclusion. - * @implements ISessionSegmentExclusion + * @classdesc Represents a Segment. + * @implements ISegment * @constructor - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set */ - function SessionSegmentExclusion(properties) { + function Segment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35776,91 +38776,133 @@ } /** - * SessionSegmentExclusion sessionExclusionDuration. - * @member {google.analytics.data.v1alpha.SessionExclusionDuration} sessionExclusionDuration - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * Segment name. + * @member {string} name + * @memberof google.analytics.data.v1alpha.Segment * @instance */ - SessionSegmentExclusion.prototype.sessionExclusionDuration = 0; + Segment.prototype.name = ""; /** - * SessionSegmentExclusion sessionExclusionCriteria. - * @member {google.analytics.data.v1alpha.ISessionSegmentCriteria|null|undefined} sessionExclusionCriteria - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * Segment userSegment. + * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment + * @memberof google.analytics.data.v1alpha.Segment * @instance */ - SessionSegmentExclusion.prototype.sessionExclusionCriteria = null; + Segment.prototype.userSegment = null; /** - * Creates a new SessionSegmentExclusion instance using the specified properties. + * Segment sessionSegment. + * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.sessionSegment = null; + + /** + * Segment eventSegment. + * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Segment.prototype.eventSegment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Segment oneSegmentScope. + * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope + * @memberof google.analytics.data.v1alpha.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "oneSegmentScope", { + get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Segment instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion instance + * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.Segment} Segment instance */ - SessionSegmentExclusion.create = function create(properties) { - return new SessionSegmentExclusion(properties); + Segment.create = function create(properties) { + return new Segment(properties); }; /** - * Encodes the specified SessionSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentExclusion.encode = function encode(message, writer) { + Segment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionExclusionDuration != null && Object.hasOwnProperty.call(message, "sessionExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sessionExclusionDuration); - if (message.sessionExclusionCriteria != null && Object.hasOwnProperty.call(message, "sessionExclusionCriteria")) - $root.google.analytics.data.v1alpha.SessionSegmentCriteria.encode(message.sessionExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) + $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) + $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) + $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SessionSegmentExclusion.verify|verify} messages. + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static - * @param {google.analytics.data.v1alpha.ISessionSegmentExclusion} message SessionSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + Segment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer. + * Decodes a Segment message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @returns {google.analytics.data.v1alpha.Segment} Segment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentExclusion.decode = function decode(reader, length, error) { + Segment.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.sessionExclusionDuration = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.decode(reader, reader.uint32()); + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); break; } default: @@ -35872,269 +38914,333 @@ }; /** - * Decodes a SessionSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes a Segment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @returns {google.analytics.data.v1alpha.Segment} Segment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + Segment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionSegmentExclusion message. + * Verifies a Segment message. * @function verify - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionSegmentExclusion.verify = function verify(message) { + Segment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) - switch (message.sessionExclusionDuration) { - default: - return "sessionExclusionDuration: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.userSegment != null && message.hasOwnProperty("userSegment")) { + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); + if (error) + return "userSegment." + error; + } + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); + if (error) + return "sessionSegment." + error; + } + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + if (properties.oneSegmentScope === 1) + return "oneSegmentScope: multiple values"; + properties.oneSegmentScope = 1; + { + var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); + if (error) + return "eventSegment." + error; } - if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.verify(message.sessionExclusionCriteria); - if (error) - return "sessionExclusionCriteria." + error; } return null; }; /** - * Creates a SessionSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a Segment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SessionSegmentExclusion} SessionSegmentExclusion + * @returns {google.analytics.data.v1alpha.Segment} Segment */ - SessionSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SessionSegmentExclusion) + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.Segment) return object; - var message = new $root.google.analytics.data.v1alpha.SessionSegmentExclusion(); - switch (object.sessionExclusionDuration) { - default: - if (typeof object.sessionExclusionDuration === "number") { - message.sessionExclusionDuration = object.sessionExclusionDuration; - break; - } - break; - case "SESSION_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.sessionExclusionDuration = 0; - break; - case "SESSION_EXCLUSION_TEMPORARY": - case 1: - message.sessionExclusionDuration = 1; - break; - case "SESSION_EXCLUSION_PERMANENT": - case 2: - message.sessionExclusionDuration = 2; - break; + var message = new $root.google.analytics.data.v1alpha.Segment(); + if (object.name != null) + message.name = String(object.name); + if (object.userSegment != null) { + if (typeof object.userSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); + message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); } - if (object.sessionExclusionCriteria != null) { - if (typeof object.sessionExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.SessionSegmentExclusion.sessionExclusionCriteria: object expected"); - message.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.fromObject(object.sessionExclusionCriteria); + if (object.sessionSegment != null) { + if (typeof object.sessionSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); + message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); + } + if (object.eventSegment != null) { + if (typeof object.eventSegment !== "object") + throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); + message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); } return message; }; /** - * Creates a plain object from a SessionSegmentExclusion message. Also converts values to other types if specified. + * Creates a plain object from a Segment message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static - * @param {google.analytics.data.v1alpha.SessionSegmentExclusion} message SessionSegmentExclusion + * @param {google.analytics.data.v1alpha.Segment} message Segment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionSegmentExclusion.toObject = function toObject(message, options) { + Segment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sessionExclusionDuration = options.enums === String ? "SESSION_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.sessionExclusionCriteria = null; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userSegment != null && message.hasOwnProperty("userSegment")) { + object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); + if (options.oneofs) + object.oneSegmentScope = "userSegment"; + } + if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { + object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); + if (options.oneofs) + object.oneSegmentScope = "sessionSegment"; + } + if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { + object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); + if (options.oneofs) + object.oneSegmentScope = "eventSegment"; } - if (message.sessionExclusionDuration != null && message.hasOwnProperty("sessionExclusionDuration")) - object.sessionExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] === undefined ? message.sessionExclusionDuration : $root.google.analytics.data.v1alpha.SessionExclusionDuration[message.sessionExclusionDuration] : message.sessionExclusionDuration; - if (message.sessionExclusionCriteria != null && message.hasOwnProperty("sessionExclusionCriteria")) - object.sessionExclusionCriteria = $root.google.analytics.data.v1alpha.SessionSegmentCriteria.toObject(message.sessionExclusionCriteria, options); return object; }; /** - * Converts this SessionSegmentExclusion to JSON. + * Converts this Segment to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @instance * @returns {Object.} JSON object */ - SessionSegmentExclusion.prototype.toJSON = function toJSON() { + Segment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionSegmentExclusion + * Gets the default type url for Segment * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SessionSegmentExclusion + * @memberof google.analytics.data.v1alpha.Segment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SessionSegmentExclusion"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; }; - return SessionSegmentExclusion; - })(); - - /** - * SessionExclusionDuration enum. - * @name google.analytics.data.v1alpha.SessionExclusionDuration - * @enum {number} - * @property {number} SESSION_EXCLUSION_DURATION_UNSPECIFIED=0 SESSION_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} SESSION_EXCLUSION_TEMPORARY=1 SESSION_EXCLUSION_TEMPORARY value - * @property {number} SESSION_EXCLUSION_PERMANENT=2 SESSION_EXCLUSION_PERMANENT value - */ - v1alpha.SessionExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SESSION_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "SESSION_EXCLUSION_TEMPORARY"] = 1; - values[valuesById[2] = "SESSION_EXCLUSION_PERMANENT"] = 2; - return values; + return Segment; })(); - v1alpha.EventSegment = (function() { + v1alpha.SegmentFilterExpression = (function() { /** - * Properties of an EventSegment. + * Properties of a SegmentFilterExpression. * @memberof google.analytics.data.v1alpha - * @interface IEventSegment - * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventInclusionCriteria] EventSegment eventInclusionCriteria - * @property {google.analytics.data.v1alpha.IEventSegmentExclusion|null} [exclusion] EventSegment exclusion + * @interface ISegmentFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter + * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter */ /** - * Constructs a new EventSegment. + * Constructs a new SegmentFilterExpression. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegment. - * @implements IEventSegment + * @classdesc Represents a SegmentFilterExpression. + * @implements ISegmentFilterExpression * @constructor - * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + */ + function SegmentFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.andGroup = null; + + /** + * SegmentFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.orGroup = null; + + /** + * SegmentFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance + */ + SegmentFilterExpression.prototype.notExpression = null; + + /** + * SegmentFilterExpression segmentFilter. + * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @instance */ - function EventSegment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + SegmentFilterExpression.prototype.segmentFilter = null; /** - * EventSegment eventInclusionCriteria. - * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventInclusionCriteria - * @memberof google.analytics.data.v1alpha.EventSegment + * SegmentFilterExpression segmentEventFilter. + * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @instance */ - EventSegment.prototype.eventInclusionCriteria = null; + SegmentFilterExpression.prototype.segmentEventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * EventSegment exclusion. - * @member {google.analytics.data.v1alpha.IEventSegmentExclusion|null|undefined} exclusion - * @memberof google.analytics.data.v1alpha.EventSegment + * SegmentFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @instance */ - EventSegment.prototype.exclusion = null; + Object.defineProperty(SegmentFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EventSegment instance using the specified properties. + * Creates a new SegmentFilterExpression instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static - * @param {google.analytics.data.v1alpha.IEventSegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment instance + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance */ - EventSegment.create = function create(properties) { - return new EventSegment(properties); + SegmentFilterExpression.create = function create(properties) { + return new SegmentFilterExpression(properties); }; /** - * Encodes the specified EventSegment message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static - * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegment.encode = function encode(message, writer) { + SegmentFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventInclusionCriteria != null && Object.hasOwnProperty.call(message, "eventInclusionCriteria")) - $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventInclusionCriteria, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exclusion != null && Object.hasOwnProperty.call(message, "exclusion")) - $root.google.analytics.data.v1alpha.EventSegmentExclusion.encode(message.exclusion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) + $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) + $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified EventSegment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegment.verify|verify} messages. + * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static - * @param {google.analytics.data.v1alpha.IEventSegment} message EventSegment message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegment.encodeDelimited = function encodeDelimited(message, writer) { + SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventSegment message from the specified reader or buffer. + * Decodes a SegmentFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegment.decode = function decode(reader, length, error) { + SegmentFilterExpression.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); break; } case 2: { - message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.decode(reader, reader.uint32()); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); break; } default: @@ -36146,142 +39252,213 @@ }; /** - * Decodes an EventSegment message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegment.decodeDelimited = function decodeDelimited(reader) { + SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventSegment message. + * Verifies a SegmentFilterExpression message. * @function verify - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventSegment.verify = function verify(message) { + SegmentFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventInclusionCriteria); - if (error) - return "eventInclusionCriteria." + error; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } } - if (message.exclusion != null && message.hasOwnProperty("exclusion")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentExclusion.verify(message.exclusion); - if (error) - return "exclusion." + error; + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); + if (error) + return "segmentFilter." + error; + } + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); + if (error) + return "segmentEventFilter." + error; + } } return null; }; /** - * Creates an EventSegment message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegment} EventSegment + * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression */ - EventSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegment) + SegmentFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) return object; - var message = new $root.google.analytics.data.v1alpha.EventSegment(); - if (object.eventInclusionCriteria != null) { - if (typeof object.eventInclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegment.eventInclusionCriteria: object expected"); - message.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventInclusionCriteria); + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); } - if (object.exclusion != null) { - if (typeof object.exclusion !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegment.exclusion: object expected"); - message.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.fromObject(object.exclusion); + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); + } + if (object.segmentFilter != null) { + if (typeof object.segmentFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); + message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); + } + if (object.segmentEventFilter != null) { + if (typeof object.segmentEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); + message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); } return message; }; /** - * Creates a plain object from an EventSegment message. Also converts values to other types if specified. + * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static - * @param {google.analytics.data.v1alpha.EventSegment} message EventSegment + * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventSegment.toObject = function toObject(message, options) { + SegmentFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventInclusionCriteria = null; - object.exclusion = null; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { + object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); + if (options.oneofs) + object.expr = "segmentFilter"; + } + if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); + if (options.oneofs) + object.expr = "segmentEventFilter"; } - if (message.eventInclusionCriteria != null && message.hasOwnProperty("eventInclusionCriteria")) - object.eventInclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventInclusionCriteria, options); - if (message.exclusion != null && message.hasOwnProperty("exclusion")) - object.exclusion = $root.google.analytics.data.v1alpha.EventSegmentExclusion.toObject(message.exclusion, options); return object; }; /** - * Converts this EventSegment to JSON. + * Converts this SegmentFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @instance * @returns {Object.} JSON object */ - EventSegment.prototype.toJSON = function toJSON() { + SegmentFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventSegment + * Gets the default type url for SegmentFilterExpression * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegment + * @memberof google.analytics.data.v1alpha.SegmentFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegment"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; }; - return EventSegment; + return SegmentFilterExpression; })(); - v1alpha.EventSegmentCriteria = (function() { + v1alpha.SegmentFilterExpressionList = (function() { /** - * Properties of an EventSegmentCriteria. + * Properties of a SegmentFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentCriteria - * @property {Array.|null} [andConditionGroups] EventSegmentCriteria andConditionGroups + * @interface ISegmentFilterExpressionList + * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions */ /** - * Constructs a new EventSegmentCriteria. + * Constructs a new SegmentFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentCriteria. - * @implements IEventSegmentCriteria + * @classdesc Represents a SegmentFilterExpressionList. + * @implements ISegmentFilterExpressionList * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set */ - function EventSegmentCriteria(properties) { - this.andConditionGroups = []; + function SegmentFilterExpressionList(properties) { + this.expressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36289,80 +39466,80 @@ } /** - * EventSegmentCriteria andConditionGroups. - * @member {Array.} andConditionGroups - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * SegmentFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @instance */ - EventSegmentCriteria.prototype.andConditionGroups = $util.emptyArray; + SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Creates a new EventSegmentCriteria instance using the specified properties. + * Creates a new SegmentFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria instance + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance */ - EventSegmentCriteria.create = function create(properties) { - return new EventSegmentCriteria(properties); + SegmentFilterExpressionList.create = function create(properties) { + return new SegmentFilterExpressionList(properties); }; /** - * Encodes the specified EventSegmentCriteria message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentCriteria.encode = function encode(message, writer) { + SegmentFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andConditionGroups != null && message.andConditionGroups.length) - for (var i = 0; i < message.andConditionGroups.length; ++i) - $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.encode(message.andConditionGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified EventSegmentCriteria message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentCriteria.verify|verify} messages. + * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IEventSegmentCriteria} message EventSegmentCriteria message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentCriteria.encodeDelimited = function encodeDelimited(message, writer) { + SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer. + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentCriteria.decode = function decode(reader, length, error) { + SegmentFilterExpressionList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.andConditionGroups && message.andConditionGroups.length)) - message.andConditionGroups = []; - message.andConditionGroups.push($root.google.analytics.data.v1alpha.EventSegmentConditionGroup.decode(reader, reader.uint32())); + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); break; } default: @@ -36374,246 +39551,306 @@ }; /** - * Decodes an EventSegmentCriteria message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentCriteria.decodeDelimited = function decodeDelimited(reader) { + SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventSegmentCriteria message. + * Verifies a SegmentFilterExpressionList message. * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventSegmentCriteria.verify = function verify(message) { + SegmentFilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.andConditionGroups != null && message.hasOwnProperty("andConditionGroups")) { - if (!Array.isArray(message.andConditionGroups)) - return "andConditionGroups: array expected"; - for (var i = 0; i < message.andConditionGroups.length; ++i) { - var error = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.verify(message.andConditionGroups[i]); + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); if (error) - return "andConditionGroups." + error; + return "expressions." + error; } } return null; }; /** - * Creates an EventSegmentCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentCriteria} EventSegmentCriteria + * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList */ - EventSegmentCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentCriteria) + SegmentFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentCriteria(); - if (object.andConditionGroups) { - if (!Array.isArray(object.andConditionGroups)) - throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: array expected"); - message.andConditionGroups = []; - for (var i = 0; i < object.andConditionGroups.length; ++i) { - if (typeof object.andConditionGroups[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentCriteria.andConditionGroups: object expected"); - message.andConditionGroups[i] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.fromObject(object.andConditionGroups[i]); + var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); } } return message; }; /** - * Creates a plain object from an EventSegmentCriteria message. Also converts values to other types if specified. + * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.EventSegmentCriteria} message EventSegmentCriteria + * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventSegmentCriteria.toObject = function toObject(message, options) { + SegmentFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.andConditionGroups = []; - if (message.andConditionGroups && message.andConditionGroups.length) { - object.andConditionGroups = []; - for (var j = 0; j < message.andConditionGroups.length; ++j) - object.andConditionGroups[j] = $root.google.analytics.data.v1alpha.EventSegmentConditionGroup.toObject(message.andConditionGroups[j], options); + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); } return object; }; /** - * Converts this EventSegmentCriteria to JSON. + * Converts this SegmentFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @instance * @returns {Object.} JSON object */ - EventSegmentCriteria.prototype.toJSON = function toJSON() { + SegmentFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventSegmentCriteria + * Gets the default type url for SegmentFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentCriteria + * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventSegmentCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentCriteria"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; }; - return EventSegmentCriteria; - })(); - - /** - * EventCriteriaScoping enum. - * @name google.analytics.data.v1alpha.EventCriteriaScoping - * @enum {number} - * @property {number} EVENT_CRITERIA_SCOPING_UNSPECIFIED=0 EVENT_CRITERIA_SCOPING_UNSPECIFIED value - * @property {number} EVENT_CRITERIA_WITHIN_SAME_EVENT=1 EVENT_CRITERIA_WITHIN_SAME_EVENT value - */ - v1alpha.EventCriteriaScoping = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_CRITERIA_SCOPING_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT_CRITERIA_WITHIN_SAME_EVENT"] = 1; - return values; + return SegmentFilterExpressionList; })(); - v1alpha.EventSegmentConditionGroup = (function() { + v1alpha.SegmentFilter = (function() { /** - * Properties of an EventSegmentConditionGroup. + * Properties of a SegmentFilter. * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentConditionGroup - * @property {google.analytics.data.v1alpha.EventCriteriaScoping|null} [conditionScoping] EventSegmentConditionGroup conditionScoping - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [segmentFilterExpression] EventSegmentConditionGroup segmentFilterExpression + * @interface ISegmentFilter + * @property {string|null} [fieldName] SegmentFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping */ /** - * Constructs a new EventSegmentConditionGroup. + * Constructs a new SegmentFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentConditionGroup. - * @implements IEventSegmentConditionGroup + * @classdesc Represents a SegmentFilter. + * @implements ISegmentFilter * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + */ + function SegmentFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.fieldName = ""; + + /** + * SegmentFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.stringFilter = null; + + /** + * SegmentFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.inListFilter = null; + + /** + * SegmentFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance + */ + SegmentFilter.prototype.numericFilter = null; + + /** + * SegmentFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter + * @instance */ - function EventSegmentConditionGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + SegmentFilter.prototype.betweenFilter = null; /** - * EventSegmentConditionGroup conditionScoping. - * @member {google.analytics.data.v1alpha.EventCriteriaScoping} conditionScoping - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * SegmentFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentFilter * @instance */ - EventSegmentConditionGroup.prototype.conditionScoping = 0; + SegmentFilter.prototype.filterScoping = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * EventSegmentConditionGroup segmentFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} segmentFilterExpression - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * SegmentFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.SegmentFilter * @instance */ - EventSegmentConditionGroup.prototype.segmentFilterExpression = null; + Object.defineProperty(SegmentFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EventSegmentConditionGroup instance using the specified properties. + * Creates a new SegmentFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup instance + * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance */ - EventSegmentConditionGroup.create = function create(properties) { - return new EventSegmentConditionGroup(properties); + SegmentFilter.create = function create(properties) { + return new SegmentFilter(properties); }; /** - * Encodes the specified EventSegmentConditionGroup message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentConditionGroup.encode = function encode(message, writer) { + SegmentFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionScoping != null && Object.hasOwnProperty.call(message, "conditionScoping")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conditionScoping); - if (message.segmentFilterExpression != null && Object.hasOwnProperty.call(message, "segmentFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.segmentFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) + $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified EventSegmentConditionGroup message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentConditionGroup.verify|verify} messages. + * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static - * @param {google.analytics.data.v1alpha.IEventSegmentConditionGroup} message EventSegmentConditionGroup message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentConditionGroup.encodeDelimited = function encodeDelimited(message, writer) { + SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer. + * Decodes a SegmentFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentConditionGroup.decode = function decode(reader, length, error) { + SegmentFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.conditionScoping = reader.int32(); + message.fieldName = reader.string(); break; } - case 2: { - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); break; } default: @@ -36625,156 +39862,215 @@ }; /** - * Decodes an EventSegmentConditionGroup message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentConditionGroup.decodeDelimited = function decodeDelimited(reader) { + SegmentFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventSegmentConditionGroup message. + * Verifies a SegmentFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventSegmentConditionGroup.verify = function verify(message) { + SegmentFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - switch (message.conditionScoping) { - default: - return "conditionScoping: enum value expected"; - case 0: - case 1: - break; + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; } - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.segmentFilterExpression); + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { + var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); if (error) - return "segmentFilterExpression." + error; + return "filterScoping." + error; } return null; }; /** - * Creates an EventSegmentConditionGroup message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentConditionGroup} EventSegmentConditionGroup + * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter */ - EventSegmentConditionGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentConditionGroup) + SegmentFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentConditionGroup(); - switch (object.conditionScoping) { - default: - if (typeof object.conditionScoping === "number") { - message.conditionScoping = object.conditionScoping; - break; - } - break; - case "EVENT_CRITERIA_SCOPING_UNSPECIFIED": - case 0: - message.conditionScoping = 0; - break; - case "EVENT_CRITERIA_WITHIN_SAME_EVENT": - case 1: - message.conditionScoping = 1; - break; + var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); } - if (object.segmentFilterExpression != null) { - if (typeof object.segmentFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentConditionGroup.segmentFilterExpression: object expected"); - message.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.segmentFilterExpression); + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.filterScoping != null) { + if (typeof object.filterScoping !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); } return message; }; /** - * Creates a plain object from an EventSegmentConditionGroup message. Also converts values to other types if specified. + * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static - * @param {google.analytics.data.v1alpha.EventSegmentConditionGroup} message EventSegmentConditionGroup + * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventSegmentConditionGroup.toObject = function toObject(message, options) { + SegmentFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conditionScoping = options.enums === String ? "EVENT_CRITERIA_SCOPING_UNSPECIFIED" : 0; - object.segmentFilterExpression = null; + object.fieldName = ""; + object.filterScoping = null; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; } - if (message.conditionScoping != null && message.hasOwnProperty("conditionScoping")) - object.conditionScoping = options.enums === String ? $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] === undefined ? message.conditionScoping : $root.google.analytics.data.v1alpha.EventCriteriaScoping[message.conditionScoping] : message.conditionScoping; - if (message.segmentFilterExpression != null && message.hasOwnProperty("segmentFilterExpression")) - object.segmentFilterExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.segmentFilterExpression, options); + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); return object; }; /** - * Converts this EventSegmentConditionGroup to JSON. + * Converts this SegmentFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @instance * @returns {Object.} JSON object */ - EventSegmentConditionGroup.prototype.toJSON = function toJSON() { + SegmentFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventSegmentConditionGroup + * Gets the default type url for SegmentFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentConditionGroup + * @memberof google.analytics.data.v1alpha.SegmentFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventSegmentConditionGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentConditionGroup"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; }; - return EventSegmentConditionGroup; + return SegmentFilter; })(); - v1alpha.EventSegmentExclusion = (function() { + v1alpha.SegmentFilterScoping = (function() { /** - * Properties of an EventSegmentExclusion. + * Properties of a SegmentFilterScoping. * @memberof google.analytics.data.v1alpha - * @interface IEventSegmentExclusion - * @property {google.analytics.data.v1alpha.EventExclusionDuration|null} [eventExclusionDuration] EventSegmentExclusion eventExclusionDuration - * @property {google.analytics.data.v1alpha.IEventSegmentCriteria|null} [eventExclusionCriteria] EventSegmentExclusion eventExclusionCriteria + * @interface ISegmentFilterScoping + * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime */ /** - * Constructs a new EventSegmentExclusion. + * Constructs a new SegmentFilterScoping. * @memberof google.analytics.data.v1alpha - * @classdesc Represents an EventSegmentExclusion. - * @implements IEventSegmentExclusion + * @classdesc Represents a SegmentFilterScoping. + * @implements ISegmentFilterScoping * @constructor - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set */ - function EventSegmentExclusion(properties) { + function SegmentFilterScoping(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36782,91 +40078,86 @@ } /** - * EventSegmentExclusion eventExclusionDuration. - * @member {google.analytics.data.v1alpha.EventExclusionDuration} eventExclusionDuration - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * SegmentFilterScoping atAnyPointInTime. + * @member {boolean|null|undefined} atAnyPointInTime + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @instance */ - EventSegmentExclusion.prototype.eventExclusionDuration = 0; + SegmentFilterScoping.prototype.atAnyPointInTime = null; - /** - * EventSegmentExclusion eventExclusionCriteria. - * @member {google.analytics.data.v1alpha.IEventSegmentCriteria|null|undefined} eventExclusionCriteria - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion - * @instance - */ - EventSegmentExclusion.prototype.eventExclusionCriteria = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { + get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EventSegmentExclusion instance using the specified properties. + * Creates a new SegmentFilterScoping instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion instance + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance */ - EventSegmentExclusion.create = function create(properties) { - return new EventSegmentExclusion(properties); + SegmentFilterScoping.create = function create(properties) { + return new SegmentFilterScoping(properties); }; /** - * Encodes the specified EventSegmentExclusion message. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentExclusion.encode = function encode(message, writer) { + SegmentFilterScoping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventExclusionDuration != null && Object.hasOwnProperty.call(message, "eventExclusionDuration")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventExclusionDuration); - if (message.eventExclusionCriteria != null && Object.hasOwnProperty.call(message, "eventExclusionCriteria")) - $root.google.analytics.data.v1alpha.EventSegmentCriteria.encode(message.eventExclusionCriteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); return writer; }; /** - * Encodes the specified EventSegmentExclusion message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.EventSegmentExclusion.verify|verify} messages. + * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static - * @param {google.analytics.data.v1alpha.IEventSegmentExclusion} message EventSegmentExclusion message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventSegmentExclusion.encodeDelimited = function encodeDelimited(message, writer) { + SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer. + * Decodes a SegmentFilterScoping message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentExclusion.decode = function decode(reader, length, error) { + SegmentFilterScoping.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventExclusionDuration = reader.int32(); - break; - } - case 2: { - message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.decode(reader, reader.uint32()); + message.atAnyPointInTime = reader.bool(); break; } default: @@ -36878,172 +40169,127 @@ }; /** - * Decodes an EventSegmentExclusion message from the specified reader or buffer, length delimited. + * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventSegmentExclusion.decodeDelimited = function decodeDelimited(reader) { + SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventSegmentExclusion message. + * Verifies a SegmentFilterScoping message. * @function verify - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventSegmentExclusion.verify = function verify(message) { + SegmentFilterScoping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) - switch (message.eventExclusionDuration) { - default: - return "eventExclusionDuration: enum value expected"; - case 0: - case 1: - break; - } - if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) { - var error = $root.google.analytics.data.v1alpha.EventSegmentCriteria.verify(message.eventExclusionCriteria); - if (error) - return "eventExclusionCriteria." + error; + var properties = {}; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + properties._atAnyPointInTime = 1; + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; } return null; }; /** - * Creates an EventSegmentExclusion message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.EventSegmentExclusion} EventSegmentExclusion + * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping */ - EventSegmentExclusion.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.EventSegmentExclusion) + SegmentFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) return object; - var message = new $root.google.analytics.data.v1alpha.EventSegmentExclusion(); - switch (object.eventExclusionDuration) { - default: - if (typeof object.eventExclusionDuration === "number") { - message.eventExclusionDuration = object.eventExclusionDuration; - break; - } - break; - case "EVENT_EXCLUSION_DURATION_UNSPECIFIED": - case 0: - message.eventExclusionDuration = 0; - break; - case "EVENT_EXCLUSION_PERMANENT": - case 1: - message.eventExclusionDuration = 1; - break; - } - if (object.eventExclusionCriteria != null) { - if (typeof object.eventExclusionCriteria !== "object") - throw TypeError(".google.analytics.data.v1alpha.EventSegmentExclusion.eventExclusionCriteria: object expected"); - message.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.fromObject(object.eventExclusionCriteria); - } + var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); return message; }; /** - * Creates a plain object from an EventSegmentExclusion message. Also converts values to other types if specified. + * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static - * @param {google.analytics.data.v1alpha.EventSegmentExclusion} message EventSegmentExclusion + * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventSegmentExclusion.toObject = function toObject(message, options) { + SegmentFilterScoping.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventExclusionDuration = options.enums === String ? "EVENT_EXCLUSION_DURATION_UNSPECIFIED" : 0; - object.eventExclusionCriteria = null; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { + object.atAnyPointInTime = message.atAnyPointInTime; + if (options.oneofs) + object._atAnyPointInTime = "atAnyPointInTime"; } - if (message.eventExclusionDuration != null && message.hasOwnProperty("eventExclusionDuration")) - object.eventExclusionDuration = options.enums === String ? $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] === undefined ? message.eventExclusionDuration : $root.google.analytics.data.v1alpha.EventExclusionDuration[message.eventExclusionDuration] : message.eventExclusionDuration; - if (message.eventExclusionCriteria != null && message.hasOwnProperty("eventExclusionCriteria")) - object.eventExclusionCriteria = $root.google.analytics.data.v1alpha.EventSegmentCriteria.toObject(message.eventExclusionCriteria, options); return object; }; /** - * Converts this EventSegmentExclusion to JSON. + * Converts this SegmentFilterScoping to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @instance * @returns {Object.} JSON object */ - EventSegmentExclusion.prototype.toJSON = function toJSON() { + SegmentFilterScoping.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventSegmentExclusion + * Gets the default type url for SegmentFilterScoping * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.EventSegmentExclusion + * @memberof google.analytics.data.v1alpha.SegmentFilterScoping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventSegmentExclusion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.EventSegmentExclusion"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; }; - return EventSegmentExclusion; - })(); - - /** - * EventExclusionDuration enum. - * @name google.analytics.data.v1alpha.EventExclusionDuration - * @enum {number} - * @property {number} EVENT_EXCLUSION_DURATION_UNSPECIFIED=0 EVENT_EXCLUSION_DURATION_UNSPECIFIED value - * @property {number} EVENT_EXCLUSION_PERMANENT=1 EVENT_EXCLUSION_PERMANENT value - */ - v1alpha.EventExclusionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_EXCLUSION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT_EXCLUSION_PERMANENT"] = 1; - return values; + return SegmentFilterScoping; })(); - v1alpha.Segment = (function() { + v1alpha.SegmentEventFilter = (function() { /** - * Properties of a Segment. + * Properties of a SegmentEventFilter. * @memberof google.analytics.data.v1alpha - * @interface ISegment - * @property {string|null} [name] Segment name - * @property {google.analytics.data.v1alpha.IUserSegment|null} [userSegment] Segment userSegment - * @property {google.analytics.data.v1alpha.ISessionSegment|null} [sessionSegment] Segment sessionSegment - * @property {google.analytics.data.v1alpha.IEventSegment|null} [eventSegment] Segment eventSegment + * @interface ISegmentEventFilter + * @property {string|null} [eventName] SegmentEventFilter eventName + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression */ /** - * Constructs a new Segment. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a Segment. - * @implements ISegment + * Constructs a new SegmentEventFilter. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a SegmentEventFilter. + * @implements ISegmentEventFilter * @constructor - * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set */ - function Segment(properties) { + function SegmentEventFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37051,133 +40297,106 @@ } /** - * Segment name. - * @member {string} name - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.name = ""; - - /** - * Segment userSegment. - * @member {google.analytics.data.v1alpha.IUserSegment|null|undefined} userSegment - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Segment.prototype.userSegment = null; - - /** - * Segment sessionSegment. - * @member {google.analytics.data.v1alpha.ISessionSegment|null|undefined} sessionSegment - * @memberof google.analytics.data.v1alpha.Segment + * SegmentEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @instance */ - Segment.prototype.sessionSegment = null; + SegmentEventFilter.prototype.eventName = null; /** - * Segment eventSegment. - * @member {google.analytics.data.v1alpha.IEventSegment|null|undefined} eventSegment - * @memberof google.analytics.data.v1alpha.Segment + * SegmentEventFilter segmentParameterFilterExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @instance */ - Segment.prototype.eventSegment = null; + SegmentEventFilter.prototype.segmentParameterFilterExpression = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * Segment oneSegmentScope. - * @member {"userSegment"|"sessionSegment"|"eventSegment"|undefined} oneSegmentScope - * @memberof google.analytics.data.v1alpha.Segment - * @instance - */ - Object.defineProperty(Segment.prototype, "oneSegmentScope", { - get: $util.oneOfGetter($oneOfFields = ["userSegment", "sessionSegment", "eventSegment"]), + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Segment instance using the specified properties. + * Creates a new SegmentEventFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegment=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.Segment} Segment instance + * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance */ - Segment.create = function create(properties) { - return new Segment(properties); + SegmentEventFilter.create = function create(properties) { + return new SegmentEventFilter(properties); }; /** - * Encodes the specified Segment message. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encode = function encode(message, writer) { + SegmentEventFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.userSegment != null && Object.hasOwnProperty.call(message, "userSegment")) - $root.google.analytics.data.v1alpha.UserSegment.encode(message.userSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionSegment != null && Object.hasOwnProperty.call(message, "sessionSegment")) - $root.google.analytics.data.v1alpha.SessionSegment.encode(message.sessionSegment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.eventSegment != null && Object.hasOwnProperty.call(message, "eventSegment")) - $root.google.analytics.data.v1alpha.EventSegment.encode(message.eventSegment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.Segment.verify|verify} messages. + * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegment} message Segment message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encodeDelimited = function encodeDelimited(message, writer) { + SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Segment message from the specified reader or buffer. + * Decodes a SegmentEventFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.Segment} Segment + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decode = function decode(reader, length, error) { + SegmentEventFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.Segment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.eventName = reader.string(); break; } case 2: { - message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.decode(reader, reader.uint32()); + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -37189,185 +40408,147 @@ }; /** - * Decodes a Segment message from the specified reader or buffer, length delimited. + * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.Segment} Segment + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decodeDelimited = function decodeDelimited(reader) { + SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Segment message. + * Verifies a SegmentEventFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Segment.verify = function verify(message) { + SegmentEventFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.userSegment != null && message.hasOwnProperty("userSegment")) { - properties.oneSegmentScope = 1; - { - var error = $root.google.analytics.data.v1alpha.UserSegment.verify(message.userSegment); - if (error) - return "userSegment." + error; - } - } - if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { - if (properties.oneSegmentScope === 1) - return "oneSegmentScope: multiple values"; - properties.oneSegmentScope = 1; - { - var error = $root.google.analytics.data.v1alpha.SessionSegment.verify(message.sessionSegment); - if (error) - return "sessionSegment." + error; - } + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; } - if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { - if (properties.oneSegmentScope === 1) - return "oneSegmentScope: multiple values"; - properties.oneSegmentScope = 1; + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + properties._segmentParameterFilterExpression = 1; { - var error = $root.google.analytics.data.v1alpha.EventSegment.verify(message.eventSegment); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); if (error) - return "eventSegment." + error; + return "segmentParameterFilterExpression." + error; } } return null; }; /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.Segment} Segment + * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter */ - Segment.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.Segment) + SegmentEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) return object; - var message = new $root.google.analytics.data.v1alpha.Segment(); - if (object.name != null) - message.name = String(object.name); - if (object.userSegment != null) { - if (typeof object.userSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.userSegment: object expected"); - message.userSegment = $root.google.analytics.data.v1alpha.UserSegment.fromObject(object.userSegment); - } - if (object.sessionSegment != null) { - if (typeof object.sessionSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.sessionSegment: object expected"); - message.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.fromObject(object.sessionSegment); - } - if (object.eventSegment != null) { - if (typeof object.eventSegment !== "object") - throw TypeError(".google.analytics.data.v1alpha.Segment.eventSegment: object expected"); - message.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.fromObject(object.eventSegment); + var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.segmentParameterFilterExpression != null) { + if (typeof object.segmentParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); + message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); } return message; }; /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. + * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static - * @param {google.analytics.data.v1alpha.Segment} message Segment + * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Segment.toObject = function toObject(message, options) { + SegmentEventFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userSegment != null && message.hasOwnProperty("userSegment")) { - object.userSegment = $root.google.analytics.data.v1alpha.UserSegment.toObject(message.userSegment, options); - if (options.oneofs) - object.oneSegmentScope = "userSegment"; - } - if (message.sessionSegment != null && message.hasOwnProperty("sessionSegment")) { - object.sessionSegment = $root.google.analytics.data.v1alpha.SessionSegment.toObject(message.sessionSegment, options); + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; if (options.oneofs) - object.oneSegmentScope = "sessionSegment"; + object._eventName = "eventName"; } - if (message.eventSegment != null && message.hasOwnProperty("eventSegment")) { - object.eventSegment = $root.google.analytics.data.v1alpha.EventSegment.toObject(message.eventSegment, options); + if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { + object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); if (options.oneofs) - object.oneSegmentScope = "eventSegment"; + object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; } return object; }; /** - * Converts this Segment to JSON. + * Converts this SegmentEventFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @instance * @returns {Object.} JSON object */ - Segment.prototype.toJSON = function toJSON() { + SegmentEventFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Segment + * Gets the default type url for SegmentEventFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.Segment + * @memberof google.analytics.data.v1alpha.SegmentEventFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.Segment"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; }; - return Segment; + return SegmentEventFilter; })(); - v1alpha.SegmentFilterExpression = (function() { + v1alpha.SegmentParameterFilterExpression = (function() { - /** - * Properties of a SegmentFilterExpression. - * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterExpression - * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [andGroup] SegmentFilterExpression andGroup - * @property {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null} [orGroup] SegmentFilterExpression orGroup - * @property {google.analytics.data.v1alpha.ISegmentFilterExpression|null} [notExpression] SegmentFilterExpression notExpression - * @property {google.analytics.data.v1alpha.ISegmentFilter|null} [segmentFilter] SegmentFilterExpression segmentFilter - * @property {google.analytics.data.v1alpha.ISegmentEventFilter|null} [segmentEventFilter] SegmentFilterExpression segmentEventFilter + /** + * Properties of a SegmentParameterFilterExpression. + * @memberof google.analytics.data.v1alpha + * @interface ISegmentParameterFilterExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter */ /** - * Constructs a new SegmentFilterExpression. + * Constructs a new SegmentParameterFilterExpression. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterExpression. - * @implements ISegmentFilterExpression + * @classdesc Represents a SegmentParameterFilterExpression. + * @implements ISegmentParameterFilterExpression * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set */ - function SegmentFilterExpression(properties) { + function SegmentParameterFilterExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37375,147 +40556,133 @@ } /** - * SegmentFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression - * @instance - */ - SegmentFilterExpression.prototype.andGroup = null; - - /** - * SegmentFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * SegmentParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance */ - SegmentFilterExpression.prototype.orGroup = null; + SegmentParameterFilterExpression.prototype.andGroup = null; /** - * SegmentFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.ISegmentFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * SegmentParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance */ - SegmentFilterExpression.prototype.notExpression = null; + SegmentParameterFilterExpression.prototype.orGroup = null; /** - * SegmentFilterExpression segmentFilter. - * @member {google.analytics.data.v1alpha.ISegmentFilter|null|undefined} segmentFilter - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * SegmentParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance */ - SegmentFilterExpression.prototype.segmentFilter = null; + SegmentParameterFilterExpression.prototype.notExpression = null; /** - * SegmentFilterExpression segmentEventFilter. - * @member {google.analytics.data.v1alpha.ISegmentEventFilter|null|undefined} segmentEventFilter - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * SegmentParameterFilterExpression segmentParameterFilter. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance */ - SegmentFilterExpression.prototype.segmentEventFilter = null; + SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SegmentFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"segmentFilter"|"segmentEventFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * SegmentParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance */ - Object.defineProperty(SegmentFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentFilter", "segmentEventFilter"]), + Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentFilterExpression instance using the specified properties. + * Creates a new SegmentParameterFilterExpression instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression instance + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance */ - SegmentFilterExpression.create = function create(properties) { - return new SegmentFilterExpression(properties); + SegmentParameterFilterExpression.create = function create(properties) { + return new SegmentParameterFilterExpression(properties); }; /** - * Encodes the specified SegmentFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterExpression.encode = function encode(message, writer) { + SegmentParameterFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.segmentFilter != null && Object.hasOwnProperty.call(message, "segmentFilter")) - $root.google.analytics.data.v1alpha.SegmentFilter.encode(message.segmentFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.segmentEventFilter != null && Object.hasOwnProperty.call(message, "segmentEventFilter")) - $root.google.analytics.data.v1alpha.SegmentEventFilter.encode(message.segmentEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) + $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpression.verify|verify} messages. + * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpression} message SegmentFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer. + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterExpression.decode = function decode(reader, length, error) { + SegmentParameterFilterExpression.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); break; } case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.decode(reader, reader.uint32()); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); break; } case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32()); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); break; } case 4: { - message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.decode(reader, reader.uint32()); + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); break; } default: @@ -37527,37 +40694,37 @@ }; /** - * Decodes a SegmentFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterExpression.decodeDelimited = function decodeDelimited(reader) { + SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentFilterExpression message. + * Verifies a SegmentParameterFilterExpression message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentFilterExpression.verify = function verify(message) { + SegmentParameterFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.andGroup != null && message.hasOwnProperty("andGroup")) { properties.expr = 1; { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.andGroup); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); if (error) return "andGroup." + error; } @@ -37567,7 +40734,7 @@ return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.verify(message.orGroup); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); if (error) return "orGroup." + error; } @@ -37577,162 +40744,142 @@ return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.notExpression); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); if (error) return "notExpression." + error; } } - if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentFilter.verify(message.segmentFilter); - if (error) - return "segmentFilter." + error; - } - } - if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { if (properties.expr === 1) return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.data.v1alpha.SegmentEventFilter.verify(message.segmentEventFilter); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); if (error) - return "segmentEventFilter." + error; + return "segmentParameterFilter." + error; } } return null; }; /** - * Creates a SegmentFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterExpression} SegmentFilterExpression + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression */ - SegmentFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpression) + SegmentParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpression(); + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); if (object.andGroup != null) { if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.andGroup); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); } if (object.orGroup != null) { if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.fromObject(object.orGroup); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); } if (object.notExpression != null) { if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.notExpression); - } - if (object.segmentFilter != null) { - if (typeof object.segmentFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentFilter: object expected"); - message.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.fromObject(object.segmentFilter); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); } - if (object.segmentEventFilter != null) { - if (typeof object.segmentEventFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpression.segmentEventFilter: object expected"); - message.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.fromObject(object.segmentEventFilter); + if (object.segmentParameterFilter != null) { + if (typeof object.segmentParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); + message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); } return message; }; /** - * Creates a plain object from a SegmentFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.SegmentFilterExpression} message SegmentFilterExpression + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentFilterExpression.toObject = function toObject(message, options) { + SegmentParameterFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.andGroup, options); + object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); if (options.oneofs) object.expr = "andGroup"; } if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.SegmentFilterExpressionList.toObject(message.orGroup, options); + object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); if (options.oneofs) object.expr = "orGroup"; } if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.notExpression, options); + object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); if (options.oneofs) object.expr = "notExpression"; } - if (message.segmentFilter != null && message.hasOwnProperty("segmentFilter")) { - object.segmentFilter = $root.google.analytics.data.v1alpha.SegmentFilter.toObject(message.segmentFilter, options); - if (options.oneofs) - object.expr = "segmentFilter"; - } - if (message.segmentEventFilter != null && message.hasOwnProperty("segmentEventFilter")) { - object.segmentEventFilter = $root.google.analytics.data.v1alpha.SegmentEventFilter.toObject(message.segmentEventFilter, options); + if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { + object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); if (options.oneofs) - object.expr = "segmentEventFilter"; + object.expr = "segmentParameterFilter"; } return object; }; /** - * Converts this SegmentFilterExpression to JSON. + * Converts this SegmentParameterFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @instance * @returns {Object.} JSON object */ - SegmentFilterExpression.prototype.toJSON = function toJSON() { + SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentFilterExpression + * Gets the default type url for SegmentParameterFilterExpression * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterExpression + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; }; - return SegmentFilterExpression; + return SegmentParameterFilterExpression; })(); - v1alpha.SegmentFilterExpressionList = (function() { + v1alpha.SegmentParameterFilterExpressionList = (function() { /** - * Properties of a SegmentFilterExpressionList. + * Properties of a SegmentParameterFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterExpressionList - * @property {Array.|null} [expressions] SegmentFilterExpressionList expressions + * @interface ISegmentParameterFilterExpressionList + * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions */ /** - * Constructs a new SegmentFilterExpressionList. + * Constructs a new SegmentParameterFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterExpressionList. - * @implements ISegmentFilterExpressionList + * @classdesc Represents a SegmentParameterFilterExpressionList. + * @implements ISegmentParameterFilterExpressionList * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set */ - function SegmentFilterExpressionList(properties) { + function SegmentParameterFilterExpressionList(properties) { this.expressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -37741,71 +40888,71 @@ } /** - * SegmentFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * SegmentParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @instance */ - SegmentFilterExpressionList.prototype.expressions = $util.emptyArray; + SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Creates a new SegmentFilterExpressionList instance using the specified properties. + * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList instance + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance */ - SegmentFilterExpressionList.create = function create(properties) { - return new SegmentFilterExpressionList(properties); + SegmentParameterFilterExpressionList.create = function create(properties) { + return new SegmentParameterFilterExpressionList(properties); }; /** - * Encodes the specified SegmentFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterExpressionList.encode = function encode(message, writer) { + SegmentParameterFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.expressions != null && message.expressions.length) for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.SegmentFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterExpressionList.verify|verify} messages. + * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterExpressionList} message SegmentFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer. + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterExpressionList.decode = function decode(reader, length, error) { + SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -37814,7 +40961,7 @@ case 1: { if (!(message.expressions && message.expressions.length)) message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.SegmentFilterExpression.decode(reader, reader.uint32())); + message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); break; } default: @@ -37826,37 +40973,37 @@ }; /** - * Decodes a SegmentFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentFilterExpressionList message. + * Verifies a SegmentParameterFilterExpressionList message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentFilterExpressionList.verify = function verify(message) { + SegmentParameterFilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.expressions != null && message.hasOwnProperty("expressions")) { if (!Array.isArray(message.expressions)) return "expressions: array expected"; for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterExpression.verify(message.expressions[i]); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); if (error) return "expressions." + error; } @@ -37865,40 +41012,40 @@ }; /** - * Creates a SegmentFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterExpressionList} SegmentFilterExpressionList + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList */ - SegmentFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterExpressionList) + SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterExpressionList(); + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); if (object.expressions) { if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: array expected"); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); message.expressions = []; for (var i = 0; i < object.expressions.length; ++i) { if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.fromObject(object.expressions[i]); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); } } return message; }; /** - * Creates a plain object from a SegmentFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.SegmentFilterExpressionList} message SegmentFilterExpressionList + * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentFilterExpressionList.toObject = function toObject(message, options) { + SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -37907,63 +41054,64 @@ if (message.expressions && message.expressions.length) { object.expressions = []; for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentFilterExpression.toObject(message.expressions[j], options); + object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); } return object; }; /** - * Converts this SegmentFilterExpressionList to JSON. + * Converts this SegmentParameterFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @instance * @returns {Object.} JSON object */ - SegmentFilterExpressionList.prototype.toJSON = function toJSON() { + SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentFilterExpressionList + * Gets the default type url for SegmentParameterFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterExpressionList + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; }; - return SegmentFilterExpressionList; + return SegmentParameterFilterExpressionList; })(); - v1alpha.SegmentFilter = (function() { + v1alpha.SegmentParameterFilter = (function() { /** - * Properties of a SegmentFilter. + * Properties of a SegmentParameterFilter. * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilter - * @property {string|null} [fieldName] SegmentFilter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentFilter betweenFilter - * @property {google.analytics.data.v1alpha.ISegmentFilterScoping|null} [filterScoping] SegmentFilter filterScoping + * @interface ISegmentParameterFilter + * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName + * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter + * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping */ /** - * Constructs a new SegmentFilter. + * Constructs a new SegmentParameterFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilter. - * @implements ISegmentFilter + * @classdesc Represents a SegmentParameterFilter. + * @implements ISegmentParameterFilter * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set */ - function SegmentFilter(properties) { + function SegmentParameterFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37971,93 +41119,114 @@ } /** - * SegmentFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.SegmentFilter + * SegmentParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.fieldName = ""; + SegmentParameterFilter.prototype.eventParameterName = null; /** - * SegmentFilter stringFilter. + * SegmentParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + SegmentParameterFilter.prototype.itemParameterName = null; + + /** + * SegmentParameterFilter stringFilter. * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.stringFilter = null; + SegmentParameterFilter.prototype.stringFilter = null; /** - * SegmentFilter inListFilter. + * SegmentParameterFilter inListFilter. * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.inListFilter = null; + SegmentParameterFilter.prototype.inListFilter = null; /** - * SegmentFilter numericFilter. + * SegmentParameterFilter numericFilter. * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.numericFilter = null; + SegmentParameterFilter.prototype.numericFilter = null; /** - * SegmentFilter betweenFilter. + * SegmentParameterFilter betweenFilter. * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.betweenFilter = null; + SegmentParameterFilter.prototype.betweenFilter = null; /** - * SegmentFilter filterScoping. - * @member {google.analytics.data.v1alpha.ISegmentFilterScoping|null|undefined} filterScoping - * @memberof google.analytics.data.v1alpha.SegmentFilter + * SegmentParameterFilter filterScoping. + * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - SegmentFilter.prototype.filterScoping = null; + SegmentParameterFilter.prototype.filterScoping = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SegmentFilter oneFilter. + * SegmentParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @instance + */ + Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SegmentParameterFilter oneFilter. * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance */ - Object.defineProperty(SegmentFilter.prototype, "oneFilter", { + Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentFilter instance using the specified properties. + * Creates a new SegmentParameterFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter instance + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance */ - SegmentFilter.create = function create(properties) { - return new SegmentFilter(properties); + SegmentParameterFilter.create = function create(properties) { + return new SegmentParameterFilter(properties); }; /** - * Encodes the specified SegmentFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilter.encode = function encode(message, writer) { + SegmentParameterFilter.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.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) @@ -38067,45 +41236,49 @@ if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) - $root.google.analytics.data.v1alpha.SegmentFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilter.verify|verify} messages. + * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentFilter} message SegmentFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilter.encodeDelimited = function encodeDelimited(message, writer) { + SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentFilter message from the specified reader or buffer. + * Decodes a SegmentParameterFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilter.decode = function decode(reader, length, error) { + SegmentParameterFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.fieldName = reader.string(); + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); break; } case 4: { @@ -38125,7 +41298,7 @@ break; } case 8: { - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.decode(reader, reader.uint32()); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); break; } default: @@ -38137,36 +41310,45 @@ }; /** - * Decodes a SegmentFilter message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilter.decodeDelimited = function decodeDelimited(reader) { + SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentFilter message. + * Verifies a SegmentParameterFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentFilter.verify = function verify(message) { + SegmentParameterFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { properties.oneFilter = 1; { @@ -38206,7 +41388,7 @@ } } if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { - var error = $root.google.analytics.data.v1alpha.SegmentFilterScoping.verify(message.filterScoping); + var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); if (error) return "filterScoping." + error; } @@ -38214,66 +41396,74 @@ }; /** - * Creates a SegmentFilter message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilter} SegmentFilter + * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter */ - SegmentFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilter) + SegmentParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); if (object.stringFilter != null) { if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.stringFilter: object expected"); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); } if (object.inListFilter != null) { if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.inListFilter: object expected"); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); } if (object.numericFilter != null) { if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.numericFilter: object expected"); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); } if (object.betweenFilter != null) { if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.betweenFilter: object expected"); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); } if (object.filterScoping != null) { if (typeof object.filterScoping !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentFilter.filterScoping: object expected"); - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.fromObject(object.filterScoping); + throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); + message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); } return message; }; /** - * Creates a plain object from a SegmentFilter message. Also converts values to other types if specified. + * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static - * @param {google.analytics.data.v1alpha.SegmentFilter} message SegmentFilter + * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentFilter.toObject = function toObject(message, options) { + SegmentParameterFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fieldName = ""; + if (options.defaults) object.filterScoping = null; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); if (options.oneofs) @@ -38295,57 +41485,57 @@ object.oneFilter = "betweenFilter"; } if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) - object.filterScoping = $root.google.analytics.data.v1alpha.SegmentFilterScoping.toObject(message.filterScoping, options); + object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); return object; }; /** - * Converts this SegmentFilter to JSON. + * Converts this SegmentParameterFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @instance * @returns {Object.} JSON object */ - SegmentFilter.prototype.toJSON = function toJSON() { + SegmentParameterFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentFilter + * Gets the default type url for SegmentParameterFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilter + * @memberof google.analytics.data.v1alpha.SegmentParameterFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; }; - return SegmentFilter; + return SegmentParameterFilter; })(); - v1alpha.SegmentFilterScoping = (function() { + v1alpha.SegmentParameterFilterScoping = (function() { /** - * Properties of a SegmentFilterScoping. + * Properties of a SegmentParameterFilterScoping. * @memberof google.analytics.data.v1alpha - * @interface ISegmentFilterScoping - * @property {boolean|null} [atAnyPointInTime] SegmentFilterScoping atAnyPointInTime + * @interface ISegmentParameterFilterScoping + * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod */ /** - * Constructs a new SegmentFilterScoping. + * Constructs a new SegmentParameterFilterScoping. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentFilterScoping. - * @implements ISegmentFilterScoping + * @classdesc Represents a SegmentParameterFilterScoping. + * @implements ISegmentParameterFilterScoping * @constructor - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set */ - function SegmentFilterScoping(properties) { + function SegmentParameterFilterScoping(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38353,86 +41543,86 @@ } /** - * SegmentFilterScoping atAnyPointInTime. - * @member {boolean|null|undefined} atAnyPointInTime - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * SegmentParameterFilterScoping inAnyNDayPeriod. + * @member {number|Long|null|undefined} inAnyNDayPeriod + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @instance */ - SegmentFilterScoping.prototype.atAnyPointInTime = null; + SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentFilterScoping.prototype, "_atAnyPointInTime", { - get: $util.oneOfGetter($oneOfFields = ["atAnyPointInTime"]), + Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { + get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentFilterScoping instance using the specified properties. + * Creates a new SegmentParameterFilterScoping instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping instance + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance */ - SegmentFilterScoping.create = function create(properties) { - return new SegmentFilterScoping(properties); + SegmentParameterFilterScoping.create = function create(properties) { + return new SegmentParameterFilterScoping(properties); }; /** - * Encodes the specified SegmentFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterScoping.encode = function encode(message, writer) { + SegmentParameterFilterScoping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.atAnyPointInTime); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); return writer; }; /** - * Encodes the specified SegmentFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentFilterScoping.verify|verify} messages. + * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static - * @param {google.analytics.data.v1alpha.ISegmentFilterScoping} message SegmentFilterScoping message or plain object to encode + * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer. + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterScoping.decode = function decode(reader, length, error) { + SegmentParameterFilterScoping.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.atAnyPointInTime = reader.bool(); + message.inAnyNDayPeriod = reader.int64(); break; } default: @@ -38444,127 +41634,140 @@ }; /** - * Decodes a SegmentFilterScoping message from the specified reader or buffer, length delimited. + * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentFilterScoping.decodeDelimited = function decodeDelimited(reader) { + SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentFilterScoping message. + * Verifies a SegmentParameterFilterScoping message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentFilterScoping.verify = function verify(message) { + SegmentParameterFilterScoping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { - properties._atAnyPointInTime = 1; - if (typeof message.atAnyPointInTime !== "boolean") - return "atAnyPointInTime: boolean expected"; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + properties._inAnyNDayPeriod = 1; + if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) + return "inAnyNDayPeriod: integer|Long expected"; } return null; }; /** - * Creates a SegmentFilterScoping message from a plain object. Also converts values to their respective internal types. + * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentFilterScoping} SegmentFilterScoping + * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping */ - SegmentFilterScoping.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentFilterScoping) + SegmentParameterFilterScoping.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentFilterScoping(); - if (object.atAnyPointInTime != null) - message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + if (object.inAnyNDayPeriod != null) + if ($util.Long) + (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; + else if (typeof object.inAnyNDayPeriod === "string") + message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); + else if (typeof object.inAnyNDayPeriod === "number") + message.inAnyNDayPeriod = object.inAnyNDayPeriod; + else if (typeof object.inAnyNDayPeriod === "object") + message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a SegmentFilterScoping message. Also converts values to other types if specified. + * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static - * @param {google.analytics.data.v1alpha.SegmentFilterScoping} message SegmentFilterScoping + * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentFilterScoping.toObject = function toObject(message, options) { + SegmentParameterFilterScoping.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) { - object.atAnyPointInTime = message.atAnyPointInTime; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { + if (typeof message.inAnyNDayPeriod === "number") + object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; + else + object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; if (options.oneofs) - object._atAnyPointInTime = "atAnyPointInTime"; + object._inAnyNDayPeriod = "inAnyNDayPeriod"; } return object; }; /** - * Converts this SegmentFilterScoping to JSON. + * Converts this SegmentParameterFilterScoping to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @instance * @returns {Object.} JSON object */ - SegmentFilterScoping.prototype.toJSON = function toJSON() { + SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentFilterScoping + * Gets the default type url for SegmentParameterFilterScoping * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentFilterScoping + * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentFilterScoping"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; }; - return SegmentFilterScoping; + return SegmentParameterFilterScoping; })(); - v1alpha.SegmentEventFilter = (function() { + v1alpha.FunnelFilterExpression = (function() { /** - * Properties of a SegmentEventFilter. + * Properties of a FunnelFilterExpression. * @memberof google.analytics.data.v1alpha - * @interface ISegmentEventFilter - * @property {string|null} [eventName] SegmentEventFilter eventName - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [segmentParameterFilterExpression] SegmentEventFilter segmentParameterFilterExpression + * @interface IFunnelFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter + * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter */ /** - * Constructs a new SegmentEventFilter. + * Constructs a new FunnelFilterExpression. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentEventFilter. - * @implements ISegmentEventFilter + * @classdesc Represents a FunnelFilterExpression. + * @implements IFunnelFilterExpression * @constructor - * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set */ - function SegmentEventFilter(properties) { + function FunnelFilterExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38572,106 +41775,147 @@ } /** - * SegmentEventFilter eventName. - * @member {string|null|undefined} eventName - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * FunnelFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @instance */ - SegmentEventFilter.prototype.eventName = null; + FunnelFilterExpression.prototype.andGroup = null; /** - * SegmentEventFilter segmentParameterFilterExpression. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} segmentParameterFilterExpression - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * FunnelFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @instance */ - SegmentEventFilter.prototype.segmentParameterFilterExpression = null; + FunnelFilterExpression.prototype.orGroup = null; + + /** + * FunnelFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.notExpression = null; + + /** + * FunnelFilterExpression funnelFieldFilter. + * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelFieldFilter = null; + + /** + * FunnelFilterExpression funnelEventFilter. + * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + FunnelFilterExpression.prototype.funnelEventFilter = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentEventFilter.prototype, "_eventName", { - get: $util.oneOfGetter($oneOfFields = ["eventName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentEventFilter.prototype, "_segmentParameterFilterExpression", { - get: $util.oneOfGetter($oneOfFields = ["segmentParameterFilterExpression"]), + /** + * FunnelFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @instance + */ + Object.defineProperty(FunnelFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentEventFilter instance using the specified properties. + * Creates a new FunnelFilterExpression instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter instance + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance */ - SegmentEventFilter.create = function create(properties) { - return new SegmentEventFilter(properties); + FunnelFilterExpression.create = function create(properties) { + return new FunnelFilterExpression(properties); }; /** - * Encodes the specified SegmentEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentEventFilter.encode = function encode(message, writer) { + FunnelFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.segmentParameterFilterExpression != null && Object.hasOwnProperty.call(message, "segmentParameterFilterExpression")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.segmentParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) + $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) + $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentEventFilter.verify|verify} messages. + * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentEventFilter} message SegmentEventFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentEventFilter message from the specified reader or buffer. + * Decodes a FunnelFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentEventFilter.decode = function decode(reader, length, error) { + FunnelFilterExpression.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventName = reader.string(); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); break; } case 2: { - message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); break; } default: @@ -38683,147 +41927,213 @@ }; /** - * Decodes a SegmentEventFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentEventFilter.decodeDelimited = function decodeDelimited(reader) { + FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentEventFilter message. + * Verifies a FunnelFilterExpression message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentEventFilter.verify = function verify(message) { + FunnelFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - properties._eventName = 1; - if (!$util.isString(message.eventName)) - return "eventName: string expected"; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } } - if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { - properties._segmentParameterFilterExpression = 1; + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.segmentParameterFilterExpression); + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); if (error) - return "segmentParameterFilterExpression." + error; + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); + if (error) + return "funnelFieldFilter." + error; + } + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); + if (error) + return "funnelEventFilter." + error; } } return null; }; /** - * Creates a SegmentEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentEventFilter} SegmentEventFilter + * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression */ - SegmentEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentEventFilter) + FunnelFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.segmentParameterFilterExpression != null) { - if (typeof object.segmentParameterFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentEventFilter.segmentParameterFilterExpression: object expected"); - message.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.segmentParameterFilterExpression); + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); + } + if (object.funnelFieldFilter != null) { + if (typeof object.funnelFieldFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); + message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); + } + if (object.funnelEventFilter != null) { + if (typeof object.funnelEventFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); + message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); } return message; }; /** - * Creates a plain object from a SegmentEventFilter message. Also converts values to other types if specified. + * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static - * @param {google.analytics.data.v1alpha.SegmentEventFilter} message SegmentEventFilter + * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentEventFilter.toObject = function toObject(message, options) { + FunnelFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - object.eventName = message.eventName; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); if (options.oneofs) - object._eventName = "eventName"; + object.expr = "andGroup"; } - if (message.segmentParameterFilterExpression != null && message.hasOwnProperty("segmentParameterFilterExpression")) { - object.segmentParameterFilterExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.segmentParameterFilterExpression, options); + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); if (options.oneofs) - object._segmentParameterFilterExpression = "segmentParameterFilterExpression"; + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { + object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); + if (options.oneofs) + object.expr = "funnelFieldFilter"; + } + if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { + object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); + if (options.oneofs) + object.expr = "funnelEventFilter"; } return object; }; /** - * Converts this SegmentEventFilter to JSON. + * Converts this FunnelFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @instance * @returns {Object.} JSON object */ - SegmentEventFilter.prototype.toJSON = function toJSON() { + FunnelFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentEventFilter + * Gets the default type url for FunnelFilterExpression * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentEventFilter + * @memberof google.analytics.data.v1alpha.FunnelFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentEventFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; }; - return SegmentEventFilter; + return FunnelFilterExpression; })(); - v1alpha.SegmentParameterFilterExpression = (function() { + v1alpha.FunnelFilterExpressionList = (function() { /** - * Properties of a SegmentParameterFilterExpression. + * Properties of a FunnelFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterExpression - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [andGroup] SegmentParameterFilterExpression andGroup - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null} [orGroup] SegmentParameterFilterExpression orGroup - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null} [notExpression] SegmentParameterFilterExpression notExpression - * @property {google.analytics.data.v1alpha.ISegmentParameterFilter|null} [segmentParameterFilter] SegmentParameterFilterExpression segmentParameterFilter + * @interface IFunnelFilterExpressionList + * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions */ /** - * Constructs a new SegmentParameterFilterExpression. + * Constructs a new FunnelFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterExpression. - * @implements ISegmentParameterFilterExpression + * @classdesc Represents a FunnelFilterExpressionList. + * @implements IFunnelFilterExpressionList * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set */ - function SegmentParameterFilterExpression(properties) { + function FunnelFilterExpressionList(properties) { + this.expressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38831,331 +42141,228 @@ } /** - * SegmentParameterFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.andGroup = null; - - /** - * SegmentParameterFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.orGroup = null; - - /** - * SegmentParameterFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.notExpression = null; - - /** - * SegmentParameterFilterExpression segmentParameterFilter. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilter|null|undefined} segmentParameterFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @instance - */ - SegmentParameterFilterExpression.prototype.segmentParameterFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SegmentParameterFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"segmentParameterFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * FunnelFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @instance */ - Object.defineProperty(SegmentParameterFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "segmentParameterFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Creates a new SegmentParameterFilterExpression instance using the specified properties. + * Creates a new FunnelFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression instance + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance */ - SegmentParameterFilterExpression.create = function create(properties) { - return new SegmentParameterFilterExpression(properties); + FunnelFilterExpressionList.create = function create(properties) { + return new FunnelFilterExpressionList(properties); }; /** - * Encodes the specified SegmentParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterExpression.encode = function encode(message, writer) { + FunnelFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.segmentParameterFilter != null && Object.hasOwnProperty.call(message, "segmentParameterFilter")) - $root.google.analytics.data.v1alpha.SegmentParameterFilter.encode(message.segmentParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify|verify} messages. + * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpression} message SegmentParameterFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer. + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilterExpression.decode = function decode(reader, length, error) { + FunnelFilterExpressionList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.decode(reader, reader.uint32()); + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentParameterFilterExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentParameterFilterExpression message. - * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentParameterFilterExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilter.verify(message.segmentParameterFilter); + break; + } + } + return message; + }; + + /** + * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunnelFilterExpressionList message. + * @function verify + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunnelFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); if (error) - return "segmentParameterFilter." + error; + return "expressions." + error; } } return null; }; /** - * Creates a SegmentParameterFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpression} SegmentParameterFilterExpression + * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList */ - SegmentParameterFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression) + FunnelFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.notExpression); - } - if (object.segmentParameterFilter != null) { - if (typeof object.segmentParameterFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpression.segmentParameterFilter: object expected"); - message.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.fromObject(object.segmentParameterFilter); + var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); + } } return message; }; /** - * Creates a plain object from a SegmentParameterFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpression} message SegmentParameterFilterExpression + * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentParameterFilterExpression.toObject = function toObject(message, options) { + FunnelFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.segmentParameterFilter != null && message.hasOwnProperty("segmentParameterFilter")) { - object.segmentParameterFilter = $root.google.analytics.data.v1alpha.SegmentParameterFilter.toObject(message.segmentParameterFilter, options); - if (options.oneofs) - object.expr = "segmentParameterFilter"; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); } return object; }; /** - * Converts this SegmentParameterFilterExpression to JSON. + * Converts this FunnelFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @instance * @returns {Object.} JSON object */ - SegmentParameterFilterExpression.prototype.toJSON = function toJSON() { + FunnelFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentParameterFilterExpression + * Gets the default type url for FunnelFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; }; - return SegmentParameterFilterExpression; + return FunnelFilterExpressionList; })(); - v1alpha.SegmentParameterFilterExpressionList = (function() { + v1alpha.FunnelFieldFilter = (function() { /** - * Properties of a SegmentParameterFilterExpressionList. + * Properties of a FunnelFieldFilter. * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterExpressionList - * @property {Array.|null} [expressions] SegmentParameterFilterExpressionList expressions + * @interface IFunnelFieldFilter + * @property {string|null} [fieldName] FunnelFieldFilter fieldName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter */ /** - * Constructs a new SegmentParameterFilterExpressionList. + * Constructs a new FunnelFieldFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterExpressionList. - * @implements ISegmentParameterFilterExpressionList + * @classdesc Represents a FunnelFieldFilter. + * @implements IFunnelFieldFilter * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set */ - function SegmentParameterFilterExpressionList(properties) { - this.expressions = []; + function FunnelFieldFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39163,80 +42370,147 @@ } /** - * SegmentParameterFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * FunnelFieldFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @instance */ - SegmentParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + FunnelFieldFilter.prototype.fieldName = ""; /** - * Creates a new SegmentParameterFilterExpressionList instance using the specified properties. + * FunnelFieldFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.stringFilter = null; + + /** + * FunnelFieldFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.inListFilter = null; + + /** + * FunnelFieldFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.numericFilter = null; + + /** + * FunnelFieldFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + FunnelFieldFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelFieldFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @instance + */ + Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelFieldFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList instance + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance */ - SegmentParameterFilterExpressionList.create = function create(properties) { - return new SegmentParameterFilterExpressionList(properties); + FunnelFieldFilter.create = function create(properties) { + return new FunnelFieldFilter(properties); }; /** - * Encodes the specified SegmentParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterExpressionList.encode = function encode(message, writer) { + FunnelFieldFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.verify|verify} messages. + * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer. + * Decodes a FunnelFieldFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilterExpressionList.decode = function decode(reader, length, error) { + FunnelFieldFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.decode(reader, reader.uint32())); + message.fieldName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); break; } default: @@ -39248,145 +42522,202 @@ }; /** - * Decodes a SegmentParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentParameterFilterExpressionList message. + * Verifies a FunnelFieldFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentParameterFilterExpressionList.verify = function verify(message) { + FunnelFieldFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.verify(message.expressions[i]); + var properties = {}; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); if (error) - return "expressions." + error; + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; } } return null; }; /** - * Creates a SegmentParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} SegmentParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter */ - SegmentParameterFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) + FunnelFieldFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.fromObject(object.expressions[i]); - } + var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); } return message; }; /** - * Creates a plain object from a SegmentParameterFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterExpressionList} message SegmentParameterFilterExpressionList + * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentParameterFilterExpressionList.toObject = function toObject(message, options) { + FunnelFieldFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.SegmentParameterFilterExpression.toObject(message.expressions[j], options); + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; } return object; }; /** - * Converts this SegmentParameterFilterExpressionList to JSON. + * Converts this FunnelFieldFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @instance * @returns {Object.} JSON object */ - SegmentParameterFilterExpressionList.prototype.toJSON = function toJSON() { + FunnelFieldFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentParameterFilterExpressionList + * Gets the default type url for FunnelFieldFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelFieldFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; }; - return SegmentParameterFilterExpressionList; + return FunnelFieldFilter; })(); - v1alpha.SegmentParameterFilter = (function() { + v1alpha.FunnelEventFilter = (function() { /** - * Properties of a SegmentParameterFilter. + * Properties of a FunnelEventFilter. * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilter - * @property {string|null} [eventParameterName] SegmentParameterFilter eventParameterName - * @property {string|null} [itemParameterName] SegmentParameterFilter itemParameterName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] SegmentParameterFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] SegmentParameterFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] SegmentParameterFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] SegmentParameterFilter betweenFilter - * @property {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null} [filterScoping] SegmentParameterFilter filterScoping + * @interface IFunnelEventFilter + * @property {string|null} [eventName] FunnelEventFilter eventName + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression */ /** - * Constructs a new SegmentParameterFilter. + * Constructs a new FunnelEventFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilter. - * @implements ISegmentParameterFilter + * @classdesc Represents a FunnelEventFilter. + * @implements IFunnelEventFilter * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set */ - function SegmentParameterFilter(properties) { + function FunnelEventFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39394,186 +42725,106 @@ } /** - * SegmentParameterFilter eventParameterName. - * @member {string|null|undefined} eventParameterName - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.eventParameterName = null; - - /** - * SegmentParameterFilter itemParameterName. - * @member {string|null|undefined} itemParameterName - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.itemParameterName = null; - - /** - * SegmentParameterFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.stringFilter = null; - - /** - * SegmentParameterFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.inListFilter = null; - - /** - * SegmentParameterFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - SegmentParameterFilter.prototype.numericFilter = null; - - /** - * SegmentParameterFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * FunnelEventFilter eventName. + * @member {string|null|undefined} eventName + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @instance */ - SegmentParameterFilter.prototype.betweenFilter = null; + FunnelEventFilter.prototype.eventName = null; /** - * SegmentParameterFilter filterScoping. - * @member {google.analytics.data.v1alpha.ISegmentParameterFilterScoping|null|undefined} filterScoping - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * FunnelEventFilter funnelParameterFilterExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @instance */ - SegmentParameterFilter.prototype.filterScoping = null; + FunnelEventFilter.prototype.funnelParameterFilterExpression = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * SegmentParameterFilter oneParameter. - * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - Object.defineProperty(SegmentParameterFilter.prototype, "oneParameter", { - get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), set: $util.oneOfSetter($oneOfFields) }); - /** - * SegmentParameterFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter - * @instance - */ - Object.defineProperty(SegmentParameterFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + // Virtual OneOf for proto3 optional field + Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { + get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentParameterFilter instance using the specified properties. + * Creates a new FunnelEventFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter instance + * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance */ - SegmentParameterFilter.create = function create(properties) { - return new SegmentParameterFilter(properties); + FunnelEventFilter.create = function create(properties) { + return new FunnelEventFilter(properties); }; /** - * Encodes the specified SegmentParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilter.encode = function encode(message, writer) { + FunnelEventFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); - if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.filterScoping != null && Object.hasOwnProperty.call(message, "filterScoping")) - $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.encode(message.filterScoping, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilter.verify|verify} messages. + * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilter} message SegmentParameterFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer. + * Decodes a FunnelEventFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilter.decode = function decode(reader, length, error) { + FunnelEventFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventParameterName = reader.string(); + message.eventName = reader.string(); break; } case 2: { - message.itemParameterName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); - break; - } - case 8: { - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.decode(reader, reader.uint32()); + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -39585,232 +42836,147 @@ }; /** - * Decodes a SegmentParameterFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilter.decodeDelimited = function decodeDelimited(reader) { + FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentParameterFilter message. + * Verifies a FunnelEventFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentParameterFilter.verify = function verify(message) { + FunnelEventFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - properties.oneParameter = 1; - if (!$util.isString(message.eventParameterName)) - return "eventParameterName: string expected"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - if (properties.oneParameter === 1) - return "oneParameter: multiple values"; - properties.oneParameter = 1; - if (!$util.isString(message.itemParameterName)) - return "itemParameterName: string expected"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + properties._funnelParameterFilterExpression = 1; { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); if (error) - return "betweenFilter." + error; + return "funnelParameterFilterExpression." + error; } } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) { - var error = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify(message.filterScoping); - if (error) - return "filterScoping." + error; - } return null; }; /** - * Creates a SegmentParameterFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilter} SegmentParameterFilter + * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter */ - SegmentParameterFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilter) + FunnelEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilter(); - if (object.eventParameterName != null) - message.eventParameterName = String(object.eventParameterName); - if (object.itemParameterName != null) - message.itemParameterName = String(object.itemParameterName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); - } - if (object.filterScoping != null) { - if (typeof object.filterScoping !== "object") - throw TypeError(".google.analytics.data.v1alpha.SegmentParameterFilter.filterScoping: object expected"); - message.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.fromObject(object.filterScoping); + var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.funnelParameterFilterExpression != null) { + if (typeof object.funnelParameterFilterExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); + message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); } return message; }; /** - * Creates a plain object from a SegmentParameterFilter message. Also converts values to other types if specified. + * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilter} message SegmentParameterFilter + * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentParameterFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.filterScoping = null; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - object.eventParameterName = message.eventParameterName; - if (options.oneofs) - object.oneParameter = "eventParameterName"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - object.itemParameterName = message.itemParameterName; - if (options.oneofs) - object.oneParameter = "itemParameterName"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + * @returns {Object.} Plain object + */ + FunnelEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; if (options.oneofs) - object.oneFilter = "numericFilter"; + object._eventName = "eventName"; } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { + object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); if (options.oneofs) - object.oneFilter = "betweenFilter"; + object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; } - if (message.filterScoping != null && message.hasOwnProperty("filterScoping")) - object.filterScoping = $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping.toObject(message.filterScoping, options); return object; }; /** - * Converts this SegmentParameterFilter to JSON. + * Converts this FunnelEventFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @instance * @returns {Object.} JSON object */ - SegmentParameterFilter.prototype.toJSON = function toJSON() { + FunnelEventFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentParameterFilter + * Gets the default type url for FunnelEventFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelEventFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; }; - return SegmentParameterFilter; + return FunnelEventFilter; })(); - v1alpha.SegmentParameterFilterScoping = (function() { + v1alpha.FunnelParameterFilterExpression = (function() { /** - * Properties of a SegmentParameterFilterScoping. + * Properties of a FunnelParameterFilterExpression. * @memberof google.analytics.data.v1alpha - * @interface ISegmentParameterFilterScoping - * @property {number|Long|null} [inAnyNDayPeriod] SegmentParameterFilterScoping inAnyNDayPeriod + * @interface IFunnelParameterFilterExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup + * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression + * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter */ /** - * Constructs a new SegmentParameterFilterScoping. + * Constructs a new FunnelParameterFilterExpression. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SegmentParameterFilterScoping. - * @implements ISegmentParameterFilterScoping + * @classdesc Represents a FunnelParameterFilterExpression. + * @implements IFunnelParameterFilterExpression * @constructor - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set */ - function SegmentParameterFilterScoping(properties) { + function FunnelParameterFilterExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39818,86 +42984,133 @@ } /** - * SegmentParameterFilterScoping inAnyNDayPeriod. - * @member {number|Long|null|undefined} inAnyNDayPeriod - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * FunnelParameterFilterExpression andGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @instance */ - SegmentParameterFilterScoping.prototype.inAnyNDayPeriod = null; + FunnelParameterFilterExpression.prototype.andGroup = null; + + /** + * FunnelParameterFilterExpression orGroup. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.orGroup = null; + + /** + * FunnelParameterFilterExpression notExpression. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.notExpression = null; + + /** + * FunnelParameterFilterExpression funnelParameterFilter. + * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field - Object.defineProperty(SegmentParameterFilterScoping.prototype, "_inAnyNDayPeriod", { - get: $util.oneOfGetter($oneOfFields = ["inAnyNDayPeriod"]), + /** + * FunnelParameterFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @instance + */ + Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SegmentParameterFilterScoping instance using the specified properties. + * Creates a new FunnelParameterFilterExpression instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping instance + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance */ - SegmentParameterFilterScoping.create = function create(properties) { - return new SegmentParameterFilterScoping(properties); + FunnelParameterFilterExpression.create = function create(properties) { + return new FunnelParameterFilterExpression(properties); }; /** - * Encodes the specified SegmentParameterFilterScoping message. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterScoping.encode = function encode(message, writer) { + FunnelParameterFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.inAnyNDayPeriod); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) + $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SegmentParameterFilterScoping message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SegmentParameterFilterScoping.verify|verify} messages. + * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.ISegmentParameterFilterScoping} message SegmentParameterFilterScoping message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SegmentParameterFilterScoping.encodeDelimited = function encodeDelimited(message, writer) { + FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer. + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilterScoping.decode = function decode(reader, length, error) { + FunnelParameterFilterExpression.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.inAnyNDayPeriod = reader.int64(); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); break; } default: @@ -39909,140 +43122,193 @@ }; /** - * Decodes a SegmentParameterFilterScoping message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SegmentParameterFilterScoping.decodeDelimited = function decodeDelimited(reader) { + FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SegmentParameterFilterScoping message. + * Verifies a FunnelParameterFilterExpression message. * @function verify - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SegmentParameterFilterScoping.verify = function verify(message) { + FunnelParameterFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { - properties._inAnyNDayPeriod = 1; - if (!$util.isInteger(message.inAnyNDayPeriod) && !(message.inAnyNDayPeriod && $util.isInteger(message.inAnyNDayPeriod.low) && $util.isInteger(message.inAnyNDayPeriod.high))) - return "inAnyNDayPeriod: integer|Long expected"; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); + if (error) + return "funnelParameterFilter." + error; + } } return null; }; /** - * Creates a SegmentParameterFilterScoping message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SegmentParameterFilterScoping} SegmentParameterFilterScoping + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression */ - SegmentParameterFilterScoping.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping) + FunnelParameterFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) return object; - var message = new $root.google.analytics.data.v1alpha.SegmentParameterFilterScoping(); - if (object.inAnyNDayPeriod != null) - if ($util.Long) - (message.inAnyNDayPeriod = $util.Long.fromValue(object.inAnyNDayPeriod)).unsigned = false; - else if (typeof object.inAnyNDayPeriod === "string") - message.inAnyNDayPeriod = parseInt(object.inAnyNDayPeriod, 10); - else if (typeof object.inAnyNDayPeriod === "number") - message.inAnyNDayPeriod = object.inAnyNDayPeriod; - else if (typeof object.inAnyNDayPeriod === "object") - message.inAnyNDayPeriod = new $util.LongBits(object.inAnyNDayPeriod.low >>> 0, object.inAnyNDayPeriod.high >>> 0).toNumber(); + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); + } + if (object.funnelParameterFilter != null) { + if (typeof object.funnelParameterFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); + message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); + } return message; }; /** - * Creates a plain object from a SegmentParameterFilterScoping message. Also converts values to other types if specified. + * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static - * @param {google.analytics.data.v1alpha.SegmentParameterFilterScoping} message SegmentParameterFilterScoping + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SegmentParameterFilterScoping.toObject = function toObject(message, options) { + FunnelParameterFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) { - if (typeof message.inAnyNDayPeriod === "number") - object.inAnyNDayPeriod = options.longs === String ? String(message.inAnyNDayPeriod) : message.inAnyNDayPeriod; - else - object.inAnyNDayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.inAnyNDayPeriod) : options.longs === Number ? new $util.LongBits(message.inAnyNDayPeriod.low >>> 0, message.inAnyNDayPeriod.high >>> 0).toNumber() : message.inAnyNDayPeriod; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); if (options.oneofs) - object._inAnyNDayPeriod = "inAnyNDayPeriod"; + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { + object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); + if (options.oneofs) + object.expr = "funnelParameterFilter"; } return object; }; /** - * Converts this SegmentParameterFilterScoping to JSON. + * Converts this FunnelParameterFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @instance * @returns {Object.} JSON object */ - SegmentParameterFilterScoping.prototype.toJSON = function toJSON() { + FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SegmentParameterFilterScoping + * Gets the default type url for FunnelParameterFilterExpression * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SegmentParameterFilterScoping + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SegmentParameterFilterScoping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SegmentParameterFilterScoping"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; }; - return SegmentParameterFilterScoping; + return FunnelParameterFilterExpression; })(); - v1alpha.FunnelFilterExpression = (function() { + v1alpha.FunnelParameterFilterExpressionList = (function() { /** - * Properties of a FunnelFilterExpression. + * Properties of a FunnelParameterFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @interface IFunnelFilterExpression - * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [andGroup] FunnelFilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null} [orGroup] FunnelFilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFunnelFilterExpression|null} [notExpression] FunnelFilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFunnelFieldFilter|null} [funnelFieldFilter] FunnelFilterExpression funnelFieldFilter - * @property {google.analytics.data.v1alpha.IFunnelEventFilter|null} [funnelEventFilter] FunnelFilterExpression funnelEventFilter + * @interface IFunnelParameterFilterExpressionList + * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions */ /** - * Constructs a new FunnelFilterExpression. + * Constructs a new FunnelParameterFilterExpressionList. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFilterExpression. - * @implements IFunnelFilterExpression + * @classdesc Represents a FunnelParameterFilterExpressionList. + * @implements IFunnelParameterFilterExpressionList * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set */ - function FunnelFilterExpression(properties) { + function FunnelParameterFilterExpressionList(properties) { + this.expressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40050,147 +43316,80 @@ } /** - * FunnelFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.andGroup = null; - - /** - * FunnelFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.orGroup = null; - - /** - * FunnelFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFunnelFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.notExpression = null; - - /** - * FunnelFilterExpression funnelFieldFilter. - * @member {google.analytics.data.v1alpha.IFunnelFieldFilter|null|undefined} funnelFieldFilter - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.funnelFieldFilter = null; - - /** - * FunnelFilterExpression funnelEventFilter. - * @member {google.analytics.data.v1alpha.IFunnelEventFilter|null|undefined} funnelEventFilter - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression - * @instance - */ - FunnelFilterExpression.prototype.funnelEventFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FunnelFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"funnelFieldFilter"|"funnelEventFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * FunnelParameterFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @instance */ - Object.defineProperty(FunnelFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelFieldFilter", "funnelEventFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Creates a new FunnelFilterExpression instance using the specified properties. + * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression instance + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance */ - FunnelFilterExpression.create = function create(properties) { - return new FunnelFilterExpression(properties); + FunnelParameterFilterExpressionList.create = function create(properties) { + return new FunnelParameterFilterExpressionList(properties); }; /** - * Encodes the specified FunnelFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFilterExpression.encode = function encode(message, writer) { + FunnelParameterFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelFieldFilter != null && Object.hasOwnProperty.call(message, "funnelFieldFilter")) - $root.google.analytics.data.v1alpha.FunnelFieldFilter.encode(message.funnelFieldFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.funnelEventFilter != null && Object.hasOwnProperty.call(message, "funnelEventFilter")) - $root.google.analytics.data.v1alpha.FunnelEventFilter.encode(message.funnelEventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpression.verify|verify} messages. + * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpression} message FunnelFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer. + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFilterExpression.decode = function decode(reader, length, error) { + FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.decode(reader, reader.uint32()); + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); break; } default: @@ -40202,213 +43401,144 @@ }; /** - * Decodes a FunnelFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFilterExpression.decodeDelimited = function decodeDelimited(reader) { + FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelFilterExpression message. + * Verifies a FunnelParameterFilterExpressionList message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelFilterExpression.verify = function verify(message) { + FunnelParameterFilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelFieldFilter.verify(message.funnelFieldFilter); - if (error) - return "funnelFieldFilter." + error; - } - } - if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelEventFilter.verify(message.funnelEventFilter); + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); if (error) - return "funnelEventFilter." + error; + return "expressions." + error; } } return null; }; /** - * Creates a FunnelFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFilterExpression} FunnelFilterExpression + * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList */ - FunnelFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpression) + FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.notExpression); - } - if (object.funnelFieldFilter != null) { - if (typeof object.funnelFieldFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelFieldFilter: object expected"); - message.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.fromObject(object.funnelFieldFilter); - } - if (object.funnelEventFilter != null) { - if (typeof object.funnelEventFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpression.funnelEventFilter: object expected"); - message.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.fromObject(object.funnelEventFilter); + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); + } } return message; }; /** - * Creates a plain object from a FunnelFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static - * @param {google.analytics.data.v1alpha.FunnelFilterExpression} message FunnelFilterExpression + * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelFilterExpression.toObject = function toObject(message, options) { + FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FunnelFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.funnelFieldFilter != null && message.hasOwnProperty("funnelFieldFilter")) { - object.funnelFieldFilter = $root.google.analytics.data.v1alpha.FunnelFieldFilter.toObject(message.funnelFieldFilter, options); - if (options.oneofs) - object.expr = "funnelFieldFilter"; - } - if (message.funnelEventFilter != null && message.hasOwnProperty("funnelEventFilter")) { - object.funnelEventFilter = $root.google.analytics.data.v1alpha.FunnelEventFilter.toObject(message.funnelEventFilter, options); - if (options.oneofs) - object.expr = "funnelEventFilter"; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); } return object; }; /** - * Converts this FunnelFilterExpression to JSON. + * Converts this FunnelParameterFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @instance * @returns {Object.} JSON object */ - FunnelFilterExpression.prototype.toJSON = function toJSON() { + FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelFilterExpression + * Gets the default type url for FunnelParameterFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFilterExpression + * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; }; - return FunnelFilterExpression; + return FunnelParameterFilterExpressionList; })(); - v1alpha.FunnelFilterExpressionList = (function() { + v1alpha.FunnelParameterFilter = (function() { /** - * Properties of a FunnelFilterExpressionList. + * Properties of a FunnelParameterFilter. * @memberof google.analytics.data.v1alpha - * @interface IFunnelFilterExpressionList - * @property {Array.|null} [expressions] FunnelFilterExpressionList expressions + * @interface IFunnelParameterFilter + * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName + * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName + * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter + * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter + * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter + * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter */ /** - * Constructs a new FunnelFilterExpressionList. + * Constructs a new FunnelParameterFilter. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFilterExpressionList. - * @implements IFunnelFilterExpressionList + * @classdesc Represents a FunnelParameterFilter. + * @implements IFunnelParameterFilter * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set */ - function FunnelFilterExpressionList(properties) { - this.expressions = []; + function FunnelParameterFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40416,80 +43546,172 @@ } /** - * FunnelFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * FunnelParameterFilter eventParameterName. + * @member {string|null|undefined} eventParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @instance */ - FunnelFilterExpressionList.prototype.expressions = $util.emptyArray; + FunnelParameterFilter.prototype.eventParameterName = null; /** - * Creates a new FunnelFilterExpressionList instance using the specified properties. + * FunnelParameterFilter itemParameterName. + * @member {string|null|undefined} itemParameterName + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.itemParameterName = null; + + /** + * FunnelParameterFilter stringFilter. + * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.stringFilter = null; + + /** + * FunnelParameterFilter inListFilter. + * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.inListFilter = null; + + /** + * FunnelParameterFilter numericFilter. + * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.numericFilter = null; + + /** + * FunnelParameterFilter betweenFilter. + * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + FunnelParameterFilter.prototype.betweenFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FunnelParameterFilter oneParameter. + * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { + get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FunnelParameterFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @instance + */ + Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FunnelParameterFilter instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList instance + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance */ - FunnelFilterExpressionList.create = function create(properties) { - return new FunnelFilterExpressionList(properties); + FunnelParameterFilter.create = function create(properties) { + return new FunnelParameterFilter(properties); }; /** - * Encodes the specified FunnelFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFilterExpressionList.encode = function encode(message, writer) { + FunnelParameterFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FunnelFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); + if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFilterExpressionList.verify|verify} messages. + * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static - * @param {google.analytics.data.v1alpha.IFunnelFilterExpressionList} message FunnelFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer. + * Decodes a FunnelParameterFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFilterExpressionList.decode = function decode(reader, length, error) { + FunnelParameterFilter.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FunnelFilterExpression.decode(reader, reader.uint32())); + message.eventParameterName = reader.string(); + break; + } + case 2: { + message.itemParameterName = reader.string(); + break; + } + case 4: { + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); break; } default: @@ -40501,291 +43723,300 @@ }; /** - * Decodes a FunnelFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelFilterExpressionList message. + * Verifies a FunnelParameterFilter message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelFilterExpressionList.verify = function verify(message) { + FunnelParameterFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelFilterExpression.verify(message.expressions[i]); + var properties = {}; + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + properties.oneParameter = 1; + if (!$util.isString(message.eventParameterName)) + return "eventParameterName: string expected"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + if (properties.oneParameter === 1) + return "oneParameter: multiple values"; + properties.oneParameter = 1; + if (!$util.isString(message.itemParameterName)) + return "itemParameterName: string expected"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); if (error) - return "expressions." + error; + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; } } return null; }; /** - * Creates a FunnelFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFilterExpressionList} FunnelFilterExpressionList + * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter */ - FunnelFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFilterExpressionList) + FunnelParameterFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.fromObject(object.expressions[i]); - } + var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + if (object.eventParameterName != null) + message.eventParameterName = String(object.eventParameterName); + if (object.itemParameterName != null) + message.itemParameterName = String(object.itemParameterName); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); } return message; }; /** - * Creates a plain object from a FunnelFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static - * @param {google.analytics.data.v1alpha.FunnelFilterExpressionList} message FunnelFilterExpressionList + * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelFilterExpressionList.toObject = function toObject(message, options) { + FunnelParameterFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelFilterExpression.toObject(message.expressions[j], options); + if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { + object.eventParameterName = message.eventParameterName; + if (options.oneofs) + object.oneParameter = "eventParameterName"; + } + if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { + object.itemParameterName = message.itemParameterName; + if (options.oneofs) + object.oneParameter = "itemParameterName"; + } + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; } return object; }; /** - * Converts this FunnelFilterExpressionList to JSON. + * Converts this FunnelParameterFilter to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @instance * @returns {Object.} JSON object */ - FunnelFilterExpressionList.prototype.toJSON = function toJSON() { + FunnelParameterFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelFilterExpressionList + * Gets the default type url for FunnelParameterFilter * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFilterExpressionList + * @memberof google.analytics.data.v1alpha.FunnelParameterFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; }; - return FunnelFilterExpressionList; + return FunnelParameterFilter; })(); - v1alpha.FunnelFieldFilter = (function() { - - /** - * Properties of a FunnelFieldFilter. - * @memberof google.analytics.data.v1alpha - * @interface IFunnelFieldFilter - * @property {string|null} [fieldName] FunnelFieldFilter fieldName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelFieldFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelFieldFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelFieldFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelFieldFilter betweenFilter - */ - - /** - * Constructs a new FunnelFieldFilter. - * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelFieldFilter. - * @implements IFunnelFieldFilter - * @constructor - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set - */ - function FunnelFieldFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FunnelFieldFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.fieldName = ""; - - /** - * FunnelFieldFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.stringFilter = null; - - /** - * FunnelFieldFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.inListFilter = null; - - /** - * FunnelFieldFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance - */ - FunnelFieldFilter.prototype.numericFilter = null; - + v1alpha.FunnelResponseMetadata = (function() { + /** - * FunnelFieldFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter - * @instance + * Properties of a FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @interface IFunnelResponseMetadata + * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas */ - FunnelFieldFilter.prototype.betweenFilter = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new FunnelResponseMetadata. + * @memberof google.analytics.data.v1alpha + * @classdesc Represents a FunnelResponseMetadata. + * @implements IFunnelResponseMetadata + * @constructor + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + */ + function FunnelResponseMetadata(properties) { + this.samplingMetadatas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * FunnelFieldFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * FunnelResponseMetadata samplingMetadatas. + * @member {Array.} samplingMetadatas + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @instance */ - Object.defineProperty(FunnelFieldFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; /** - * Creates a new FunnelFieldFilter instance using the specified properties. + * Creates a new FunnelResponseMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter instance + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance */ - FunnelFieldFilter.create = function create(properties) { - return new FunnelFieldFilter(properties); + FunnelResponseMetadata.create = function create(properties) { + return new FunnelResponseMetadata(properties); }; /** - * Encodes the specified FunnelFieldFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFieldFilter.encode = function encode(message, writer) { + FunnelResponseMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.samplingMetadatas != null && message.samplingMetadatas.length) + for (var i = 0; i < message.samplingMetadatas.length; ++i) + $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FunnelFieldFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelFieldFilter.verify|verify} messages. + * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelFieldFilter} message FunnelFieldFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelFieldFilter.encodeDelimited = function encodeDelimited(message, writer) { + FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer. + * Decodes a FunnelResponseMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFieldFilter.decode = function decode(reader, length, error) { + FunnelResponseMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.fieldName = reader.string(); - break; - } - case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + if (!(message.samplingMetadatas && message.samplingMetadatas.length)) + message.samplingMetadatas = []; + message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); break; } default: @@ -40797,202 +44028,140 @@ }; /** - * Decodes a FunnelFieldFilter message from the specified reader or buffer, length delimited. + * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelFieldFilter.decodeDelimited = function decodeDelimited(reader) { + FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelFieldFilter message. + * Verifies a FunnelResponseMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelFieldFilter.verify = function verify(message) { + FunnelResponseMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); + if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { + if (!Array.isArray(message.samplingMetadatas)) + return "samplingMetadatas: array expected"; + for (var i = 0; i < message.samplingMetadatas.length; ++i) { + var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); if (error) - return "betweenFilter." + error; + return "samplingMetadatas." + error; } } return null; }; /** - * Creates a FunnelFieldFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelFieldFilter} FunnelFieldFilter + * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata */ - FunnelFieldFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelFieldFilter) + FunnelResponseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelFieldFilter(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelFieldFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + if (object.samplingMetadatas) { + if (!Array.isArray(object.samplingMetadatas)) + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); + message.samplingMetadatas = []; + for (var i = 0; i < object.samplingMetadatas.length; ++i) { + if (typeof object.samplingMetadatas[i] !== "object") + throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); + message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); + } } return message; }; /** - * Creates a plain object from a FunnelFieldFilter message. Also converts values to other types if specified. + * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static - * @param {google.analytics.data.v1alpha.FunnelFieldFilter} message FunnelFieldFilter + * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelFieldFilter.toObject = function toObject(message, options) { + FunnelResponseMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; + if (options.arrays || options.defaults) + object.samplingMetadatas = []; + if (message.samplingMetadatas && message.samplingMetadatas.length) { + object.samplingMetadatas = []; + for (var j = 0; j < message.samplingMetadatas.length; ++j) + object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); } return object; }; /** - * Converts this FunnelFieldFilter to JSON. + * Converts this FunnelResponseMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @instance * @returns {Object.} JSON object */ - FunnelFieldFilter.prototype.toJSON = function toJSON() { + FunnelResponseMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelFieldFilter + * Gets the default type url for FunnelResponseMetadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelFieldFilter + * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelFieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelFieldFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; }; - return FunnelFieldFilter; + return FunnelResponseMetadata; })(); - v1alpha.FunnelEventFilter = (function() { + v1alpha.SamplingMetadata = (function() { /** - * Properties of a FunnelEventFilter. + * Properties of a SamplingMetadata. * @memberof google.analytics.data.v1alpha - * @interface IFunnelEventFilter - * @property {string|null} [eventName] FunnelEventFilter eventName - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [funnelParameterFilterExpression] FunnelEventFilter funnelParameterFilterExpression + * @interface ISamplingMetadata + * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount + * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize */ /** - * Constructs a new FunnelEventFilter. + * Constructs a new SamplingMetadata. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelEventFilter. - * @implements IFunnelEventFilter + * @classdesc Represents a SamplingMetadata. + * @implements ISamplingMetadata * @constructor - * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set */ - function FunnelEventFilter(properties) { + function SamplingMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41000,106 +44169,91 @@ } /** - * FunnelEventFilter eventName. - * @member {string|null|undefined} eventName - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * SamplingMetadata samplesReadCount. + * @member {number|Long} samplesReadCount + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @instance */ - FunnelEventFilter.prototype.eventName = null; + SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FunnelEventFilter funnelParameterFilterExpression. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} funnelParameterFilterExpression - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * SamplingMetadata samplingSpaceSize. + * @member {number|Long} samplingSpaceSize + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @instance */ - FunnelEventFilter.prototype.funnelParameterFilterExpression = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelEventFilter.prototype, "_eventName", { - get: $util.oneOfGetter($oneOfFields = ["eventName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FunnelEventFilter.prototype, "_funnelParameterFilterExpression", { - get: $util.oneOfGetter($oneOfFields = ["funnelParameterFilterExpression"]), - set: $util.oneOfSetter($oneOfFields) - }); + SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new FunnelEventFilter instance using the specified properties. + * Creates a new SamplingMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter instance + * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance */ - FunnelEventFilter.create = function create(properties) { - return new FunnelEventFilter(properties); + SamplingMetadata.create = function create(properties) { + return new SamplingMetadata(properties); }; /** - * Encodes the specified FunnelEventFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelEventFilter.encode = function encode(message, writer) { + SamplingMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.funnelParameterFilterExpression != null && Object.hasOwnProperty.call(message, "funnelParameterFilterExpression")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.funnelParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); + if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); return writer; }; /** - * Encodes the specified FunnelEventFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelEventFilter.verify|verify} messages. + * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelEventFilter} message FunnelEventFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelEventFilter message from the specified reader or buffer. + * Decodes a SamplingMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelEventFilter.decode = function decode(reader, length, error) { + SamplingMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventName = reader.string(); + message.samplesReadCount = reader.int64(); break; } case 2: { - message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); + message.samplingSpaceSize = reader.int64(); break; } default: @@ -41111,147 +44265,251 @@ }; /** - * Decodes a FunnelEventFilter message from the specified reader or buffer, length delimited. + * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelEventFilter.decodeDelimited = function decodeDelimited(reader) { + SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelEventFilter message. + * Verifies a SamplingMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelEventFilter.verify = function verify(message) { + SamplingMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - properties._eventName = 1; - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - } - if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { - properties._funnelParameterFilterExpression = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.funnelParameterFilterExpression); - if (error) - return "funnelParameterFilterExpression." + error; - } - } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) + return "samplesReadCount: integer|Long expected"; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) + return "samplingSpaceSize: integer|Long expected"; return null; }; /** - * Creates a FunnelEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelEventFilter} FunnelEventFilter + * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata */ - FunnelEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelEventFilter) + SamplingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.funnelParameterFilterExpression != null) { - if (typeof object.funnelParameterFilterExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelEventFilter.funnelParameterFilterExpression: object expected"); - message.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.funnelParameterFilterExpression); - } + var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + if (object.samplesReadCount != null) + if ($util.Long) + (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; + else if (typeof object.samplesReadCount === "string") + message.samplesReadCount = parseInt(object.samplesReadCount, 10); + else if (typeof object.samplesReadCount === "number") + message.samplesReadCount = object.samplesReadCount; + else if (typeof object.samplesReadCount === "object") + message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); + if (object.samplingSpaceSize != null) + if ($util.Long) + (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; + else if (typeof object.samplingSpaceSize === "string") + message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); + else if (typeof object.samplingSpaceSize === "number") + message.samplingSpaceSize = object.samplingSpaceSize; + else if (typeof object.samplingSpaceSize === "object") + message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FunnelEventFilter message. Also converts values to other types if specified. + * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @static - * @param {google.analytics.data.v1alpha.FunnelEventFilter} message FunnelEventFilter + * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelEventFilter.toObject = function toObject(message, options) { + SamplingMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.eventName != null && message.hasOwnProperty("eventName")) { - object.eventName = message.eventName; - if (options.oneofs) - object._eventName = "eventName"; - } - if (message.funnelParameterFilterExpression != null && message.hasOwnProperty("funnelParameterFilterExpression")) { - object.funnelParameterFilterExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.funnelParameterFilterExpression, options); - if (options.oneofs) - object._funnelParameterFilterExpression = "funnelParameterFilterExpression"; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplesReadCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.samplingSpaceSize = options.longs === String ? "0" : 0; } + if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) + if (typeof message.samplesReadCount === "number") + object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; + else + object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; + if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) + if (typeof message.samplingSpaceSize === "number") + object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; + else + object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; return object; }; /** - * Converts this FunnelEventFilter to JSON. + * Converts this SamplingMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelEventFilter + * @memberof google.analytics.data.v1alpha.SamplingMetadata * @instance * @returns {Object.} JSON object */ - FunnelEventFilter.prototype.toJSON = function toJSON() { + SamplingMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for FunnelEventFilter - * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelEventFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FunnelEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelEventFilter"; - }; + /** + * Gets the default type url for SamplingMetadata + * @function getTypeUrl + * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; + }; + + return SamplingMetadata; + })(); + + /** + * MetricAggregation enum. + * @name google.analytics.data.v1alpha.MetricAggregation + * @enum {number} + * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value + * @property {number} TOTAL=1 TOTAL value + * @property {number} MINIMUM=5 MINIMUM value + * @property {number} MAXIMUM=6 MAXIMUM value + * @property {number} COUNT=4 COUNT value + */ + v1alpha.MetricAggregation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL"] = 1; + values[valuesById[5] = "MINIMUM"] = 5; + values[valuesById[6] = "MAXIMUM"] = 6; + values[valuesById[4] = "COUNT"] = 4; + return values; + })(); + + /** + * MetricType enum. + * @name google.analytics.data.v1alpha.MetricType + * @enum {number} + * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value + * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value + * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value + * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value + * @property {number} TYPE_HOURS=7 TYPE_HOURS value + * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value + * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value + * @property {number} TYPE_FEET=10 TYPE_FEET value + * @property {number} TYPE_MILES=11 TYPE_MILES value + * @property {number} TYPE_METERS=12 TYPE_METERS value + * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value + */ + v1alpha.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INTEGER"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[4] = "TYPE_SECONDS"] = 4; + values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; + values[valuesById[6] = "TYPE_MINUTES"] = 6; + values[valuesById[7] = "TYPE_HOURS"] = 7; + values[valuesById[8] = "TYPE_STANDARD"] = 8; + values[valuesById[9] = "TYPE_CURRENCY"] = 9; + values[valuesById[10] = "TYPE_FEET"] = 10; + values[valuesById[11] = "TYPE_MILES"] = 11; + values[valuesById[12] = "TYPE_METERS"] = 12; + values[valuesById[13] = "TYPE_KILOMETERS"] = 13; + return values; + })(); - return FunnelEventFilter; + /** + * RestrictedMetricType enum. + * @name google.analytics.data.v1alpha.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + v1alpha.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; })(); - v1alpha.FunnelParameterFilterExpression = (function() { + /** + * SamplingLevel enum. + * @name google.analytics.data.v1alpha.SamplingLevel + * @enum {number} + * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} UNSAMPLED=3 UNSAMPLED value + */ + v1alpha.SamplingLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "UNSAMPLED"] = 3; + return values; + })(); + + v1alpha.ConversionSpec = (function() { /** - * Properties of a FunnelParameterFilterExpression. + * Properties of a ConversionSpec. * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilterExpression - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [andGroup] FunnelParameterFilterExpression andGroup - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null} [orGroup] FunnelParameterFilterExpression orGroup - * @property {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null} [notExpression] FunnelParameterFilterExpression notExpression - * @property {google.analytics.data.v1alpha.IFunnelParameterFilter|null} [funnelParameterFilter] FunnelParameterFilterExpression funnelParameterFilter + * @interface IConversionSpec + * @property {Array.|null} [conversionActions] ConversionSpec conversionActions + * @property {google.analytics.data.v1alpha.ConversionSpec.AttributionModel|null} [attributionModel] ConversionSpec attributionModel */ /** - * Constructs a new FunnelParameterFilterExpression. + * Constructs a new ConversionSpec. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilterExpression. - * @implements IFunnelParameterFilterExpression + * @classdesc Represents a ConversionSpec. + * @implements IConversionSpec * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set */ - function FunnelParameterFilterExpression(properties) { + function ConversionSpec(properties) { + this.conversionActions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41259,133 +44517,94 @@ } /** - * FunnelParameterFilterExpression andGroup. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.andGroup = null; - - /** - * FunnelParameterFilterExpression orGroup. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.orGroup = null; - - /** - * FunnelParameterFilterExpression notExpression. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilterExpression|null|undefined} notExpression - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @instance - */ - FunnelParameterFilterExpression.prototype.notExpression = null; - - /** - * FunnelParameterFilterExpression funnelParameterFilter. - * @member {google.analytics.data.v1alpha.IFunnelParameterFilter|null|undefined} funnelParameterFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * ConversionSpec conversionActions. + * @member {Array.} conversionActions + * @memberof google.analytics.data.v1alpha.ConversionSpec * @instance */ - FunnelParameterFilterExpression.prototype.funnelParameterFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ConversionSpec.prototype.conversionActions = $util.emptyArray; /** - * FunnelParameterFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"funnelParameterFilter"|undefined} expr - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * ConversionSpec attributionModel. + * @member {google.analytics.data.v1alpha.ConversionSpec.AttributionModel} attributionModel + * @memberof google.analytics.data.v1alpha.ConversionSpec * @instance */ - Object.defineProperty(FunnelParameterFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "funnelParameterFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + ConversionSpec.prototype.attributionModel = 0; /** - * Creates a new FunnelParameterFilterExpression instance using the specified properties. + * Creates a new ConversionSpec instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression instance + * @param {google.analytics.data.v1alpha.IConversionSpec=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec instance */ - FunnelParameterFilterExpression.create = function create(properties) { - return new FunnelParameterFilterExpression(properties); + ConversionSpec.create = function create(properties) { + return new ConversionSpec(properties); }; /** - * Encodes the specified FunnelParameterFilterExpression message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * Encodes the specified ConversionSpec message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilterExpression.encode = function encode(message, writer) { + ConversionSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.funnelParameterFilter != null && Object.hasOwnProperty.call(message, "funnelParameterFilter")) - $root.google.analytics.data.v1alpha.FunnelParameterFilter.encode(message.funnelParameterFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conversionActions != null && message.conversionActions.length) + for (var i = 0; i < message.conversionActions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionActions[i]); + if (message.attributionModel != null && Object.hasOwnProperty.call(message, "attributionModel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attributionModel); return writer; }; /** - * Encodes the specified FunnelParameterFilterExpression message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify|verify} messages. + * Encodes the specified ConversionSpec message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpression} message FunnelParameterFilterExpression message or plain object to encode + * @param {google.analytics.data.v1alpha.IConversionSpec} message ConversionSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + ConversionSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer. + * Decodes a ConversionSpec message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilterExpression.decode = function decode(reader, length, error) { + ConversionSpec.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); + if (!(message.conversionActions && message.conversionActions.length)) + message.conversionActions = []; + message.conversionActions.push(reader.string()); break; } case 2: { - message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.decode(reader, reader.uint32()); + message.attributionModel = reader.int32(); break; } default: @@ -41397,193 +44616,191 @@ }; /** - * Decodes a FunnelParameterFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a ConversionSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilterExpression.decodeDelimited = function decodeDelimited(reader) { + ConversionSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelParameterFilterExpression message. + * Verifies a ConversionSpec message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelParameterFilterExpression.verify = function verify(message) { + ConversionSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilter.verify(message.funnelParameterFilter); - if (error) - return "funnelParameterFilter." + error; - } - } - return null; - }; - - /** - * Creates a FunnelParameterFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpression} FunnelParameterFilterExpression - */ - FunnelParameterFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression) - return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.notExpression); - } - if (object.funnelParameterFilter != null) { - if (typeof object.funnelParameterFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpression.funnelParameterFilter: object expected"); - message.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.fromObject(object.funnelParameterFilter); + if (message.conversionActions != null && message.hasOwnProperty("conversionActions")) { + if (!Array.isArray(message.conversionActions)) + return "conversionActions: array expected"; + for (var i = 0; i < message.conversionActions.length; ++i) + if (!$util.isString(message.conversionActions[i])) + return "conversionActions: string[] expected"; + } + if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) + switch (message.attributionModel) { + default: + return "attributionModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ConversionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.data.v1alpha.ConversionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.data.v1alpha.ConversionSpec} ConversionSpec + */ + ConversionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ConversionSpec) + return object; + var message = new $root.google.analytics.data.v1alpha.ConversionSpec(); + if (object.conversionActions) { + if (!Array.isArray(object.conversionActions)) + throw TypeError(".google.analytics.data.v1alpha.ConversionSpec.conversionActions: array expected"); + message.conversionActions = []; + for (var i = 0; i < object.conversionActions.length; ++i) + message.conversionActions[i] = String(object.conversionActions[i]); + } + switch (object.attributionModel) { + default: + if (typeof object.attributionModel === "number") { + message.attributionModel = object.attributionModel; + break; + } + break; + case "ATTRIBUTION_MODEL_UNSPECIFIED": + case 0: + message.attributionModel = 0; + break; + case "DATA_DRIVEN": + case 1: + message.attributionModel = 1; + break; + case "LAST_CLICK": + case 2: + message.attributionModel = 2; + break; } return message; }; /** - * Creates a plain object from a FunnelParameterFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a ConversionSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpression} message FunnelParameterFilterExpression + * @param {google.analytics.data.v1alpha.ConversionSpec} message ConversionSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelParameterFilterExpression.toObject = function toObject(message, options) { + ConversionSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.funnelParameterFilter != null && message.hasOwnProperty("funnelParameterFilter")) { - object.funnelParameterFilter = $root.google.analytics.data.v1alpha.FunnelParameterFilter.toObject(message.funnelParameterFilter, options); - if (options.oneofs) - object.expr = "funnelParameterFilter"; - } + if (options.arrays || options.defaults) + object.conversionActions = []; + if (options.defaults) + object.attributionModel = options.enums === String ? "ATTRIBUTION_MODEL_UNSPECIFIED" : 0; + if (message.conversionActions && message.conversionActions.length) { + object.conversionActions = []; + for (var j = 0; j < message.conversionActions.length; ++j) + object.conversionActions[j] = message.conversionActions[j]; + } + if (message.attributionModel != null && message.hasOwnProperty("attributionModel")) + object.attributionModel = options.enums === String ? $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] === undefined ? message.attributionModel : $root.google.analytics.data.v1alpha.ConversionSpec.AttributionModel[message.attributionModel] : message.attributionModel; return object; }; /** - * Converts this FunnelParameterFilterExpression to JSON. + * Converts this ConversionSpec to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @instance * @returns {Object.} JSON object */ - FunnelParameterFilterExpression.prototype.toJSON = function toJSON() { + ConversionSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelParameterFilterExpression + * Gets the default type url for ConversionSpec * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpression + * @memberof google.analytics.data.v1alpha.ConversionSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelParameterFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpression"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionSpec"; }; - return FunnelParameterFilterExpression; + /** + * AttributionModel enum. + * @name google.analytics.data.v1alpha.ConversionSpec.AttributionModel + * @enum {number} + * @property {number} ATTRIBUTION_MODEL_UNSPECIFIED=0 ATTRIBUTION_MODEL_UNSPECIFIED value + * @property {number} DATA_DRIVEN=1 DATA_DRIVEN value + * @property {number} LAST_CLICK=2 LAST_CLICK value + */ + ConversionSpec.AttributionModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_DRIVEN"] = 1; + values[valuesById[2] = "LAST_CLICK"] = 2; + return values; + })(); + + return ConversionSpec; })(); - v1alpha.FunnelParameterFilterExpressionList = (function() { + v1alpha.DimensionMetadata = (function() { /** - * Properties of a FunnelParameterFilterExpressionList. + * Properties of a DimensionMetadata. * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilterExpressionList - * @property {Array.|null} [expressions] FunnelParameterFilterExpressionList expressions + * @interface IDimensionMetadata + * @property {string|null} [apiName] DimensionMetadata apiName + * @property {string|null} [uiName] DimensionMetadata uiName + * @property {string|null} [description] DimensionMetadata description + * @property {Array.|null} [deprecatedApiNames] DimensionMetadata deprecatedApiNames + * @property {boolean|null} [customDefinition] DimensionMetadata customDefinition + * @property {string|null} [category] DimensionMetadata category + * @property {Array.|null} [sections] DimensionMetadata sections */ /** - * Constructs a new FunnelParameterFilterExpressionList. + * Constructs a new DimensionMetadata. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilterExpressionList. - * @implements IFunnelParameterFilterExpressionList + * @classdesc Represents a DimensionMetadata. + * @implements IDimensionMetadata * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set */ - function FunnelParameterFilterExpressionList(properties) { - this.expressions = []; + function DimensionMetadata(properties) { + this.deprecatedApiNames = []; + this.sections = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41591,80 +44808,175 @@ } /** - * FunnelParameterFilterExpressionList expressions. - * @member {Array.} expressions - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * DimensionMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @instance */ - FunnelParameterFilterExpressionList.prototype.expressions = $util.emptyArray; + DimensionMetadata.prototype.apiName = ""; /** - * Creates a new FunnelParameterFilterExpressionList instance using the specified properties. + * DimensionMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.uiName = ""; + + /** + * DimensionMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.description = ""; + + /** + * DimensionMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.deprecatedApiNames = $util.emptyArray; + + /** + * DimensionMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.customDefinition = false; + + /** + * DimensionMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.category = ""; + + /** + * DimensionMetadata sections. + * @member {Array.} sections + * @memberof google.analytics.data.v1alpha.DimensionMetadata + * @instance + */ + DimensionMetadata.prototype.sections = $util.emptyArray; + + /** + * Creates a new DimensionMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList instance + * @param {google.analytics.data.v1alpha.IDimensionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata instance */ - FunnelParameterFilterExpressionList.create = function create(properties) { - return new FunnelParameterFilterExpressionList(properties); + DimensionMetadata.create = function create(properties) { + return new DimensionMetadata(properties); }; /** - * Encodes the specified FunnelParameterFilterExpressionList message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * Encodes the specified DimensionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilterExpressionList.encode = function encode(message, writer) { + DimensionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expressions != null && message.expressions.length) - for (var i = 0; i < message.expressions.length; ++i) - $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.customDefinition); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.category); + if (message.sections != null && message.sections.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.sections.length; ++i) + writer.int32(message.sections[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified FunnelParameterFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.verify|verify} messages. + * Encodes the specified DimensionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.DimensionMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList message or plain object to encode + * @param {google.analytics.data.v1alpha.IDimensionMetadata} message DimensionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + DimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer. + * Decodes a DimensionMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilterExpressionList.decode = function decode(reader, length, error) { + DimensionMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.expressions && message.expressions.length)) - message.expressions = []; - message.expressions.push($root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.decode(reader, reader.uint32())); + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); + break; + } + case 5: { + message.customDefinition = reader.bool(); + break; + } + case 6: { + message.category = reader.string(); + break; + } + case 7: { + if (!(message.sections && message.sections.length)) + message.sections = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sections.push(reader.int32()); + } else + message.sections.push(reader.int32()); break; } default: @@ -41676,144 +44988,233 @@ }; /** - * Decodes a FunnelParameterFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a DimensionMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + DimensionMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelParameterFilterExpressionList message. + * Verifies a DimensionMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelParameterFilterExpressionList.verify = function verify(message) { + DimensionMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expressions != null && message.hasOwnProperty("expressions")) { - if (!Array.isArray(message.expressions)) - return "expressions: array expected"; - for (var i = 0; i < message.expressions.length; ++i) { - var error = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.verify(message.expressions[i]); - if (error) - return "expressions." + error; - } + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.sections != null && message.hasOwnProperty("sections")) { + if (!Array.isArray(message.sections)) + return "sections: array expected"; + for (var i = 0; i < message.sections.length; ++i) + switch (message.sections[i]) { + default: + return "sections: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } return null; }; /** - * Creates a FunnelParameterFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a DimensionMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} FunnelParameterFilterExpressionList + * @returns {google.analytics.data.v1alpha.DimensionMetadata} DimensionMetadata */ - FunnelParameterFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList) + DimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.DimensionMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilterExpressionList(); - if (object.expressions) { - if (!Array.isArray(object.expressions)) - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: array expected"); - message.expressions = []; - for (var i = 0; i < object.expressions.length; ++i) { - if (typeof object.expressions[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilterExpressionList.expressions: object expected"); - message.expressions[i] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.fromObject(object.expressions[i]); - } + var message = new $root.google.analytics.data.v1alpha.DimensionMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); + } + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.category != null) + message.category = String(object.category); + if (object.sections) { + if (!Array.isArray(object.sections)) + throw TypeError(".google.analytics.data.v1alpha.DimensionMetadata.sections: array expected"); + message.sections = []; + for (var i = 0; i < object.sections.length; ++i) + switch (object.sections[i]) { + default: + if (typeof object.sections[i] === "number") { + message.sections[i] = object.sections[i]; + break; + } + case "SECTION_UNSPECIFIED": + case 0: + message.sections[i] = 0; + break; + case "SECTION_REPORT": + case 1: + message.sections[i] = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.sections[i] = 2; + break; + } } return message; }; /** - * Creates a plain object from a FunnelParameterFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from a DimensionMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilterExpressionList} message FunnelParameterFilterExpressionList + * @param {google.analytics.data.v1alpha.DimensionMetadata} message DimensionMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelParameterFilterExpressionList.toObject = function toObject(message, options) { + DimensionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.expressions = []; - if (message.expressions && message.expressions.length) { - object.expressions = []; - for (var j = 0; j < message.expressions.length; ++j) - object.expressions[j] = $root.google.analytics.data.v1alpha.FunnelParameterFilterExpression.toObject(message.expressions[j], options); + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.sections = []; + } + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.customDefinition = false; + object.category = ""; + } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; + } + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.sections && message.sections.length) { + object.sections = []; + for (var j = 0; j < message.sections.length; ++j) + object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; } return object; }; /** - * Converts this FunnelParameterFilterExpressionList to JSON. + * Converts this DimensionMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @instance * @returns {Object.} JSON object */ - FunnelParameterFilterExpressionList.prototype.toJSON = function toJSON() { + DimensionMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelParameterFilterExpressionList + * Gets the default type url for DimensionMetadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilterExpressionList + * @memberof google.analytics.data.v1alpha.DimensionMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelParameterFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.DimensionMetadata"; }; - return FunnelParameterFilterExpressionList; + return DimensionMetadata; })(); - v1alpha.FunnelParameterFilter = (function() { + v1alpha.MetricMetadata = (function() { /** - * Properties of a FunnelParameterFilter. + * Properties of a MetricMetadata. * @memberof google.analytics.data.v1alpha - * @interface IFunnelParameterFilter - * @property {string|null} [eventParameterName] FunnelParameterFilter eventParameterName - * @property {string|null} [itemParameterName] FunnelParameterFilter itemParameterName - * @property {google.analytics.data.v1alpha.IStringFilter|null} [stringFilter] FunnelParameterFilter stringFilter - * @property {google.analytics.data.v1alpha.IInListFilter|null} [inListFilter] FunnelParameterFilter inListFilter - * @property {google.analytics.data.v1alpha.INumericFilter|null} [numericFilter] FunnelParameterFilter numericFilter - * @property {google.analytics.data.v1alpha.IBetweenFilter|null} [betweenFilter] FunnelParameterFilter betweenFilter + * @interface IMetricMetadata + * @property {string|null} [apiName] MetricMetadata apiName + * @property {string|null} [uiName] MetricMetadata uiName + * @property {string|null} [description] MetricMetadata description + * @property {Array.|null} [deprecatedApiNames] MetricMetadata deprecatedApiNames + * @property {google.analytics.data.v1alpha.MetricType|null} [type] MetricMetadata type + * @property {string|null} [expression] MetricMetadata expression + * @property {boolean|null} [customDefinition] MetricMetadata customDefinition + * @property {Array.|null} [blockedReasons] MetricMetadata blockedReasons + * @property {string|null} [category] MetricMetadata category + * @property {Array.|null} [sections] MetricMetadata sections */ /** - * Constructs a new FunnelParameterFilter. + * Constructs a new MetricMetadata. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelParameterFilter. - * @implements IFunnelParameterFilter + * @classdesc Represents a MetricMetadata. + * @implements IMetricMetadata * @constructor - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set */ - function FunnelParameterFilter(properties) { + function MetricMetadata(properties) { + this.deprecatedApiNames = []; + this.blockedReasons = []; + this.sections = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41821,172 +45222,228 @@ } /** - * FunnelParameterFilter eventParameterName. - * @member {string|null|undefined} eventParameterName - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.eventParameterName = null; + MetricMetadata.prototype.apiName = ""; /** - * FunnelParameterFilter itemParameterName. - * @member {string|null|undefined} itemParameterName - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.itemParameterName = null; + MetricMetadata.prototype.uiName = ""; /** - * FunnelParameterFilter stringFilter. - * @member {google.analytics.data.v1alpha.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.stringFilter = null; + MetricMetadata.prototype.description = ""; /** - * FunnelParameterFilter inListFilter. - * @member {google.analytics.data.v1alpha.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata deprecatedApiNames. + * @member {Array.} deprecatedApiNames + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.inListFilter = null; + MetricMetadata.prototype.deprecatedApiNames = $util.emptyArray; /** - * FunnelParameterFilter numericFilter. - * @member {google.analytics.data.v1alpha.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata type. + * @member {google.analytics.data.v1alpha.MetricType} type + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.numericFilter = null; + MetricMetadata.prototype.type = 0; /** - * FunnelParameterFilter betweenFilter. - * @member {google.analytics.data.v1alpha.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata expression. + * @member {string} expression + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - FunnelParameterFilter.prototype.betweenFilter = null; + MetricMetadata.prototype.expression = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MetricMetadata customDefinition. + * @member {boolean} customDefinition + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.customDefinition = false; /** - * FunnelParameterFilter oneParameter. - * @member {"eventParameterName"|"itemParameterName"|undefined} oneParameter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata blockedReasons. + * @member {Array.} blockedReasons + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - Object.defineProperty(FunnelParameterFilter.prototype, "oneParameter", { - get: $util.oneOfGetter($oneOfFields = ["eventParameterName", "itemParameterName"]), - set: $util.oneOfSetter($oneOfFields) - }); + MetricMetadata.prototype.blockedReasons = $util.emptyArray; /** - * FunnelParameterFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * MetricMetadata category. + * @member {string} category + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance */ - Object.defineProperty(FunnelParameterFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + MetricMetadata.prototype.category = ""; /** - * Creates a new FunnelParameterFilter instance using the specified properties. + * MetricMetadata sections. + * @member {Array.} sections + * @memberof google.analytics.data.v1alpha.MetricMetadata + * @instance + */ + MetricMetadata.prototype.sections = $util.emptyArray; + + /** + * Creates a new MetricMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter instance + * @param {google.analytics.data.v1alpha.IMetricMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata instance */ - FunnelParameterFilter.create = function create(properties) { - return new FunnelParameterFilter(properties); + MetricMetadata.create = function create(properties) { + return new MetricMetadata(properties); }; /** - * Encodes the specified FunnelParameterFilter message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * Encodes the specified MetricMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilter.encode = function encode(message, writer) { + MetricMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventParameterName != null && Object.hasOwnProperty.call(message, "eventParameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventParameterName); - if (message.itemParameterName != null && Object.hasOwnProperty.call(message, "itemParameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.itemParameterName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.data.v1alpha.StringFilter.encode(message.stringFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.data.v1alpha.InListFilter.encode(message.inListFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.data.v1alpha.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.data.v1alpha.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.deprecatedApiNames != null && message.deprecatedApiNames.length) + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deprecatedApiNames[i]); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.expression); + if (message.customDefinition != null && Object.hasOwnProperty.call(message, "customDefinition")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.customDefinition); + if (message.blockedReasons != null && message.blockedReasons.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.blockedReasons.length; ++i) + writer.int32(message.blockedReasons[i]); + writer.ldelim(); + } + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.category); + if (message.sections != null && message.sections.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.sections.length; ++i) + writer.int32(message.sections[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified FunnelParameterFilter message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelParameterFilter.verify|verify} messages. + * Encodes the specified MetricMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.MetricMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelParameterFilter} message FunnelParameterFilter message or plain object to encode + * @param {google.analytics.data.v1alpha.IMetricMetadata} message MetricMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelParameterFilter.encodeDelimited = function encodeDelimited(message, writer) { + MetricMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer. + * Decodes a MetricMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilter.decode = function decode(reader, length, error) { + MetricMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.MetricMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.eventParameterName = reader.string(); + message.apiName = reader.string(); break; } case 2: { - message.itemParameterName = reader.string(); + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); break; } case 4: { - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.decode(reader, reader.uint32()); + if (!(message.deprecatedApiNames && message.deprecatedApiNames.length)) + message.deprecatedApiNames = []; + message.deprecatedApiNames.push(reader.string()); break; } case 5: { - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.decode(reader, reader.uint32()); + message.type = reader.int32(); break; } case 6: { - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.decode(reader, reader.uint32()); + message.expression = reader.string(); break; } case 7: { - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.decode(reader, reader.uint32()); + message.customDefinition = reader.bool(); + break; + } + case 8: { + if (!(message.blockedReasons && message.blockedReasons.length)) + message.blockedReasons = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.blockedReasons.push(reader.int32()); + } else + message.blockedReasons.push(reader.int32()); + break; + } + case 9: { + message.category = reader.string(); + break; + } + case 10: { + if (!(message.sections && message.sections.length)) + message.sections = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sections.push(reader.int32()); + } else + message.sections.push(reader.int32()); break; } default: @@ -41998,219 +45455,373 @@ }; /** - * Decodes a FunnelParameterFilter message from the specified reader or buffer, length delimited. + * Decodes a MetricMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelParameterFilter.decodeDelimited = function decodeDelimited(reader) { + MetricMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelParameterFilter message. + * Verifies a MetricMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelParameterFilter.verify = function verify(message) { + MetricMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - properties.oneParameter = 1; - if (!$util.isString(message.eventParameterName)) - return "eventParameterName: string expected"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - if (properties.oneParameter === 1) - return "oneParameter: multiple values"; - properties.oneParameter = 1; - if (!$util.isString(message.itemParameterName)) - return "itemParameterName: string expected"; - } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecatedApiNames != null && message.hasOwnProperty("deprecatedApiNames")) { + if (!Array.isArray(message.deprecatedApiNames)) + return "deprecatedApiNames: array expected"; + for (var i = 0; i < message.deprecatedApiNames.length; ++i) + if (!$util.isString(message.deprecatedApiNames[i])) + return "deprecatedApiNames: string[] expected"; } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + if (typeof message.customDefinition !== "boolean") + return "customDefinition: boolean expected"; + if (message.blockedReasons != null && message.hasOwnProperty("blockedReasons")) { + if (!Array.isArray(message.blockedReasons)) + return "blockedReasons: array expected"; + for (var i = 0; i < message.blockedReasons.length; ++i) + switch (message.blockedReasons[i]) { + default: + return "blockedReasons: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.data.v1alpha.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.sections != null && message.hasOwnProperty("sections")) { + if (!Array.isArray(message.sections)) + return "sections: array expected"; + for (var i = 0; i < message.sections.length; ++i) + switch (message.sections[i]) { + default: + return "sections: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } return null; }; /** - * Creates a FunnelParameterFilter message from a plain object. Also converts values to their respective internal types. + * Creates a MetricMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelParameterFilter} FunnelParameterFilter + * @returns {google.analytics.data.v1alpha.MetricMetadata} MetricMetadata */ - FunnelParameterFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelParameterFilter) + MetricMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.MetricMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelParameterFilter(); - if (object.eventParameterName != null) - message.eventParameterName = String(object.eventParameterName); - if (object.itemParameterName != null) - message.itemParameterName = String(object.itemParameterName); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.fromObject(object.stringFilter); + var message = new $root.google.analytics.data.v1alpha.MetricMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); + if (object.deprecatedApiNames) { + if (!Array.isArray(object.deprecatedApiNames)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.deprecatedApiNames: array expected"); + message.deprecatedApiNames = []; + for (var i = 0; i < object.deprecatedApiNames.length; ++i) + message.deprecatedApiNames[i] = String(object.deprecatedApiNames[i]); } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.fromObject(object.inListFilter); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_INTEGER": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_SECONDS": + case 4: + message.type = 4; + break; + case "TYPE_MILLISECONDS": + case 5: + message.type = 5; + break; + case "TYPE_MINUTES": + case 6: + message.type = 6; + break; + case "TYPE_HOURS": + case 7: + message.type = 7; + break; + case "TYPE_STANDARD": + case 8: + message.type = 8; + break; + case "TYPE_CURRENCY": + case 9: + message.type = 9; + break; + case "TYPE_FEET": + case 10: + message.type = 10; + break; + case "TYPE_MILES": + case 11: + message.type = 11; + break; + case "TYPE_METERS": + case 12: + message.type = 12; + break; + case "TYPE_KILOMETERS": + case 13: + message.type = 13; + break; } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.fromObject(object.numericFilter); + if (object.expression != null) + message.expression = String(object.expression); + if (object.customDefinition != null) + message.customDefinition = Boolean(object.customDefinition); + if (object.blockedReasons) { + if (!Array.isArray(object.blockedReasons)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.blockedReasons: array expected"); + message.blockedReasons = []; + for (var i = 0; i < object.blockedReasons.length; ++i) + switch (object.blockedReasons[i]) { + default: + if (typeof object.blockedReasons[i] === "number") { + message.blockedReasons[i] = object.blockedReasons[i]; + break; + } + case "BLOCKED_REASON_UNSPECIFIED": + case 0: + message.blockedReasons[i] = 0; + break; + case "NO_REVENUE_METRICS": + case 1: + message.blockedReasons[i] = 1; + break; + case "NO_COST_METRICS": + case 2: + message.blockedReasons[i] = 2; + break; + } } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelParameterFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.fromObject(object.betweenFilter); + if (object.category != null) + message.category = String(object.category); + if (object.sections) { + if (!Array.isArray(object.sections)) + throw TypeError(".google.analytics.data.v1alpha.MetricMetadata.sections: array expected"); + message.sections = []; + for (var i = 0; i < object.sections.length; ++i) + switch (object.sections[i]) { + default: + if (typeof object.sections[i] === "number") { + message.sections[i] = object.sections[i]; + break; + } + case "SECTION_UNSPECIFIED": + case 0: + message.sections[i] = 0; + break; + case "SECTION_REPORT": + case 1: + message.sections[i] = 1; + break; + case "SECTION_ADVERTISING": + case 2: + message.sections[i] = 2; + break; + } } return message; }; /** - * Creates a plain object from a FunnelParameterFilter message. Also converts values to other types if specified. + * Creates a plain object from a MetricMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static - * @param {google.analytics.data.v1alpha.FunnelParameterFilter} message FunnelParameterFilter + * @param {google.analytics.data.v1alpha.MetricMetadata} message MetricMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelParameterFilter.toObject = function toObject(message, options) { + MetricMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.eventParameterName != null && message.hasOwnProperty("eventParameterName")) { - object.eventParameterName = message.eventParameterName; - if (options.oneofs) - object.oneParameter = "eventParameterName"; - } - if (message.itemParameterName != null && message.hasOwnProperty("itemParameterName")) { - object.itemParameterName = message.itemParameterName; - if (options.oneofs) - object.oneParameter = "itemParameterName"; + if (options.arrays || options.defaults) { + object.deprecatedApiNames = []; + object.blockedReasons = []; + object.sections = []; } - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.data.v1alpha.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; + object.type = options.enums === String ? "METRIC_TYPE_UNSPECIFIED" : 0; + object.expression = ""; + object.customDefinition = false; + object.category = ""; } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.data.v1alpha.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecatedApiNames && message.deprecatedApiNames.length) { + object.deprecatedApiNames = []; + for (var j = 0; j < message.deprecatedApiNames.length; ++j) + object.deprecatedApiNames[j] = message.deprecatedApiNames[j]; } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.data.v1alpha.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.data.v1alpha.MetricType[message.type] === undefined ? message.type : $root.google.analytics.data.v1alpha.MetricType[message.type] : message.type; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.customDefinition != null && message.hasOwnProperty("customDefinition")) + object.customDefinition = message.customDefinition; + if (message.blockedReasons && message.blockedReasons.length) { + object.blockedReasons = []; + for (var j = 0; j < message.blockedReasons.length; ++j) + object.blockedReasons[j] = options.enums === String ? $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] === undefined ? message.blockedReasons[j] : $root.google.analytics.data.v1alpha.MetricMetadata.BlockedReason[message.blockedReasons[j]] : message.blockedReasons[j]; } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.data.v1alpha.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.sections && message.sections.length) { + object.sections = []; + for (var j = 0; j < message.sections.length; ++j) + object.sections[j] = options.enums === String ? $root.google.analytics.data.v1alpha.Section[message.sections[j]] === undefined ? message.sections[j] : $root.google.analytics.data.v1alpha.Section[message.sections[j]] : message.sections[j]; } return object; }; /** - * Converts this FunnelParameterFilter to JSON. + * Converts this MetricMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @instance * @returns {Object.} JSON object */ - FunnelParameterFilter.prototype.toJSON = function toJSON() { + MetricMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelParameterFilter + * Gets the default type url for MetricMetadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelParameterFilter + * @memberof google.analytics.data.v1alpha.MetricMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelParameterFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetricMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelParameterFilter"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.MetricMetadata"; }; - return FunnelParameterFilter; + /** + * BlockedReason enum. + * @name google.analytics.data.v1alpha.MetricMetadata.BlockedReason + * @enum {number} + * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value + * @property {number} NO_REVENUE_METRICS=1 NO_REVENUE_METRICS value + * @property {number} NO_COST_METRICS=2 NO_COST_METRICS value + */ + MetricMetadata.BlockedReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_REVENUE_METRICS"] = 1; + values[valuesById[2] = "NO_COST_METRICS"] = 2; + return values; + })(); + + return MetricMetadata; })(); - v1alpha.FunnelResponseMetadata = (function() { + v1alpha.ComparisonMetadata = (function() { /** - * Properties of a FunnelResponseMetadata. + * Properties of a ComparisonMetadata. * @memberof google.analytics.data.v1alpha - * @interface IFunnelResponseMetadata - * @property {Array.|null} [samplingMetadatas] FunnelResponseMetadata samplingMetadatas + * @interface IComparisonMetadata + * @property {string|null} [apiName] ComparisonMetadata apiName + * @property {string|null} [uiName] ComparisonMetadata uiName + * @property {string|null} [description] ComparisonMetadata description */ /** - * Constructs a new FunnelResponseMetadata. + * Constructs a new ComparisonMetadata. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a FunnelResponseMetadata. - * @implements IFunnelResponseMetadata + * @classdesc Represents a ComparisonMetadata. + * @implements IComparisonMetadata * @constructor - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set */ - function FunnelResponseMetadata(properties) { - this.samplingMetadatas = []; + function ComparisonMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42218,80 +45829,105 @@ } /** - * FunnelResponseMetadata samplingMetadatas. - * @member {Array.} samplingMetadatas - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * ComparisonMetadata apiName. + * @member {string} apiName + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @instance */ - FunnelResponseMetadata.prototype.samplingMetadatas = $util.emptyArray; + ComparisonMetadata.prototype.apiName = ""; /** - * Creates a new FunnelResponseMetadata instance using the specified properties. + * ComparisonMetadata uiName. + * @member {string} uiName + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.uiName = ""; + + /** + * ComparisonMetadata description. + * @member {string} description + * @memberof google.analytics.data.v1alpha.ComparisonMetadata + * @instance + */ + ComparisonMetadata.prototype.description = ""; + + /** + * Creates a new ComparisonMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata instance + * @param {google.analytics.data.v1alpha.IComparisonMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata instance */ - FunnelResponseMetadata.create = function create(properties) { - return new FunnelResponseMetadata(properties); + ComparisonMetadata.create = function create(properties) { + return new ComparisonMetadata(properties); }; /** - * Encodes the specified FunnelResponseMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelResponseMetadata.encode = function encode(message, writer) { + ComparisonMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.samplingMetadatas != null && message.samplingMetadatas.length) - for (var i = 0; i < message.samplingMetadatas.length; ++i) - $root.google.analytics.data.v1alpha.SamplingMetadata.encode(message.samplingMetadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName); + if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified FunnelResponseMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.FunnelResponseMetadata.verify|verify} messages. + * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ComparisonMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static - * @param {google.analytics.data.v1alpha.IFunnelResponseMetadata} message FunnelResponseMetadata message or plain object to encode + * @param {google.analytics.data.v1alpha.IComparisonMetadata} message ComparisonMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FunnelResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer. + * Decodes a ComparisonMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelResponseMetadata.decode = function decode(reader, length, error) { + ComparisonMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.samplingMetadatas && message.samplingMetadatas.length)) - message.samplingMetadatas = []; - message.samplingMetadatas.push($root.google.analytics.data.v1alpha.SamplingMetadata.decode(reader, reader.uint32())); + message.apiName = reader.string(); + break; + } + case 2: { + message.uiName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); break; } default: @@ -42303,140 +45939,140 @@ }; /** - * Decodes a FunnelResponseMetadata message from the specified reader or buffer, length delimited. + * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FunnelResponseMetadata.decodeDelimited = function decodeDelimited(reader) { + ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FunnelResponseMetadata message. + * Verifies a ComparisonMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FunnelResponseMetadata.verify = function verify(message) { + ComparisonMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.samplingMetadatas != null && message.hasOwnProperty("samplingMetadatas")) { - if (!Array.isArray(message.samplingMetadatas)) - return "samplingMetadatas: array expected"; - for (var i = 0; i < message.samplingMetadatas.length; ++i) { - var error = $root.google.analytics.data.v1alpha.SamplingMetadata.verify(message.samplingMetadatas[i]); - if (error) - return "samplingMetadatas." + error; - } - } + if (message.apiName != null && message.hasOwnProperty("apiName")) + if (!$util.isString(message.apiName)) + return "apiName: string expected"; + if (message.uiName != null && message.hasOwnProperty("uiName")) + if (!$util.isString(message.uiName)) + return "uiName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a FunnelResponseMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.FunnelResponseMetadata} FunnelResponseMetadata - */ - FunnelResponseMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.FunnelResponseMetadata) + * @returns {google.analytics.data.v1alpha.ComparisonMetadata} ComparisonMetadata + */ + ComparisonMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ComparisonMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.FunnelResponseMetadata(); - if (object.samplingMetadatas) { - if (!Array.isArray(object.samplingMetadatas)) - throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: array expected"); - message.samplingMetadatas = []; - for (var i = 0; i < object.samplingMetadatas.length; ++i) { - if (typeof object.samplingMetadatas[i] !== "object") - throw TypeError(".google.analytics.data.v1alpha.FunnelResponseMetadata.samplingMetadatas: object expected"); - message.samplingMetadatas[i] = $root.google.analytics.data.v1alpha.SamplingMetadata.fromObject(object.samplingMetadatas[i]); - } - } + var message = new $root.google.analytics.data.v1alpha.ComparisonMetadata(); + if (object.apiName != null) + message.apiName = String(object.apiName); + if (object.uiName != null) + message.uiName = String(object.uiName); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a FunnelResponseMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static - * @param {google.analytics.data.v1alpha.FunnelResponseMetadata} message FunnelResponseMetadata + * @param {google.analytics.data.v1alpha.ComparisonMetadata} message ComparisonMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FunnelResponseMetadata.toObject = function toObject(message, options) { + ComparisonMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.samplingMetadatas = []; - if (message.samplingMetadatas && message.samplingMetadatas.length) { - object.samplingMetadatas = []; - for (var j = 0; j < message.samplingMetadatas.length; ++j) - object.samplingMetadatas[j] = $root.google.analytics.data.v1alpha.SamplingMetadata.toObject(message.samplingMetadatas[j], options); + if (options.defaults) { + object.apiName = ""; + object.uiName = ""; + object.description = ""; } + if (message.apiName != null && message.hasOwnProperty("apiName")) + object.apiName = message.apiName; + if (message.uiName != null && message.hasOwnProperty("uiName")) + object.uiName = message.uiName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this FunnelResponseMetadata to JSON. + * Converts this ComparisonMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @instance * @returns {Object.} JSON object */ - FunnelResponseMetadata.prototype.toJSON = function toJSON() { + ComparisonMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FunnelResponseMetadata + * Gets the default type url for ComparisonMetadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.FunnelResponseMetadata + * @memberof google.analytics.data.v1alpha.ComparisonMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FunnelResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.FunnelResponseMetadata"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.ComparisonMetadata"; }; - return FunnelResponseMetadata; + return ComparisonMetadata; })(); - v1alpha.SamplingMetadata = (function() { + v1alpha.ConversionMetadata = (function() { /** - * Properties of a SamplingMetadata. + * Properties of a ConversionMetadata. * @memberof google.analytics.data.v1alpha - * @interface ISamplingMetadata - * @property {number|Long|null} [samplesReadCount] SamplingMetadata samplesReadCount - * @property {number|Long|null} [samplingSpaceSize] SamplingMetadata samplingSpaceSize + * @interface IConversionMetadata + * @property {string|null} [conversionAction] ConversionMetadata conversionAction + * @property {string|null} [displayName] ConversionMetadata displayName */ /** - * Constructs a new SamplingMetadata. + * Constructs a new ConversionMetadata. * @memberof google.analytics.data.v1alpha - * @classdesc Represents a SamplingMetadata. - * @implements ISamplingMetadata + * @classdesc Represents a ConversionMetadata. + * @implements IConversionMetadata * @constructor - * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set + * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set */ - function SamplingMetadata(properties) { + function ConversionMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42444,91 +46080,91 @@ } /** - * SamplingMetadata samplesReadCount. - * @member {number|Long} samplesReadCount - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * ConversionMetadata conversionAction. + * @member {string} conversionAction + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @instance */ - SamplingMetadata.prototype.samplesReadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ConversionMetadata.prototype.conversionAction = ""; /** - * SamplingMetadata samplingSpaceSize. - * @member {number|Long} samplingSpaceSize - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * ConversionMetadata displayName. + * @member {string} displayName + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @instance */ - SamplingMetadata.prototype.samplingSpaceSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ConversionMetadata.prototype.displayName = ""; /** - * Creates a new SamplingMetadata instance using the specified properties. + * Creates a new ConversionMetadata instance using the specified properties. * @function create - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata=} [properties] Properties to set - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata instance + * @param {google.analytics.data.v1alpha.IConversionMetadata=} [properties] Properties to set + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata instance */ - SamplingMetadata.create = function create(properties) { - return new SamplingMetadata(properties); + ConversionMetadata.create = function create(properties) { + return new ConversionMetadata(properties); }; /** - * Encodes the specified SamplingMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * Encodes the specified ConversionMetadata message. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. * @function encode - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SamplingMetadata.encode = function encode(message, writer) { + ConversionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.samplesReadCount != null && Object.hasOwnProperty.call(message, "samplesReadCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.samplesReadCount); - if (message.samplingSpaceSize != null && Object.hasOwnProperty.call(message, "samplingSpaceSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.samplingSpaceSize); + if (message.conversionAction != null && Object.hasOwnProperty.call(message, "conversionAction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionAction); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified SamplingMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.SamplingMetadata.verify|verify} messages. + * Encodes the specified ConversionMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1alpha.ConversionMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static - * @param {google.analytics.data.v1alpha.ISamplingMetadata} message SamplingMetadata message or plain object to encode + * @param {google.analytics.data.v1alpha.IConversionMetadata} message ConversionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SamplingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ConversionMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SamplingMetadata message from the specified reader or buffer. + * Decodes a ConversionMetadata message from the specified reader or buffer. * @function decode - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SamplingMetadata.decode = function decode(reader, length, error) { + ConversionMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.samplesReadCount = reader.int64(); + message.conversionAction = reader.string(); break; } case 2: { - message.samplingSpaceSize = reader.int64(); + message.displayName = reader.string(); break; } default: @@ -42540,229 +46176,111 @@ }; /** - * Decodes a SamplingMetadata message from the specified reader or buffer, length delimited. + * Decodes a ConversionMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SamplingMetadata.decodeDelimited = function decodeDelimited(reader) { + ConversionMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SamplingMetadata message. + * Verifies a ConversionMetadata message. * @function verify - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SamplingMetadata.verify = function verify(message) { + ConversionMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (!$util.isInteger(message.samplesReadCount) && !(message.samplesReadCount && $util.isInteger(message.samplesReadCount.low) && $util.isInteger(message.samplesReadCount.high))) - return "samplesReadCount: integer|Long expected"; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (!$util.isInteger(message.samplingSpaceSize) && !(message.samplingSpaceSize && $util.isInteger(message.samplingSpaceSize.low) && $util.isInteger(message.samplingSpaceSize.high))) - return "samplingSpaceSize: integer|Long expected"; + if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) + if (!$util.isString(message.conversionAction)) + return "conversionAction: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a SamplingMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ConversionMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static * @param {Object.} object Plain object - * @returns {google.analytics.data.v1alpha.SamplingMetadata} SamplingMetadata + * @returns {google.analytics.data.v1alpha.ConversionMetadata} ConversionMetadata */ - SamplingMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.data.v1alpha.SamplingMetadata) + ConversionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.data.v1alpha.ConversionMetadata) return object; - var message = new $root.google.analytics.data.v1alpha.SamplingMetadata(); - if (object.samplesReadCount != null) - if ($util.Long) - (message.samplesReadCount = $util.Long.fromValue(object.samplesReadCount)).unsigned = false; - else if (typeof object.samplesReadCount === "string") - message.samplesReadCount = parseInt(object.samplesReadCount, 10); - else if (typeof object.samplesReadCount === "number") - message.samplesReadCount = object.samplesReadCount; - else if (typeof object.samplesReadCount === "object") - message.samplesReadCount = new $util.LongBits(object.samplesReadCount.low >>> 0, object.samplesReadCount.high >>> 0).toNumber(); - if (object.samplingSpaceSize != null) - if ($util.Long) - (message.samplingSpaceSize = $util.Long.fromValue(object.samplingSpaceSize)).unsigned = false; - else if (typeof object.samplingSpaceSize === "string") - message.samplingSpaceSize = parseInt(object.samplingSpaceSize, 10); - else if (typeof object.samplingSpaceSize === "number") - message.samplingSpaceSize = object.samplingSpaceSize; - else if (typeof object.samplingSpaceSize === "object") - message.samplingSpaceSize = new $util.LongBits(object.samplingSpaceSize.low >>> 0, object.samplingSpaceSize.high >>> 0).toNumber(); + var message = new $root.google.analytics.data.v1alpha.ConversionMetadata(); + if (object.conversionAction != null) + message.conversionAction = String(object.conversionAction); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a SamplingMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ConversionMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static - * @param {google.analytics.data.v1alpha.SamplingMetadata} message SamplingMetadata + * @param {google.analytics.data.v1alpha.ConversionMetadata} message ConversionMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SamplingMetadata.toObject = function toObject(message, options) { + ConversionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplesReadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplesReadCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.samplingSpaceSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.samplingSpaceSize = options.longs === String ? "0" : 0; + object.conversionAction = ""; + object.displayName = ""; } - if (message.samplesReadCount != null && message.hasOwnProperty("samplesReadCount")) - if (typeof message.samplesReadCount === "number") - object.samplesReadCount = options.longs === String ? String(message.samplesReadCount) : message.samplesReadCount; - else - object.samplesReadCount = options.longs === String ? $util.Long.prototype.toString.call(message.samplesReadCount) : options.longs === Number ? new $util.LongBits(message.samplesReadCount.low >>> 0, message.samplesReadCount.high >>> 0).toNumber() : message.samplesReadCount; - if (message.samplingSpaceSize != null && message.hasOwnProperty("samplingSpaceSize")) - if (typeof message.samplingSpaceSize === "number") - object.samplingSpaceSize = options.longs === String ? String(message.samplingSpaceSize) : message.samplingSpaceSize; - else - object.samplingSpaceSize = options.longs === String ? $util.Long.prototype.toString.call(message.samplingSpaceSize) : options.longs === Number ? new $util.LongBits(message.samplingSpaceSize.low >>> 0, message.samplingSpaceSize.high >>> 0).toNumber() : message.samplingSpaceSize; + if (message.conversionAction != null && message.hasOwnProperty("conversionAction")) + object.conversionAction = message.conversionAction; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this SamplingMetadata to JSON. + * Converts this ConversionMetadata to JSON. * @function toJSON - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @instance * @returns {Object.} JSON object */ - SamplingMetadata.prototype.toJSON = function toJSON() { + ConversionMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SamplingMetadata + * Gets the default type url for ConversionMetadata * @function getTypeUrl - * @memberof google.analytics.data.v1alpha.SamplingMetadata + * @memberof google.analytics.data.v1alpha.ConversionMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SamplingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.data.v1alpha.SamplingMetadata"; + return typeUrlPrefix + "/google.analytics.data.v1alpha.ConversionMetadata"; }; - return SamplingMetadata; - })(); - - /** - * MetricAggregation enum. - * @name google.analytics.data.v1alpha.MetricAggregation - * @enum {number} - * @property {number} METRIC_AGGREGATION_UNSPECIFIED=0 METRIC_AGGREGATION_UNSPECIFIED value - * @property {number} TOTAL=1 TOTAL value - * @property {number} MINIMUM=5 MINIMUM value - * @property {number} MAXIMUM=6 MAXIMUM value - * @property {number} COUNT=4 COUNT value - */ - v1alpha.MetricAggregation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_AGGREGATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOTAL"] = 1; - values[valuesById[5] = "MINIMUM"] = 5; - values[valuesById[6] = "MAXIMUM"] = 6; - values[valuesById[4] = "COUNT"] = 4; - return values; - })(); - - /** - * MetricType enum. - * @name google.analytics.data.v1alpha.MetricType - * @enum {number} - * @property {number} METRIC_TYPE_UNSPECIFIED=0 METRIC_TYPE_UNSPECIFIED value - * @property {number} TYPE_INTEGER=1 TYPE_INTEGER value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_SECONDS=4 TYPE_SECONDS value - * @property {number} TYPE_MILLISECONDS=5 TYPE_MILLISECONDS value - * @property {number} TYPE_MINUTES=6 TYPE_MINUTES value - * @property {number} TYPE_HOURS=7 TYPE_HOURS value - * @property {number} TYPE_STANDARD=8 TYPE_STANDARD value - * @property {number} TYPE_CURRENCY=9 TYPE_CURRENCY value - * @property {number} TYPE_FEET=10 TYPE_FEET value - * @property {number} TYPE_MILES=11 TYPE_MILES value - * @property {number} TYPE_METERS=12 TYPE_METERS value - * @property {number} TYPE_KILOMETERS=13 TYPE_KILOMETERS value - */ - v1alpha.MetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_INTEGER"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[4] = "TYPE_SECONDS"] = 4; - values[valuesById[5] = "TYPE_MILLISECONDS"] = 5; - values[valuesById[6] = "TYPE_MINUTES"] = 6; - values[valuesById[7] = "TYPE_HOURS"] = 7; - values[valuesById[8] = "TYPE_STANDARD"] = 8; - values[valuesById[9] = "TYPE_CURRENCY"] = 9; - values[valuesById[10] = "TYPE_FEET"] = 10; - values[valuesById[11] = "TYPE_MILES"] = 11; - values[valuesById[12] = "TYPE_METERS"] = 12; - values[valuesById[13] = "TYPE_KILOMETERS"] = 13; - return values; - })(); - - /** - * RestrictedMetricType enum. - * @name google.analytics.data.v1alpha.RestrictedMetricType - * @enum {number} - * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value - * @property {number} COST_DATA=1 COST_DATA value - * @property {number} REVENUE_DATA=2 REVENUE_DATA value - */ - v1alpha.RestrictedMetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COST_DATA"] = 1; - values[valuesById[2] = "REVENUE_DATA"] = 2; - return values; - })(); - - /** - * SamplingLevel enum. - * @name google.analytics.data.v1alpha.SamplingLevel - * @enum {number} - * @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value - * @property {number} LOW=1 LOW value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} UNSAMPLED=3 UNSAMPLED value - */ - v1alpha.SamplingLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "UNSAMPLED"] = 3; - return values; + return ConversionMetadata; })(); return v1alpha; diff --git a/packages/google-analytics-data/protos/protos.json b/packages/google-analytics-data/protos/protos.json index adcb9024f55d..1fbae0bb7ac9 100644 --- a/packages/google-analytics-data/protos/protos.json +++ b/packages/google-analytics-data/protos/protos.json @@ -1371,7 +1371,7 @@ "AlphaAnalyticsData": { "options": { "(google.api.default_host)": "analyticsdata.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/spreadsheets" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics,https://www.googleapis.com/auth/analytics.readonly" }, "methods": { "RunFunnelReport": { @@ -1438,26 +1438,6 @@ } ] }, - "SheetExportAudienceList": { - "requestType": "SheetExportAudienceListRequest", - "responseType": "SheetExportAudienceListResponse", - "options": { - "(google.api.http).post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{name=properties/*/audienceLists/*}:exportSheet", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, "GetAudienceList": { "requestType": "GetAudienceListRequest", "responseType": "AudienceList", @@ -1651,6 +1631,40 @@ "(google.api.method_signature)": "parent" } ] + }, + "RunReport": { + "requestType": "RunReportRequest", + "responseType": "RunReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:runReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:runReport", + "body": "*" + } + } + ] + }, + "GetMetadata": { + "requestType": "GetMetadataRequest", + "responseType": "Metadata", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/metadata}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/metadata}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -2174,86 +2188,6 @@ } } }, - "SheetExportAudienceListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsdata.googleapis.com/AudienceList" - } - }, - "offset": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "limit": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SheetExportAudienceListResponse": { - "oneofs": { - "_spreadsheetUri": { - "oneof": [ - "spreadsheetUri" - ] - }, - "_spreadsheetId": { - "oneof": [ - "spreadsheetId" - ] - }, - "_rowCount": { - "oneof": [ - "rowCount" - ] - }, - "_audienceList": { - "oneof": [ - "audienceList" - ] - } - }, - "fields": { - "spreadsheetUri": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "spreadsheetId": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "rowCount": { - "type": "int32", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "audienceList": { - "type": "AudienceList", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, "AudienceRow": { "fields": { "dimensionValues": { @@ -2773,6 +2707,236 @@ } } }, + "RunReportRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dateRanges": { + "rule": "repeated", + "type": "DateRange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricFilter": { + "type": "FilterExpression", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metricAggregations": { + "rule": "repeated", + "type": "MetricAggregation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBys": { + "rule": "repeated", + "type": "OrderBy", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "currencyCode": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cohortSpec": { + "type": "CohortSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "keepEmptyRows": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnPropertyQuota": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "comparisons": { + "rule": "repeated", + "type": "Comparison", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversionSpec": { + "type": "ConversionSpec", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunReportResponse": { + "oneofs": { + "_nextPageToken": { + "oneof": [ + "nextPageToken" + ] + } + }, + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "DimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "MetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 3 + }, + "totals": { + "rule": "repeated", + "type": "Row", + "id": 4 + }, + "maximums": { + "rule": "repeated", + "type": "Row", + "id": 5 + }, + "minimums": { + "rule": "repeated", + "type": "Row", + "id": 6 + }, + "rowCount": { + "type": "int32", + "id": 7 + }, + "metadata": { + "type": "ResponseMetaData", + "id": 8 + }, + "propertyQuota": { + "type": "PropertyQuota", + "id": 9 + }, + "kind": { + "type": "string", + "id": 10 + }, + "nextPageToken": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + } + } + }, + "GetMetadataRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsdata.googleapis.com/Metadata" + } + } + } + }, + "Metadata": { + "options": { + "(google.api.resource).type": "analyticsdata.googleapis.com/Metadata", + "(google.api.resource).pattern": "properties/{property}/metadata" + }, + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "dimensions": { + "rule": "repeated", + "type": "DimensionMetadata", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "MetricMetadata", + "id": 2 + }, + "comparisons": { + "rule": "repeated", + "type": "ComparisonMetadata", + "id": 4 + }, + "conversions": { + "rule": "repeated", + "type": "ConversionMetadata", + "id": 5 + } + } + }, "DateRange": { "fields": { "startDate": { @@ -2865,6 +3029,38 @@ } } }, + "Comparison": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "oneComparison": { + "oneof": [ + "dimensionFilter", + "comparison" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "dimensionFilter": { + "type": "FilterExpression", + "id": 2 + }, + "comparison": { + "type": "string", + "id": 3 + } + } + }, "FilterExpression": { "oneofs": { "expr": { @@ -3167,6 +3363,13 @@ } } }, + "Section": { + "values": { + "SECTION_UNSPECIFIED": 0, + "SECTION_REPORT": 1, + "SECTION_ADVERTISING": 2 + } + }, "ResponseMetaData": { "oneofs": { "_schemaRestrictionResponse": { @@ -3239,6 +3442,10 @@ "rule": "repeated", "type": "SamplingMetadata", "id": 9 + }, + "section": { + "type": "Section", + "id": 10 } }, "nested": { @@ -4222,6 +4429,146 @@ "MEDIUM": 2, "UNSAMPLED": 3 } + }, + "ConversionSpec": { + "fields": { + "conversionActions": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "attributionModel": { + "type": "AttributionModel", + "id": 2 + } + }, + "nested": { + "AttributionModel": { + "values": { + "ATTRIBUTION_MODEL_UNSPECIFIED": 0, + "DATA_DRIVEN": 1, + "LAST_CLICK": 2 + } + } + } + }, + "DimensionMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customDefinition": { + "type": "bool", + "id": 5 + }, + "category": { + "type": "string", + "id": 6 + }, + "sections": { + "rule": "repeated", + "type": "Section", + "id": 7 + } + } + }, + "MetricMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "deprecatedApiNames": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "type": { + "type": "MetricType", + "id": 5 + }, + "expression": { + "type": "string", + "id": 6 + }, + "customDefinition": { + "type": "bool", + "id": 7 + }, + "blockedReasons": { + "rule": "repeated", + "type": "BlockedReason", + "id": 8 + }, + "category": { + "type": "string", + "id": 9 + }, + "sections": { + "rule": "repeated", + "type": "Section", + "id": 10 + } + }, + "nested": { + "BlockedReason": { + "values": { + "BLOCKED_REASON_UNSPECIFIED": 0, + "NO_REVENUE_METRICS": 1, + "NO_COST_METRICS": 2 + } + } + } + }, + "ComparisonMetadata": { + "fields": { + "apiName": { + "type": "string", + "id": 1 + }, + "uiName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + }, + "ConversionMetadata": { + "fields": { + "conversionAction": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } } } }, diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js b/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js similarity index 100% rename from owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js rename to packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_metadata.js diff --git a/owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js b/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js similarity index 100% rename from owl-bot-staging/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js rename to packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_report.js diff --git a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json index 92dbb6896d17..b45ca265fd75 100644 --- a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json +++ b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -179,54 +179,6 @@ } } }, - { - "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async", - "title": "AlphaAnalyticsData sheetExportAudienceList Sample", - "origin": "API_DEFINITION", - "description": " Exports an audience list of users to a Google Sheet. After creating an audience, the users are not immediately available for listing. First, a request to `CreateAudienceList` is necessary to create an audience list of users, and then second, this method is used to export those users in the audience list to a Google Sheet. See [Creating an Audience List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Lists with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. This method is introduced at alpha stability with the intention of gathering feedback on syntax and capabilities before entering beta. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", - "canonical": true, - "file": "alpha_analytics_data.sheet_export_audience_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SheetExportAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "offset", - "type": "TYPE_INT64" - }, - { - "name": "limit", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.analytics.data.v1alpha.SheetExportAudienceListResponse", - "client": { - "shortName": "AlphaAnalyticsDataClient", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" - }, - "method": { - "shortName": "SheetExportAudienceList", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.SheetExportAudienceList", - "service": { - "shortName": "AlphaAnalyticsData", - "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" - } - } - } - }, { "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetAudienceList_async", "title": "AlphaAnalyticsData getAudienceList Sample", @@ -666,6 +618,146 @@ } } } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async", + "title": "AlphaAnalyticsData runReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.", + "canonical": true, + "file": "alpha_analytics_data.run_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 164, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.data.v1alpha.FilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "metric_aggregations", + "type": "TYPE_ENUM[]" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "currency_code", + "type": "TYPE_STRING" + }, + { + "name": "cohort_spec", + "type": ".google.analytics.data.v1alpha.CohortSpec" + }, + { + "name": "keep_empty_rows", + "type": "TYPE_BOOL" + }, + { + "name": "return_property_quota", + "type": "TYPE_BOOL" + }, + { + "name": "comparisons", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "conversion_spec", + "type": ".google.analytics.data.v1alpha.ConversionSpec" + } + ], + "resultType": ".google.analytics.data.v1alpha.RunReportResponse", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "RunReport", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.RunReport", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } + }, + { + "regionTag": "analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async", + "title": "AlphaAnalyticsData getMetadata Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "canonical": true, + "file": "alpha_analytics_data.get_metadata.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.data.v1alpha.Metadata", + "client": { + "shortName": "AlphaAnalyticsDataClient", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsDataClient" + }, + "method": { + "shortName": "GetMetadata", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData.GetMetadata", + "service": { + "shortName": "AlphaAnalyticsData", + "fullName": "google.analytics.data.v1alpha.AlphaAnalyticsData" + } + } + } } ] } diff --git a/packages/google-analytics-data/src/index.ts b/packages/google-analytics-data/src/index.ts index f43adab04927..2d76b05e1e8e 100644 --- a/packages/google-analytics-data/src/index.ts +++ b/packages/google-analytics-data/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts index 88250d216971..b2010ffa7be5 100644 --- a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts +++ b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts @@ -181,6 +181,9 @@ export class AlphaAnalyticsDataClient { audienceListPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/audienceLists/{audience_list}' ), + metadataPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/metadata' + ), propertyPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}' ), @@ -283,7 +286,7 @@ export class AlphaAnalyticsDataClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const alphaAnalyticsDataStubMethods = - ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'sheetExportAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks']; + ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks', 'runReport', 'getMetadata']; for (const methodName of alphaAnalyticsDataStubMethods) { const callPromise = this.alphaAnalyticsDataStub.then( stub => (...args: Array<{}>) => { @@ -366,10 +369,7 @@ export class AlphaAnalyticsDataClient { static get scopes() { return [ 'https://www.googleapis.com/auth/analytics', - 'https://www.googleapis.com/auth/analytics.readonly', - 'https://www.googleapis.com/auth/drive', - 'https://www.googleapis.com/auth/drive.file', - 'https://www.googleapis.com/auth/spreadsheets' + 'https://www.googleapis.com/auth/analytics.readonly' ]; } @@ -692,140 +692,6 @@ export class AlphaAnalyticsDataClient { throw error; }); } -/** - * Exports an audience list of users to a Google Sheet. After creating an - * audience, the users are not immediately available for listing. First, a - * request to `CreateAudienceList` is necessary to create an audience list of - * users, and then second, this method is used to export those users in the - * audience list to a Google Sheet. - * - * See [Creating an Audience - * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) - * for an introduction to Audience Lists with examples. - * - * Audiences in Google Analytics 4 allow you to segment your users in the ways - * that are important to your business. To learn more, see - * https://support.google.com/analytics/answer/9267572. - * - * This method is introduced at alpha stability with the intention of - * gathering feedback on syntax and capabilities before entering beta. To give - * your feedback on this API, complete the - * [Google Analytics Audience Export API - * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the audience list to retrieve users from. - * Format: `properties/{property}/audienceLists/{audience_list}` - * @param {number} [request.offset] - * Optional. The row count of the start row. The first row is counted as row - * 0. - * - * When paging, the first request does not specify offset; or equivalently, - * sets offset to 0; the first request returns the first `limit` of rows. The - * second request sets offset to the `limit` of the first request; the second - * request returns the second `limit` of rows. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {number} [request.limit] - * Optional. The number of rows to return. If unspecified, 10,000 rows are - * returned. The API returns a maximum of 250,000 rows per request, no matter - * how many you ask for. `limit` must be positive. - * - * The API can also return fewer rows than the requested `limit`, if there - * aren't as many dimension values as the `limit`. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse|SheetExportAudienceListResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js - * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async - */ - sheetExportAudienceList( - request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, - options?: CallOptions): - Promise<[ - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, {}|undefined - ]>; - sheetExportAudienceList( - request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, - options: CallOptions, - callback: Callback< - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, - {}|null|undefined>): void; - sheetExportAudienceList( - request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, - callback: Callback< - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, - {}|null|undefined>): void; - sheetExportAudienceList( - request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('sheetExportAudienceList request %j', request); - const wrappedCallback: Callback< - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('sheetExportAudienceList response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.sheetExportAudienceList(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, - protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest|undefined, - {}|undefined - ]) => { - this._log.info('sheetExportAudienceList response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } /** * Gets configuration metadata about a specific audience list. This method * can be used to understand an audience list after it has been created. @@ -1470,6 +1336,307 @@ export class AlphaAnalyticsDataClient { throw error; }); } +/** + * Returns a customized report of your Google Analytics event data. Reports + * contain statistics derived from data collected by the Google Analytics + * tracking code. The data returned from the API is as a table with columns + * for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or + * event count. Dimensions break down metrics across some common criteria, + * such as country or event name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. A Google Analytics property identifier whose events are tracked. + * Specified in the URL path and not the body. To learn more, see [where to + * find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * Within a batch request, this property should either be unspecified or + * consistent with the batch-level property. + * + * Example: properties/1234 + * @param {number[]} [request.dimensions] + * Optional. The dimensions requested and displayed. + * @param {number[]} [request.metrics] + * Optional. The metrics requested and displayed. + * @param {number[]} [request.dateRanges] + * Optional. Date ranges of data to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the event data for the overlapping days is + * included in the response rows for both date ranges. In a cohort request, + * this `dateRanges` must be unspecified. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter] + * Optional. Dimension filters let you ask for only specific dimension values + * in the report. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.data.v1alpha.FilterExpression} [request.metricFilter] + * Optional. The filter clause of metrics. Applied after aggregating the + * report's rows, similar to SQL having-clause. Dimensions cannot be used in + * this filter. + * @param {number} [request.offset] + * Optional. The row count of the start row. The first row is counted as row + * 0. + * + * When paging, the first request does not specify offset; or equivalently, + * sets offset to 0; the first request returns the first `limit` of rows. The + * second request sets offset to the `limit` of the first request; the second + * request returns the second `limit` of rows. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} [request.limit] + * Optional. The maximum number of rows to return. If unspecified, 10,000 rows + * are returned. The API returns a maximum of 250,000 rows per request, no + * matter how many you ask for. `limit` must be positive. + * + * The API can also return fewer rows than the requested `limit`, if there + * aren't as many dimension values as the `limit`. For instance, there are + * fewer than 300 possible values for the dimension `country`, so when + * reporting on only `country`, you can't get more than 300 rows, even if you + * set `limit` to a higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number[]} [request.metricAggregations] + * Optional. Aggregation of metrics. Aggregated metric values will be shown in + * rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + * Aggregates including both comparisons and multiple date ranges will + * be aggregated based on the date ranges. + * @param {number[]} [request.orderBys] + * Optional. Specifies how rows are ordered in the response. + * Requests including both comparisons and multiple date ranges will + * have order bys applied on the comparisons. + * @param {string} [request.currencyCode] + * Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". + * If the field is empty, the report uses the property's default currency. + * @param {google.analytics.data.v1alpha.CohortSpec} [request.cohortSpec] + * Optional. Cohort group associated with this request. If there is a cohort + * group in the request the 'cohort' dimension must be present. + * @param {boolean} [request.keepEmptyRows] + * Optional. If false or unspecified, each row with all metrics equal to 0 + * will not be returned. If true, these rows will be returned if they are not + * separately removed by a filter. + * + * Regardless of this `keep_empty_rows` setting, only data recorded by the + * Google Analytics property can be displayed in a report. + * + * For example if a property never logs a `purchase` event, then a query for + * the `eventName` dimension and `eventCount` metric will not have a row + * eventName: "purchase" and eventCount: 0. + * @param {boolean} [request.returnPropertyQuota] + * Optional. Toggles whether to return the current state of this Google + * Analytics property's quota. Quota is returned in + * [PropertyQuota](#PropertyQuota). + * @param {number[]} [request.comparisons] + * Optional. The configuration of comparisons requested and displayed. The + * request only requires a comparisons field in order to receive a comparison + * column in the response. + * @param {google.analytics.data.v1alpha.ConversionSpec} [request.conversionSpec] + * Optional. Controls conversion reporting. This field is optional. If this + * field is set or any conversion metrics are requested, the report will be a + * conversion report. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunReportResponse|RunReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.run_report.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async + */ + runReport( + request?: protos.google.analytics.data.v1alpha.IRunReportRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined + ]>; + runReport( + request: protos.google.analytics.data.v1alpha.IRunReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request: protos.google.analytics.data.v1alpha.IRunReportRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): void; + runReport( + request?: protos.google.analytics.data.v1alpha.IRunReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'property': request.property ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('runReport request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('runReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.runReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IRunReportResponse, + protos.google.analytics.data.v1alpha.IRunReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('runReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns metadata for dimensions and metrics available in reporting methods. + * Used to explore the dimensions and metrics. In this method, a Google + * Analytics property identifier is specified in the request, and + * the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + * For example if a custom metric with parameter name `levels_unlocked` is + * registered to a property, the Metadata response will contain + * `customEvent:levels_unlocked`. Universal metadata are dimensions and + * metrics applicable to any property such as `country` and `totalUsers`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric + * Google Analytics property identifier. To learn more, see [where to find + * your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + * + * Example: properties/1234/metadata + * + * Set the Property ID to 0 for dimensions and metrics common to all + * properties. In this special mode, this method will not return custom + * dimensions and metrics. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.Metadata|Metadata}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/alpha_analytics_data.get_metadata.js + * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async + */ + getMetadata( + request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + options?: CallOptions): + Promise<[ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined + ]>; + getMetadata( + request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + callback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): void; + getMetadata( + request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getMetadata request %j', request); + const wrappedCallback: Callback< + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMetadata response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMetadata(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.analytics.data.v1alpha.IMetadata, + protos.google.analytics.data.v1alpha.IGetMetadataRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMetadata response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Creates an audience list for later retrieval. This method quickly returns @@ -2644,6 +2811,29 @@ export class AlphaAnalyticsDataClient { return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list; } + /** + * Return a fully-qualified metadata resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + metadataPath(property:string) { + return this.pathTemplates.metadataPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Metadata resource. + * + * @param {string} metadataName + * A fully-qualified path representing Metadata resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMetadataName(metadataName: string) { + return this.pathTemplates.metadataPathTemplate.match(metadataName).property; + } + /** * Return a fully-qualified property resource name string. * diff --git a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json index 2fcd35e324d9..56d47db54383 100644 --- a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json +++ b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client_config.json @@ -47,11 +47,6 @@ "retry_codes_name": "unknown", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, - "SheetExportAudienceList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, "GetAudienceList": { "timeout_millis": 60000, "retry_codes_name": "unknown", @@ -101,6 +96,16 @@ "timeout_millis": 60000, "retry_codes_name": "unknown", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetMetadata": { + "timeout_millis": 60000, + "retry_codes_name": "unknown", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" } } } diff --git a/packages/google-analytics-data/src/v1alpha/gapic_metadata.json b/packages/google-analytics-data/src/v1alpha/gapic_metadata.json index b686a63cb9c3..d0689e4e3b83 100644 --- a/packages/google-analytics-data/src/v1alpha/gapic_metadata.json +++ b/packages/google-analytics-data/src/v1alpha/gapic_metadata.json @@ -20,11 +20,6 @@ "queryAudienceList" ] }, - "SheetExportAudienceList": { - "methods": [ - "sheetExportAudienceList" - ] - }, "GetAudienceList": { "methods": [ "getAudienceList" @@ -55,6 +50,16 @@ "getReportTask" ] }, + "RunReport": { + "methods": [ + "runReport" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, "CreateAudienceList": { "methods": [ "createAudienceList" @@ -101,11 +106,6 @@ "queryAudienceList" ] }, - "SheetExportAudienceList": { - "methods": [ - "sheetExportAudienceList" - ] - }, "GetAudienceList": { "methods": [ "getAudienceList" @@ -136,6 +136,16 @@ "getReportTask" ] }, + "RunReport": { + "methods": [ + "runReport" + ] + }, + "GetMetadata": { + "methods": [ + "getMetadata" + ] + }, "CreateAudienceList": { "methods": [ "createAudienceList" diff --git a/packages/google-analytics-data/system-test/install.ts b/packages/google-analytics-data/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-analytics-data/system-test/install.ts +++ b/packages/google-analytics-data/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts b/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts index 39997012e0ff..13e7fac4efb8 100644 --- a/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts +++ b/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts @@ -491,114 +491,6 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); - describe('sheetExportAudienceList', () => { - it('invokes sheetExportAudienceList without error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() - ); - client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(expectedResponse); - const [response] = await client.sheetExportAudienceList(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes sheetExportAudienceList without error using callback', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse() - ); - client.innerApiCalls.sheetExportAudienceList = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.sheetExportAudienceList( - request, - (err?: Error|null, result?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes sheetExportAudienceList with error', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.sheetExportAudienceList = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.sheetExportAudienceList(request), expectedError); - const actualRequest = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.sheetExportAudienceList as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes sheetExportAudienceList with closed client', async () => { - const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.analytics.data.v1alpha.SheetExportAudienceListRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.sheetExportAudienceList(request), expectedError); - }); - }); - describe('getAudienceList', () => { it('invokes getAudienceList without error', async () => { const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ @@ -1247,6 +1139,222 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); + describe('runReport', () => { + it('invokes runReport without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCall(expectedResponse); + const [response] = await client.runReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportResponse() + ); + client.innerApiCalls.runReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runReport( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IRunReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.runReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runReport(request), expectedError); + const actualRequest = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runReport with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.RunReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.RunReportRequest', ['property']); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.runReport(request), expectedError); + }); + }); + + describe('getMetadata', () => { + it('invokes getMetadata without error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadata(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata without error using callback', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.data.v1alpha.Metadata() + ); + client.innerApiCalls.getMetadata = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadata( + request, + (err?: Error|null, result?: protos.google.analytics.data.v1alpha.IMetadata|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with error', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadata = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadata(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadata as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadata with closed client', async () => { + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.data.v1alpha.GetMetadataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.analytics.data.v1alpha.GetMetadataRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMetadata(request), expectedError); + }); + }); + describe('createAudienceList', () => { it('invokes createAudienceList without error', async () => { const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ @@ -2585,6 +2693,36 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); + describe('metadata', async () => { + const fakePath = "/rendered/path/metadata"; + const expectedParameters = { + property: "propertyValue", + }; + const client = new alphaanalyticsdataModule.v1alpha.AlphaAnalyticsDataClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.metadataPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataPath', () => { + const result = client.metadataPath("propertyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPropertyFromMetadataName', () => { + const result = client.matchPropertyFromMetadataName(fakePath); + assert.strictEqual(result, "propertyValue"); + assert((client.pathTemplates.metadataPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('property', async () => { const fakePath = "/rendered/path/property"; const expectedParameters = { diff --git a/packages/google-analytics-data/webpack.config.js b/packages/google-analytics-data/webpack.config.js index da5cdf30ed5f..f5f52a892738 100644 --- a/packages/google-analytics-data/webpack.config.js +++ b/packages/google-analytics-data/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// 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.